Difference between revisions of "1.3 Maven Build"
From RifidiWiki
(→Create a p2 repository for plugins) |
(→Create a p2 repository for plugins) |
||
Line 109: | Line 109: | ||
<pre>sudo apt-get install tomcat6</pre> | <pre>sudo apt-get install tomcat6</pre> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Build the project.== | ==Build the project.== |
Revision as of 22:42, 11 January 2012
Contents
Under Construction!
Check back later!
Before beginning
The Maven Build tutorial below is designed to be used on a Debian built operating system. The maven build is capable of generating the binary files for both Windows and Macintosh, but the steps for producing an executible file for Windows or Mac are not included in this release.
What you'll need to do:
- 1) Install the Sun-JDK [Scripted]
- 2) Add the required project(s) into eclipse.
- 3) Install Maven3 [Scripted]
- 4) Install Tomcat6 [Scripted]
- 5) Create a p2 repository for plugins
- 6) Build the project.
Install the Sun-SDK
Optionally, there is a script for this section, RifidiMavenBuild.sh. Navigate to the script and type sudo sh RifidiMavenBuild.sh
- 1) In the command prompt, type
sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk
- 2) In the command prompt, type
sudo update-java-alternatives -s java-6-sun
- 3) Open /etc/jvm and add the top line to read
/usr/lib/jvm/java-6-sun
The bottom of the file should read
/urs/lib/jvm/java-6-sun /usr/lib/jvm/java-gcj /usr/lib/jvm/ia32-java-1.5.0-sun /usr/lib/jvm/java-1.5.0-sun /usr
Make sure you save and close the file.
- 4) Set up the environment variable by editing the file $HOME/.bash_profile and appending
export JAVA_HOME=/usr/lib/jvm/java-6-sun export PATH=$PATH:$JAVA_HOME/bin
- 5) You may need to restart the computer at this point to ensure the operating system recognizes the changes that have been made.
- 6) Verify the version is installed correctly by typing (in the shell prompt)
java -version
The output should be similar to
java version "1.6.0_03" Java(TM) SE Runtime Environment (build 1.6.0_03-b05) Java HotSpot(TM) Server VM (build 1.6.0_03-b05, mixed mode)
Add the required project(s) into eclipse.
We recommend and support Eclipse Galileo (3.5) as the programming environment. You'll need to use the SVN repository system to access the open code repository. In the SVN tab, add the repository https://svn.rifidi.rog/svn/rep-edgepublic to gain access to the required base program. The projects you will need to check out are:
- 1) org.rifidi.edge
- 2) org.rifidi.edge.adapter.llrp
- 3) org.rifidi.edge.adapter.alien
- 4) org.rifidi.edge.api
- 5) org.rifidi.edge.init
- 6) org.rifidi.edge.tools
- 7) Rifidi-SDK
3)Install Maven3
- 1) Download the maven 3 tar from:
http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-3.0.3-bin.tar.gz
- 2) In the shell prompt, move the direcotory where the download is stored and enter
tar -xzvf apache-maven-3.0.3-bin.tar.gz
- 3) In the shell prompt, type
sudo mkdir /usr/local/apache-maven
- 4) In the shell prompt, type
sudo cp -r apache-maven-3.0.3 /usr/local/apache-maven/
- 5) Add the maven 3 PATH variables to the environment file located at /etc/environment
NOTE: You'll want you make sure your JAVA_HOME variable points to java-6-sun
The lines you'll need to add are:
M2_HOME = /usr/local/apache-maven/apache-maven-3.0.3 MAVEN_HOME = /usr/local/apache-maven/apache-maven-3.0.3 M2 = /usr/local/apache-maven/apache-maven-3.0.3/bin
- 6) Add the following location to the PATH variable, separated by a ' : '
usr/local/apache-maven/apache-maven-3.0.3/bin
- 7) Restart the computer to allow all the changes to this point to take effect.
- 8) In the shell prompt, type
mvn -version
the output should look similar to the following
Apache-maven 3.0.3 (r1075438; 2011-02-28 12:31:09-05000) Maven home: /usr/local/apache-maven/apache-maven-3.0.3 Java version: 1.6.0_24, vender: sun Microsystems Inc. Java home: /usr/lib/jvm/java-6-sun-1.6.0.24/jre
Install Tomcat6
Simply type into the shell prompt
sudo apt-get install tomcat6
Build the project.
- 1)Open a shell prompt and move to the Rifidi-SDK project.
- 2)In the prompt, type
sh build.sh
NOTE: DO NOT “SUDO” THE ABOVE COMMAND.
- 3)The .deb result will be placed in /Rifidi-SDK/rifidi/Debian-packages