I had a similar problem two days ago. Is the java:jar goal up to date
with the latest schema?
The schema on CVS head suggests <resources> should look something like
this:
<build>
...
<resources>
<resource>
<directory>src/</directory>
<targetPath>target/</targetPath>
<includes>
<include>*</include>
</includes>
<excludes>
<exclude>*<exclude>
</excludes>
</resource>
...
</resources>
</build>
However, AFAIK the java:jar-resource goal doesn't even look at
<directory> and <targetPath>. In fact, I think it's not even looking
for
<resources>
<resource>...
but for
<resources>
<includes>
Now, this is my first time looking at jelly, but it seems easy enough
(actually, it looks rather cool), so perhaps I'm misunderstanding the
code.
If this is the problem, a patch would be pretty easy to write. I guess
I'm just looking for confirmation.
Thanks,
jaaron
On Sun, 2003-01-26 at 08:48, Ben Walding wrote:
> Here's how you go about answering this question for yourself!
>
> 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]>
--
jaaron <[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>