1. You are interested in the java plugin. So have a look in src/plugins-build/java
2. The first place to look is the jelly script - plugin.jelly
3. Find the java:jar goal and have a look at the task, most of the time it will be fairly similar to ant tasks (ant is the default namespace for the plugin.jelly scripts) and easy to read
4. Unfortunately the plugin only puts LICENSE.txt into META-INF, so you're going to have to raise a feature request and include a patch (well we can all dream!)
<metainf dir="${basedir}">
<include name="LICENSE.txt"/>
<your paths go here.../>
</metainf>
5. To add extra bits to your jar, take a look at java:jar-resources or if that is too primitive, write a preGoal for java:jar that copies
the appropriate files into ${maven.build.dest} - copy the general concept from java:jar-resources. Essentially the POM build/resources element determines what ends up in the jar.
Also,
If you want to "hack" your plugin to make it work for you / experiment... edit $MAVEN_HOME/plugins/<plugin>/plugin.jelly (this will be overwritten during bootstrap, so it is only useful for quick hacks in testing).
Then when you're satisfied with your changes, submit patches back to the maven developer list.
Cheers,
Ben
Mauro Talevi wrote:
Hi,
a couple of questions on configuring java:jar goal.
1. is there a way to specify files to go in META-INF/somedir ?
There seems to be only a way to specify the manifest.
What is the equivalent (if any) of Ant jar metainf nested element?
2. using maven.jarResources.basedir=src and
<build>
<resources>
<resource>
<includes>somedir/*.ext</includes>
</resources>
</resources>
</build>
I have been able to add somedir/*.ext to jar.
But is there a way to change the path name of the resource in the jar,
eg someotherdir/*.ext ?
Thanks!
Mauro
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
