Jean-Claude,
On Tue, Apr 21, 2009 at 7:03 PM, Jean-Claude <[email protected]>wrote:
>
> Is it a way to automatically generate the list of the jar files to avoid
> having to manually edit the file persistence.xml each time there is a new
> version of the jar files (e.g. using the maven-ejb-plugin)?
>
There's two ways you can do this. The first is to store the version in a
property in your pom and use it in your dependency and in the
persistence.xml and filter it when the EJB is built. Something like
<properties>
<foo.version>1.0.0-SNAPSHOT</foo.version>
</properties>
.....
<depepdencies>
<dependency>
<groupId>com.foo</groupId>
<artifactId>activity-bo</artifactId>
<version>${foo.version}</version>
<type>ejb</type>
</dependency>
</dependencies>
....
(Then put the ${foo.version} in your persistence.xml instead of the version
and configure the build to filter it)
The other way is to ask the ear plugin to change the name of the file when
it's packaged. See the documentation for more details
http://maven.apache.org/plugins/maven-ear-plugin/examples/customizing-a-module-filename.html
HTH,
Stéphane
--
Large Systems Suck: This rule is 100% transitive. If you build one, you
suck" -- S.Yegge