You'd probably be better off with 4 modules...

module #1 is all the contents of the jar without persistence.xml

module#2-#4 just have the persistence.xml, they use
dependency:unpack-dependencies to unpack module#1 into target/classes

2009/3/16 Aaron Shettleroe <[email protected]>

> I'm trying to build 3 artifacts from the same POM.  The project is
> building an EJB 3.0 jar file and I have 3 different persistence.xml
> files, one per database vendor.  I'd like all 3 jars to be built when I
> do a "mvn package."
>
> I've looked into using the maven-jar-plugin to accomplish this, but I
> can't seem to get the persistence.xml file I need into the JAR.  I tried
> using the include tag but to no avail.  It doesn't "see" files outside
> of src/main/java and src/main/resources.
>
> I have the following structure:
> src/main/persistence/mysql/persistence.xml
> src/main/persistence/oracle/persistence.xml
> src/main/persistence/sqlserver/persistence.xml
>
> How do I get the right persistence.xml into the right JAR?  Again I want
> all three JARs produced at package phase.
>
> Thanks,
> Aaron
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to