You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Bernard Sirius <pe...@hotmail.com> on 2004/06/07 11:53:48 UTC
how to add a copy task to a jar "goal"
Hi,
I'm a bit confused by the maven build system and that's why I address this question to both the Maven and AndroMDA user lists (I'm a Maven user by being an AndroMDA one).
it's very simple: I have added some classes to the common subtree which rely on some resources that I load from the ClassLoader. Hence they (the resources) have to be in the classpath. I managed to copy them to the classes alonside my compiled sources, but then the jar task (or whatever stands for it) just ignores them provided, I suppose, they have nothing to do with bytecodes.
The problem is: I cannot find anything like a "jar task". There are everywhere things like jar:install or deploy "goals", with nowhere a specification of what it's supposed to do.
Can somebody help ?
Thanks in advance,
Bernard
Re: how to add a copy task to a jar "goal"
Posted by Jesper Linvald <JE...@maerskdata.dk>.
Maven supplies default goals for the most common tasks - jar is one of
these.
" jar" is a goal from the java plugin.....
http://maven.apache.org/reference/plugins/java/goals.html
In the maven.xml file you can extend these goal like this:
<goal name="java:jar></goal>...will override the default goal
<preGoal name="java:jar
<postGoal name...
will be run before and after the java:jar goal
Hope this points you in the right direction...
Jesper Linvald
MAERSK DATA TRANSPORT
Tel no.: +45 3911 1891
e-mail: JELI@maerskdata.dk
"Bernard Sirius" <pe...@hotmail.com>
07-06-2004 11:53
Please respond to
"Maven Users List" <us...@maven.apache.org>
To
<us...@maven.apache.org>
cc
<an...@lists.sourceforge.net>
Subject
how to add a copy task to a jar "goal"
Hi,
I'm a bit confused by the maven build system and that's why I address this
question to both the Maven and AndroMDA user lists (I'm a Maven user by
being an AndroMDA one).
it's very simple: I have added some classes to the common subtree which
rely on some resources that I load from the ClassLoader. Hence they (the
resources) have to be in the classpath. I managed to copy them to the
classes alonside my compiled sources, but then the jar task (or whatever
stands for it) just ignores them provided, I suppose, they have nothing to
do with bytecodes.
The problem is: I cannot find anything like a "jar task". There are
everywhere things like jar:install or deploy "goals", with nowhere a
specification of what it's supposed to do.
Can somebody help ?
Thanks in advance,
Bernard