maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Billy Newman <>
Subject using maven modules
Date Fri, 04 May 2012 01:36:57 GMT
A while back I had some questions about building some jars that only differ
in the properties files stored in the jar.  I was going to use classifiers
to differentiate the jars but was advised against it.

My company has many, many different deployments and for these jars they
want to keep the properties file packaged with the jars.

I was think about maybe having a parent project that contains the java
source (since the code is the same for each jar).  Then maybe child modules
that have the properties files in the resources directory.  Then each child
module can build the java code and throw in the properties file ( i dont
really care that if I build the same byte code many time as the build is
very fast).  This idea came to mind because I have unit tests for the jar
files that test the code against the different properties files.  I.E. when
I build the source and throw in the properties the unit test will run).  So
each module will run the unit tests against its property file.

Unfortunately my idea only really works in my head.  My problem is that the
parent module cannot contain the java source code as the parent module
needs to be a pom.

Any one have any ideas on how I can setup my maven project hierarchy such
that the code lives in one place and the resources live in another (maybe a
child module).  Such that when I build I build from the same source each
time but insert a different properties file, then test each one.

I think they can all live in one group, but have different artifactids:
ie. group - com.test.module
artifacts - module-type1.jar, module-type2.jar, module-type3.jar

Thanks in advance for any ideas.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message