Difference between revisions of "1.3 Maven Build"

From RifidiWiki

Jump to: navigation, search
(Create a p2 repository for plugins)
(Removing all content from page)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
=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
 
<pre>sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk</pre>
 
* 2) In the command prompt, type
 
<pre>sudo update-java-alternatives -s java-6-sun</pre>
 
* 3) Open /etc/jvm and add the top line to read
 
 
<pre>/usr/lib/jvm/java-6-sun</pre>
 
 
    The bottom of the file should read
 
 
<pre>/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</pre>
 
 
    Make sure you save and close the file.
 
* 4) Set up the environment variable by editing the file $HOME/.bash_profile and appending
 
<pre>export JAVA_HOME=/usr/lib/jvm/java-6-sun
 
export PATH=$PATH:$JAVA_HOME/bin</pre>
 
* 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)
 
 
<pre>java -version</pre>
 
 
The output should be similar to
 
 
<pre>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)</pre>
 
 
==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:
 
 
<pre>http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-3.0.3-bin.tar.gz</pre>
 
 
* 2) In the shell prompt, move the direcotory where the download is stored and enter
 
 
<pre>tar -xzvf apache-maven-3.0.3-bin.tar.gz</pre>
 
 
* 3) In the shell prompt, type
 
 
<pre>sudo mkdir /usr/local/apache-maven</pre>
 
 
* 4) In the shell prompt, type
 
 
<pre>sudo cp -r apache-maven-3.0.3 /usr/local/apache-maven/</pre>
 
 
* 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:
 
 
<pre>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</pre>
 
 
* 6) Add the following location to the PATH variable, separated by a ' : '
 
<pre>usr/local/apache-maven/apache-maven-3.0.3/bin</pre>
 
* 7)  Restart the computer to allow all the changes to this point to take effect.
 
* 8) In the shell prompt, type
 
 
<pre>mvn -version</pre>
 
 
the output should look similar to the following
 
 
<pre>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</pre>
 
 
==Install Tomcat6==
 
 
Simply type into the shell prompt
 
 
<pre>sudo apt-get install tomcat6</pre>
 
 
 
 
==Build the project.==
 
 
*1)Open a shell prompt and move to the Rifidi-SDK project.
 
*2)In the prompt, type
 
<pre>sh build.sh</pre>
 
'''NOTE: DO NOT “SUDO” THE ABOVE COMMAND.'''
 
*3)The .deb result will be placed in /Rifidi-SDK/rifidi/Debian-packages
 

Latest revision as of 22:32, 13 May 2014

Personal tools