Mike,
from your last e-mail can I conclude that tou are creating a new plugin
called 'maven-multi-plugin'
that (among others) contains the goals 'build' ?
or are you altering the plugin.jelly of the multiproject plugin ?
another question: does 'project:build' resolve to a valid goal for the
subprojects ??
Furthermore: what are you really trying to accomplish ??
I assumed you where having a multiproject setup and for only one of the
subprojects, you just wanted to include the test-classes.
<goal name="multi:build">
<j:set var="goal" value="jar:install"/>
<attainGoal name="multiproject:goal"/>
</goal>
would then essentially be the same as invoking 'maven multiproject:install'
(assuming the subprojects are all of type jar)
where the 'special' subproject has a maven.xml with your resource
definition, and the correct 'postGoal' to copy the test-classes.
creating a new plugin for the specified behaviour is nice, but (although
I'm not an expert) I think this is better
accomplished by doing something with the jelly code from
'java:jar-resources' goal:
<goal name="java:jar-resources"
description="Copy any resources that must be present in the deployed JAR
file">
<j:if test="${!pom.build.resources.isEmpty()}">
<maven:copy-resources
resources="${pom.build.resources}"
todir="${maven.build.dest}"/>
</j:if>
</goal>
dennis
On 7/27/05, Michael Owen <[EMAIL PROTECTED]> wrote:
>
>
> Yes. My problem now is that when I put this in plugin.jelly:
>
> <!-- Goal to do the dest goal for all subprojects -->
> <goal name="multi:build">
>
> <j:set var="goal" value="project:build"/>
> <attainGoal name="multiproject:goal"/>
>
> </goal>
>
> I get the error:
>
> BUILD FAILED
> File...... C:\Documents and
> Settings\owenm\.maven\cache\maven-multiproject-plugi
> n-1.3.1\plugin.jelly
> Element... maven:param-check
> Line...... 207
> Column.... 54
> A goal to run must be specified, e.g.
> maven -Dgoal=clean multiproject:goal
> Total time: 3 seconds
> Finished at: Wed Jul 27 14:26:22 BST 2005
>
>
> Whereas if I put the same code in a local maven.xml file, it works??? The
> idea of putting the goal into a plugin is that I can share it with other
> projects later.
>
> Mike
>
>
> <br><br><br>>From: Dennis Geurts
> <[EMAIL PROTECTED]><br>>Reply-To: Dennis Geurts
> <[EMAIL PROTECTED]><br>>To: Maven Users List
> <[email protected]><br>>Subject: Re: Multiproject resources
> problem<br>>Date: Wed, 27 Jul 2005 14:40:42 +0200<br>><br>>sorry
> 'java:jar-resources' that is...<br>><br>>On 7/27/05, Dennis Geurts
> <[EMAIL PROTECTED]> wrote:<br>> ><br>> > great
> !!<br>> > instead of running the tests twice, will it work to add as
> postGoal to<br>> > 'test:compile' the goal 'jar:jar-resources'
> ?<br>> > Dennis<br>> > On 7/27/05, Michael Owen
> <[EMAIL PROTECTED]> wrote:<br>> > ><br>> >
> ><br>> > > Spot on. :) Just figured it out myself too. I have to
> put a test:test<br>> > > goal<br>> > > before, so the test
> classes are compiled. So with the test being done<br>> > >
> again<br>> > > for jar:install, it means the tests are carried out
> twice.<br>> > ><br>> > > Mike<br>> > ><br>>
> > > <br><br><br>>From: Dennis Geurts<br>> >
> > <[EMAIL PROTECTED]><br>>Reply-To: Dennis
> Geurts<br>> > > <[EMAIL PROTECTED]><br>>To:
> Maven Users List<br>> > >
> <[email protected]><br>>Subject: Re: Multiproject
> resources<br>> > > problem<br>>Date: Wed, 27 Jul 2005
> 14:16:31 +0200<br>><br>>ok,<br>> > > reasonable,
> just checking...<br>> the 'java:jar-resources' goal that<br>>
> > > should copy your test-classes comes<br>>before the
> 'test:compile'<br>> > > goal<br>> could it be that you
> start with a clean (multi)project ??<br>> > >
> the<br>>'build/testclasses' dir will still be
> empty,<br>>and you'll<br>> > > copying all the files that
> are there (that is to say: none at<br>>all)<br>> > >
> ;-)<br>> Dennis<br>><br>> On 7/27/05, Michael
> Owen<br>> > > <[EMAIL PROTECTED]>
> wrote:<br>> ><br>> ><br>><br>> > >
> > No. I've changed it to put the test classes into that<br>> > >
> directory.<br>> ><br>> > Mike<br>>
> ><br>> ><br>> > >
> <br><br><br>>From: Dennis Geurts<br>>
> ><br>> > >
> <[EMAIL PROTECTED]><br>>Reply-To: Dennis
> Geurts<br>><br>> > > >
> <[EMAIL PROTECTED]><br>>To: Maven Users<br>> >
> > List<br>> >
> <[email protected]><br>>Subject: Re:<br>> > >
> Multiproject resources<br>> > problem<br>>Date: Wed, 27
> Jul<br>> > > 2005 13:16:56<br>> ><br>> > >
> +0200<br>><br>>Michael,<br>> you<br>> >
> > specify:<br>><br>> ><br>> > >
> <directory>${basedir}/build/testclasses</directory><br>><br>><br>>
> > > > shouldn't that<br>> ><br>> > >
>
> be:<br>><directory>${basedir}/target/test-classes</directory><br>><br>><br>>
> > > > ??<br>> Dennis<br>><br>> On
> 7/27/05, Michael<br>> > > Owen<br>> > <
> [EMAIL PROTECTED]> wrote:<br>><br>> > >
> ><br>> ><br>><br>> > >
> Hi,<br>><br>> > > ><br>> > I have a problem
> when doing jar:install<br>> ><br>> > > in a
> multiproject scenerio. In my<br>> > individual project<br>>
> > > I<br>> > have:<br>> ><br>>
> ><br>> > > <resources><br>> ><br>>
> ><br>> > > <resource><br>> ><br>>
> ><br>> > >
> <directory>${basedir}/build/testclasses</directory><br>><br>>
> > > ><br>> > <includes><br>>
> ><br>> > >
> <include>**/*</include><br>><br>> >
> ><br>> > > </includes><br>> >
> </resource><br>><br>> > > ><br>> >
> </resources><br>> ><br>> ><br>> > >
> to include the testclasses into<br>> > the produced jar when I
> do<br>> > > jar:install.<br>> > This<br>>
> ><br>> > happens<br>> > > when doing it for the
> individual project, but when done as a<br>> ><br>> > >
> goal<br>> > for a multiproject goal ie:<br>><br>>
> > > ><br>> ><br>> > <goal<br>> >
> > name="multi:build"><br>> >
> <j:set<br>> ><br>> > > var="goal"
> value="jar:install"/><br>><br>> > >
> ><br>> > <attainGoal<br>> > >
> name="multiproject:goal"/><br>> ><br>>
> ><br>> > > </goal><br>> ><br>> >
> The testclasses don't<br>> > > get put into<br>> > the
> jar. Any help? Looked on the<br>><br>> > > >
> multiproject plugin<br>> > documentation page and it says to
> use<br>> > > ${basedir} to<br>> > solve
> the<br>> > problem, but I've<br>> > > done
> that.<br>> ><br>> >
> Mike<br>><br>><br>> > > > ><br>>
> ><br>> ><br>> ><br>><br>> > >
> ><br>> > ><br>> > >
>
> ---------------------------------------------------------------------<br>><br>><br>>
> > > > > To unsubscribe, e-mail:<br>> > >
> [EMAIL PROTECTED]<br>> ><br>> >
> For<br>> > > additional commands, e-mail:<br>> > >
> [EMAIL PROTECTED] <br>><br>> >
> ><br>><br>> > > ><br><br>>
> ><br>> ><br>> ><br>> ><br>> >
> >
>
> ---------------------------------------------------------------------<br>><br>>
> > ><br>> > > > To unsubscribe, e-mail:
> [EMAIL PROTECTED]<br>> ><br>> > > For
> additional commands, e-mail:
> [EMAIL PROTECTED]<br>><br>> > >
> ><br>> ><br><br>> > ><br>> >
> ><br>> > ><br>> > >
> ---------------------------------------------------------------------<br>>
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]<br>>
> > > For additional commands, e-mail:
> [EMAIL PROTECTED]<br>> > ><br>> > ><br>>
> ><br>
>
>
>