1. Maven Settings

In your Maven .m2 directory (located in your home directory) edit or create the settings.xml file and add the following for access to the FilteredPush Archiva Maven repository. This will enable remote dependency resolution from Archiva for some of the FilteredPush dependencies which do not need to be checked out via SVN locally in order to develop the system. See more about the maven settings.xml at the following reference page: http://maven.apache.org/settings.html

First, in settings.xml add a new server with the FilteredPush developer username and password assigned to you for access to Archiva. Name the server filteredpush:

<settings> ... <servers> <server> <id>filteredpush</id> <username>username</username> <password>password</password> </server> </servers> ... </settings>

Now add a new profile to your settings.xml profiles thatcontains the configuration below for the FilteredPush Archiva repository:

<settings> ... <profiles> <profile> <id>filteredpush-dev</id> <repositories> <repository> <id>filteredpush</id> <name>Filtered Push Repository</name> <url>http://firuta.huh.harvard.edu:9090/archiva/repository/filteredpush/</url> <layout>default</layout> <releases> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </releases> <snapshots> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </snapshots> </repository> </repositories> </profile> </profiles> ... </settings>

Lastly, add the filteredpush-dev profile you just defined to the list of active profiles:

<settings> ... <activeProfiles> <activeProfile>filteredpush-dev</activeProfile> </activeProfiles> ... </settings>

See the following example of a complete settings.xml (password and username are just placeholder values in this file so replace them to use the example settings.xml as your config.)

2. Checkout and Build Projects

In Eclipse select the File > New > Other menu option and in the New dialog select the Checkout Projects from SVN wizard under SVN before clicking Next. Select the Create a new repository location option and click next. In the textarea labeled Url enter the following url to the FilteredPush Sourceforge svn repository and click Next: http://svn.code.sf.net/p/filteredpush/svn

Select the trunk/FP-JavaSOA folder in the next dialog to check out the FilteredPush applications and modules and click Finish to checkout as a project in the workspace.

You should now see the FP-JavaSOA project in the Project Explorer on the left in the Eclipse workspace. This project contains two subdirectories, FP-Modules and FP-Applications. FP-Modules contains all of the individual FilteredPush component projects (jsf web application, ejbs, web servies, etc). FP-Applications contains projects that can be used to build the deployable EAR artifact which composes the modules into a single enterprise application.

To build the modules and the deployment artifacts right click on FP-JavaSOA click Run As and select Maven Install. Once maven finishes execution, you should see messages indicating build success or failure. If a module has failed you can also see which one. If all goes well you should see some output similar to the following:

... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] FilteredPush JavaEE Parent Project ................ SUCCESS [0.475s] [INFO] FilteredPush Core Classes and APIs ................ SUCCESS [3.349s] [INFO] FilteredPush Analysis EJBs ........................ SUCCESS [1.558s] [INFO] FilteredPush Knowledge EJBs ....................... SUCCESS [0.653s] [INFO] FilteredPush Messaging EJBs ....................... SUCCESS [4.879s] [INFO] FilteredPush Node EJBs ............................ SUCCESS [0.756s] [INFO] FilteredPush Annotation Generator ................. SUCCESS [1.488s] [INFO] FilteredPush Annotation Parser .................... SUCCESS [0.590s] [INFO] FilteredPush Annotation Processor Web ............. SUCCESS [4.805s] [INFO] FilteredPush Single-node Deployment ............... SUCCESS [7.347s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 26.842s [INFO] Finished at: Fri Feb 22 12:08:45 EST 2013 [INFO] Final Memory: 33M/167M [INFO] ------------------------------------------------------------------------

3. Deploying Build Artifacts

Once you have completed the maven build process you may deploy the single-node network implementation of FilteredPush with the FP-EAR-x.x.x-SNAPSHOT.ear file in the FP-JavaSOA/FP-Applications/FP-EAR/target/. This contains all of the modules required for a single-node deployment and can be deployed directly to a JavaEE application server such as Glassfish.

If you are deploying the Annotation Generator as a stand-alone service (independently of the network Access Point and supporting services) you can deploy the FP-AnnotationGenerator-x.x.x-SNAPSHOT.war found in FP-JavaSOA/FP-Modules/FP-AnnotationGenerator/target/ to either Glassfish or Tomcat after running the Maven build.

It is important to note that the modules that are built as WAR artifacts (FP-AnnotationGenerator, FP-AnnotationProcessor-Web) and applications that are built as EAR artifacts can be deployed as stand-alone components since the WAR and EAR file build process automatically includes all the required library dependencies (i.e. in WEB-INF/lib for deployment).

EJB modules (FP-Node, FP-Analysis, FP-Messaging, FP-Knowledge) and other JAR artifacts are packaged as JAR files do not contain library dependencies and it is recommended that you package these in an EAR for deployment instead of trying to deploy these as stand-alone artifacts.

4. Import Subprojects in Eclipse

Since the projects under these subdirectories are subprojects of FP-JavaSOA, if you plan on developing you must import the specific project or projects that you wish to make changes to. To do this select the File > Import menu item and in the import dialog select Existing Projects into Workspace from General before clicking Next.

Next to the text area labeled "Select root directory" click the Browse button, navigate to your eclipse workspace directory in the file chooser, select the FP-JavaSOA/FP-Modules directory and click OK. In the next dialog select the projects you will be working on and click Finish.