Java 1.8 setup
-
If you don’t have Java JDK 1.8, download JDK 1.8 for your operating system from http://www.oracle.com/technetwork/java/javase/downloads/index.html and finish the installation.
-
Set the JAVA_HOME environment variable to the folder where Java 1.8 is installed (in Windows this is in the Program Files in a Java directory. Go to My Computer“ ”Properties“ ”Advanced“ ”Environment Variables" to add or edit the JAVA_HOME variable.)
Eclipse Setup
-
If you don’t have Eclipse (Luna or Mars) installed: Download the Eclipse IDE for Java Developers (Luna or Mars) from https://www.eclipse.org/downloads/ and extract the compressed file.
-
Open Eclipse and go to Preferences and expand Java tree.
-
Click Installed JREs and use the search option of Eclipse to locate the JDK 1.8 installation folder.
-
Select the JDK 1.8 as default and click OK to apply your settings.
Maven Eclipse plugin Installation
In order to build and run Maven projects the Maven plugin must be installed prior to any other operation.
-
In Eclipse: Go to Help and click install new software. Make sure you have the box “Hide items that are already installed” ticked.
- Luna:
1. Enter url <http://download.eclipse.org/releases/luna> and type the word maven in the text filter.
- Mars:
1. Enter url <http://download.eclipse.org/releases/mars> and type the word maven in the text filter.
-
In case Maven is not installed in your Eclipse application you should see 2 results from 2 different sections. Collaboration and general purpose tools. Expand the General Purpose Tools and click the m2e - Maven Integration for Eclipse.
-
Click Next (2 times) and accept the license agreement. Finally click Finish.
-
You will be prompted with a window asking you to either restart Eclipse or Apply Changes now. Click restart now and wait until your Eclipse resumes.
-
To check that your installation was successful you can go to About Eclipse (or Help in Windows) Installation details Installed software tab. Check if m2e - Maven integration in Eclipse is present.
External Maven Installation
-
Download Maven 3.0.5 zip from http://archive.apache.org/dist/maven/maven-3/3.0.5/binaries/
-
Unzip the donwloaded file and move the file to the appropriate location according to your operating system
- Windows:
1. Move the apache-maven-3.0.5 created directory under the “C:\\” folder 2. Add the “bin” directory of the created directory, “C:\\apache-maven-3.0.5\\bin”, to the “PATH” environment variable by editing the Path at My Computer“ \> ”Properties“ \> ”Advanced“ \> ”Environment Variables“ \> ”Path". 3. Alternatively, you could run the “cmd.exe” as an administrator and execute the following command. “setx path "%path%;C:\\apache-maven-3.0.5\\bin”.
- OSX|Unix:
1. Move the apache-maven-3.0.5 created directory under the user(<span>.17ex</span>/) folder “<span>.17ex</span>/apache-maven-3.0.5” or under “/opt”. 2. At this part you should add the “bin” directory of the created directory to the “PATH” environment variable. If you added Maven under “<span>.17ex</span>/apache-maven-3.0.5” then add the entry “<span>.17ex</span>/apache-maven-3.0.5/bin”. Adjust the path accordingly if you used the “opt” folder. 3. Execute the following in your terminal, “export PATH= /apache-maven-3.0.5/bin:<span>\$PATH</span>”. The previous command will not delete your path but rather append the new entry to your path.
-
Check that your Maven installation is working. Open a command line window and type:
mvn --version
and compare the output with the one from the following guide http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html.
-
Copy the string next to Maven home.
-
Open Eclipse and go to Window Preferences Maven Installation Add and enter the Maven Home string copied from the previous step. Name it mvn3.0.5 click Finish and OK.
Download and import JSXM example projects
There are many examples at http://www.jsxm.org/jsxm-maven-plugin/ that demonstrate different aspects of JSXM. What is demonstrated below for the Account example can be repeated for any other.
-
Go to http://www.jsxm.org/jsxm-maven-plugin/, click on Examples and Account.
-
Click on the “Account” green button at the bottom of the page to download the example.
-
Create a jsxm directory (if you have not done already) and create an Account directory wihin the jsxm directory.
- Windows: Windows treat paths in a much more different that Unix based systems. For example, user folders with Greek letters should be avoided since they cause compilation errors.
-
Move the downloaded zip into the Account directory and extract the compressed folder.
-
Go to Eclipse: File Import Maven Existing Maven Project
-
Browse to the Account folder within the jsxm folder in Windows, select the folder and click Finish to import the JSXM example.
-
The project Account appears on the Package Explorer of Eclipse. If there is an error indicator on the project (a red X icon), right click on the example project Maven Update Project.
-
This step is only necessary for the first time you use the Maven Plugin. Right click on Account project Run As Maven Build …. Click on Maven Runtime: and select the mvn3.0.5. Click Apply. Enter “clean jsxm:compile” in the goals section and click Run. If you see a message “BUILD SUCCES” everything is correctly installed and JSXM is ready to be used.
Next steps
Go to http://www.jsxm.org/jsxm-maven-plugin/ and click on Guides Getting started or directly go to: http://www.jsxm.org/jsxm-maven-plugin/guide/start.html.