Eclipse Maven multi project build/deploy process when using a SCM/Audit group

| | August 6, 2015

Ultimately we are trying to figure out a build/deploy process at my company. As the developer, I need to provide my source code to an audit group. They review the software for security deviations. If the source passes the audit, then the code goes to the Software Configuration Group. Their job is to archive and compile my app to a WAR. The WAR file is then provided to the IT department who will put the WAR on the server. I think the process would be easy if I had one self contained project.

But in Eclipse I have two Maven projects, where one depends on the other. One project core provides core functionality. I separated it because these core functionalites will be used by all my other (internal) web app projects.

 Logging
 filters
 common models (phonebook, employee, etc)
 common utilities (Emailing employess, String utils, etc..)

In the other projects, say project1, I add a dependency to core in the POM. Not sure if I need to do this but I also edited the Eclipse project properties and added a reference to the core project. With some finagling (new to Maven) I was able to get Project1 deployed to my local install of JBoss. I opened the WAR and in WEB-INF/lib folder I could see that core-0.0.1-SNAPSHOT.jar was automatically included.

But how do I give SCM my source for project1 which also needs the source for core without manually copying cores source into porject1s source.

I could copy core-0.0.1-SNAPSHOT.jar into Project1 but they should also be reviewing cores source every time I deploy a new app because I may have added or tweaked some core functionality.

2 Responses to “Eclipse Maven multi project build/deploy process when using a SCM/Audit group”

  1. To solve packaging problem you can use Maven Assembly Plugin. You can have all sources and dependencies in one file.

    Maybe there are even more suitable for your needs maven plugins.

  2. You should learn more about maven SNAPSHOT and release repositories. Then install Nexus server as destination for produced jars, wars, javadocs and sources (called artifacts).

    After that maybe you will be interested in commercial Nexus version with staged deployment option.
    http://www.sonatype.com/people/2009/06/using-staging-repositories-for-deployment-in-nexus/

Leave a Reply