You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Michael Owen <mi...@hotmail.com> on 2005/07/27 13:00:24 UTC
Multiproject resources problem
Hi,
I have a problem when doing jar:install in a multiproject scenerio. In my
individual project I have:
<resources>
<resource>
<directory>${basedir}/build/testclasses</directory>
<includes>
<include>**/*</include>
</includes>
</resource>
</resources>
to include the testclasses into the produced jar when I do jar:install. This
happens when doing it for the individual project, but when done as a goal
for a multiproject goal ie:
<goal name="multi:build">
<j:set var="goal" value="jar:install"/>
<attainGoal name="multiproject:goal"/>
</goal>
The testclasses don't get put into the jar. Any help? Looked on the
multiproject plugin documentation page and it says to use ${basedir} to
solve the problem, but I've done that.
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Multiproject resources problem
Posted by Dennis Geurts <de...@gmail.com>.
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 <mi...@hotmail.com> 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
> <de...@gmail.com><br>>Reply-To: Dennis Geurts
> <de...@gmail.com><br>>To: Maven Users List
> <us...@maven.apache.org><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
> <de...@gmail.com> 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
> <mi...@hotmail.com> 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>> >
> > <de...@gmail.com><br>>Reply-To: Dennis
> Geurts<br>> > > <de...@gmail.com><br>>To:
> Maven Users List<br>> > >
> <us...@maven.apache.org><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>> > > <mi...@hotmail.com>
> 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>> > >
> <de...@gmail.com><br>>Reply-To: Dennis
> Geurts<br>><br>> > > >
> <de...@gmail.com><br>>To: Maven Users<br>> >
> > List<br>> >
> <us...@maven.apache.org><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>> > <
> michaelowenuk@hotmail.com> 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>> > >
> users-unsubscribe@maven.apache.org<br>> ><br>> >
> For<br>> > > additional commands, e-mail:<br>> > >
> users-help@maven.apache.org <br>><br>> >
> ><br>><br>> > > ><br><br>>
> ><br>> ><br>> ><br>> ><br>> >
> >
>
> ---------------------------------------------------------------------<br>><br>>
> > ><br>> > > > To unsubscribe, e-mail:
> users-unsubscribe@maven.apache.org<br>> ><br>> > > For
> additional commands, e-mail:
> users-help@maven.apache.org<br>><br>> > >
> ><br>> ><br><br>> > ><br>> >
> ><br>> > ><br>> > >
> ---------------------------------------------------------------------<br>>
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org<br>>
> > > For additional commands, e-mail:
> users-help@maven.apache.org<br>> > ><br>> > ><br>>
> ><br>
>
>
>
Re: Multiproject resources problem
Posted by Michael Owen <mi...@hotmail.com>.
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
<dennis.geurts@gmail.com><br>>Reply-To: Dennis Geurts
<dennis.geurts@gmail.com><br>>To: Maven Users List
<users@maven.apache.org><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
<dennis.geurts@gmail.com> 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
<michaelowenuk@hotmail.com> 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>> >
> <dennis.geurts@gmail.com><br>>Reply-To: Dennis
Geurts<br>> > > <dennis.geurts@gmail.com><br>>To:
Maven Users List<br>> > >
<users@maven.apache.org><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>> > > <michaelowenuk@hotmail.com>
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>> > >
<dennis.geurts@gmail.com><br>>Reply-To: Dennis
Geurts<br>><br>> > > >
<dennis.geurts@gmail.com><br>>To: Maven Users<br>> >
> List<br>> >
<users@maven.apache.org><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>> > <
michaelowenuk@hotmail.com> 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>> > >
users-unsubscribe@maven.apache.org<br>> ><br>> >
For<br>> > > additional commands, e-mail:<br>> > >
users-help@maven.apache.org <br>><br>> >
><br>><br>> > > ><br><br>>
><br>> ><br>> ><br>> ><br>> >
>
---------------------------------------------------------------------<br>><br>>
> ><br>> > > > To unsubscribe, e-mail:
users-unsubscribe@maven.apache.org<br>> ><br>> > > For
additional commands, e-mail:
users-help@maven.apache.org<br>><br>> > >
><br>> ><br><br>> > ><br>> >
><br>> > ><br>> > >
---------------------------------------------------------------------<br>>
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org<br>>
> > For additional commands, e-mail:
users-help@maven.apache.org<br>> > ><br>> > ><br>>
><br>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Multiproject resources problem
Posted by Dennis Geurts <de...@gmail.com>.
sorry 'java:jar-resources' that is...
On 7/27/05, Dennis Geurts <de...@gmail.com> wrote:
>
> great !!
> instead of running the tests twice, will it work to add as postGoal to
> 'test:compile' the goal 'jar:jar-resources' ?
> Dennis
> On 7/27/05, Michael Owen <mi...@hotmail.com> wrote:
> >
> >
> > Spot on. :) Just figured it out myself too. I have to put a test:test
> > goal
> > before, so the test classes are compiled. So with the test being done
> > again
> > for jar:install, it means the tests are carried out twice.
> >
> > Mike
> >
> > <br><br><br>>From: Dennis Geurts
> > <de...@gmail.com><br>>Reply-To: Dennis Geurts
> > <de...@gmail.com><br>>To: Maven Users List
> > <us...@maven.apache.org><br>>Subject: Re: Multiproject resources
> > problem<br>>Date: Wed, 27 Jul 2005 14:16:31 +0200<br>><br>>ok,
> > reasonable, just checking...<br>> the 'java:jar-resources' goal that
> > should copy your test-classes comes<br>>before the 'test:compile'
> > goal<br>> could it be that you start with a clean (multi)project ??
> > the<br>>'build/testclasses' dir will still be empty,<br>>and you'll
> > copying all the files that are there (that is to say: none at<br>>all)
> > ;-)<br>> Dennis<br>><br>> On 7/27/05, Michael Owen
> > <mi...@hotmail.com> wrote:<br>> ><br>> ><br>>
> > > No. I've changed it to put the test classes into that
> > directory.<br>> ><br>> > Mike<br>> ><br>> >
> > <br><br><br>>From: Dennis Geurts<br>> >
> > <de...@gmail.com><br>>Reply-To: Dennis Geurts<br>>
> > > <de...@gmail.com><br>>To: Maven Users
> > List<br>> > <us...@maven.apache.org><br>>Subject: Re:
> > Multiproject resources<br>> > problem<br>>Date: Wed, 27 Jul
> > 2005 13:16:56<br>> >
> > +0200<br>><br>>Michael,<br>> you
> > specify:<br>><br>> >
> > <directory>${basedir}/build/testclasses</directory><br>><br>>
> > > shouldn't that<br>> >
> > be:<br>><directory>${basedir}/target/test-classes</directory><br>><br>>
> > > ??<br>> Dennis<br>><br>> On 7/27/05, Michael
> > Owen<br>> > < michaelowenuk@hotmail.com> wrote:<br>>
> > ><br>> ><br>><br>> > > Hi,<br>>
> > ><br>> > I have a problem when doing jar:install<br>> >
> > in a multiproject scenerio. In my<br>> > individual project
> > I<br>> > have:<br>> ><br>> >
> > <resources><br>> ><br>> >
> > <resource><br>> ><br>> >
> > <directory>${basedir}/build/testclasses</directory><br>>
> > ><br>> > <includes><br>> >
> > <include>**/*</include><br>><br>> > >
> > </includes><br>> > </resource><br>>
> > ><br>> > </resources><br>> ><br>> >
> > to include the testclasses into<br>> > the produced jar when I do
> > jar:install.<br>> > This<br>> ><br>> > happens
> > when doing it for the individual project, but when done as a<br>> >
> > goal<br>> > for a multiproject goal ie:<br>>
> > ><br>> ><br>> > <goal
> > name="multi:build"><br>> > <j:set<br>> >
> > var="goal" value="jar:install"/><br>>
> > ><br>> > <attainGoal
> > name="multiproject:goal"/><br>> ><br>> >
> > </goal><br>> ><br>> > The testclasses don't
> > get put into<br>> > the jar. Any help? Looked on the<br>>
> > > multiproject plugin<br>> > documentation page and it says to use
> > ${basedir} to<br>> > solve the<br>> > problem, but I've
> > done that.<br>> ><br>> > Mike<br>><br>>
> > > ><br>> ><br>> ><br>> ><br>>
> > >
> >
> > ---------------------------------------------------------------------<br>><br>>
> > > > To unsubscribe, e-mail:
> > users-unsubscribe@maven.apache.org<br>> ><br>> > For
> > additional commands, e-mail:
> > users-help@maven.apache.org <br>><br>> > ><br>>
> > ><br><br>> ><br>> ><br>> ><br>> >
> > ---------------------------------------------------------------------<br>>
> >
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org<br>> >
> > For additional commands, e-mail: users-help@maven.apache.org<br>>
> > ><br>> ><br>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
Re: Multiproject resources problem
Posted by Dennis Geurts <de...@gmail.com>.
great !!
instead of running the tests twice, will it work to add as postGoal to
'test:compile' the goal 'jar:jar-resources' ?
Dennis
On 7/27/05, Michael Owen <mi...@hotmail.com> wrote:
>
>
> Spot on. :) Just figured it out myself too. I have to put a test:test goal
> before, so the test classes are compiled. So with the test being done
> again
> for jar:install, it means the tests are carried out twice.
>
> Mike
>
> <br><br><br>>From: Dennis Geurts
> <de...@gmail.com><br>>Reply-To: Dennis Geurts
> <de...@gmail.com><br>>To: Maven Users List
> <us...@maven.apache.org><br>>Subject: Re: Multiproject resources
> problem<br>>Date: Wed, 27 Jul 2005 14:16:31 +0200<br>><br>>ok,
> reasonable, just checking...<br>> the 'java:jar-resources' goal that
> should copy your test-classes comes<br>>before the 'test:compile'
> goal<br>> could it be that you start with a clean (multi)project ??
> the<br>>'build/testclasses' dir will still be empty,<br>>and you'll
> copying all the files that are there (that is to say: none at<br>>all)
> ;-)<br>> Dennis<br>><br>> On 7/27/05, Michael Owen
> <mi...@hotmail.com> wrote:<br>> ><br>> ><br>>
> > No. I've changed it to put the test classes into that
> directory.<br>> ><br>> > Mike<br>> ><br>> >
> <br><br><br>>From: Dennis Geurts<br>> >
> <de...@gmail.com><br>>Reply-To: Dennis Geurts<br>>
> > <de...@gmail.com><br>>To: Maven Users
> List<br>> > <us...@maven.apache.org><br>>Subject: Re:
> Multiproject resources<br>> > problem<br>>Date: Wed, 27 Jul
> 2005 13:16:56<br>> >
> +0200<br>><br>>Michael,<br>> you
> specify:<br>><br>> >
> <directory>${basedir}/build/testclasses</directory><br>><br>>
> > shouldn't that<br>> >
> be:<br>><directory>${basedir}/target/test-classes</directory><br>><br>>
> > ??<br>> Dennis<br>><br>> On 7/27/05, Michael
> Owen<br>> > <mi...@hotmail.com> wrote:<br>>
> ><br>> ><br>><br>> > > Hi,<br>>
> ><br>> > I have a problem when doing jar:install<br>> >
> in a multiproject scenerio. In my<br>> > individual project
> I<br>> > have:<br>> ><br>> >
> <resources><br>> ><br>> >
> <resource><br>> ><br>> >
> <directory>${basedir}/build/testclasses</directory><br>>
> ><br>> > <includes><br>> >
> <include>**/*</include><br>><br>> > >
> </includes><br>> > </resource><br>>
> ><br>> > </resources><br>> ><br>> >
> to include the testclasses into<br>> > the produced jar when I do
> jar:install.<br>> > This<br>> ><br>> > happens
> when doing it for the individual project, but when done as a<br>> >
> goal<br>> > for a multiproject goal ie:<br>>
> ><br>> ><br>> > <goal
> name="multi:build"><br>> > <j:set<br>> >
> var="goal" value="jar:install"/><br>>
> ><br>> > <attainGoal
> name="multiproject:goal"/><br>> ><br>> >
> </goal><br>> ><br>> > The testclasses don't
> get put into<br>> > the jar. Any help? Looked on the<br>>
> > multiproject plugin<br>> > documentation page and it says to use
> ${basedir} to<br>> > solve the<br>> > problem, but I've
> done that.<br>> ><br>> > Mike<br>><br>>
> > ><br>> ><br>> ><br>> ><br>>
> >
>
> ---------------------------------------------------------------------<br>><br>>
> > > To unsubscribe, e-mail:
> users-unsubscribe@maven.apache.org<br>> ><br>> > For
> additional commands, e-mail:
> users-help@maven.apache.org<br>><br>> > ><br>>
> ><br><br>> ><br>> ><br>> ><br>> >
> ---------------------------------------------------------------------<br>>
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org<br>> >
> For additional commands, e-mail: users-help@maven.apache.org<br>>
> ><br>> ><br>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: Multiproject resources problem
Posted by Michael Owen <mi...@hotmail.com>.
Spot on. :) Just figured it out myself too. I have to put a test:test goal
before, so the test classes are compiled. So with the test being done again
for jar:install, it means the tests are carried out twice.
Mike
<br><br><br>>From: Dennis Geurts
<dennis.geurts@gmail.com><br>>Reply-To: Dennis Geurts
<dennis.geurts@gmail.com><br>>To: Maven Users List
<users@maven.apache.org><br>>Subject: Re: Multiproject resources
problem<br>>Date: Wed, 27 Jul 2005 14:16:31 +0200<br>><br>>ok,
reasonable, just checking...<br>> the 'java:jar-resources' goal that
should copy your test-classes comes<br>>before the 'test:compile'
goal<br>> could it be that you start with a clean (multi)project ??
the<br>>'build/testclasses' dir will still be empty,<br>>and you'll
copying all the files that are there (that is to say: none at<br>>all)
;-)<br>> Dennis<br>><br>> On 7/27/05, Michael Owen
<michaelowenuk@hotmail.com> wrote:<br>> ><br>> ><br>>
> No. I've changed it to put the test classes into that
directory.<br>> ><br>> > Mike<br>> ><br>> >
<br><br><br>>From: Dennis Geurts<br>> >
<dennis.geurts@gmail.com><br>>Reply-To: Dennis Geurts<br>>
> <dennis.geurts@gmail.com><br>>To: Maven Users
List<br>> > <users@maven.apache.org><br>>Subject: Re:
Multiproject resources<br>> > problem<br>>Date: Wed, 27 Jul
2005 13:16:56<br>> >
+0200<br>><br>>Michael,<br>> you
specify:<br>><br>> >
<directory>${basedir}/build/testclasses</directory><br>><br>>
> shouldn't that<br>> >
be:<br>><directory>${basedir}/target/test-classes</directory><br>><br>>
> ??<br>> Dennis<br>><br>> On 7/27/05, Michael
Owen<br>> > <michaelowenuk@hotmail.com> wrote:<br>>
><br>> ><br>><br>> > > Hi,<br>>
><br>> > I have a problem when doing jar:install<br>> >
in a multiproject scenerio. In my<br>> > individual project
I<br>> > have:<br>> ><br>> >
<resources><br>> ><br>> >
<resource><br>> ><br>> >
<directory>${basedir}/build/testclasses</directory><br>>
><br>> > <includes><br>> >
<include>**/*</include><br>><br>> > >
</includes><br>> > </resource><br>>
><br>> > </resources><br>> ><br>> >
to include the testclasses into<br>> > the produced jar when I do
jar:install.<br>> > This<br>> ><br>> > happens
when doing it for the individual project, but when done as a<br>> >
goal<br>> > for a multiproject goal ie:<br>>
><br>> ><br>> > <goal
name="multi:build"><br>> > <j:set<br>> >
var="goal" value="jar:install"/><br>>
><br>> > <attainGoal
name="multiproject:goal"/><br>> ><br>> >
</goal><br>> ><br>> > The testclasses don't
get put into<br>> > the jar. Any help? Looked on the<br>>
> multiproject plugin<br>> > documentation page and it says to use
${basedir} to<br>> > solve the<br>> > problem, but I've
done that.<br>> ><br>> > Mike<br>><br>>
> ><br>> ><br>> ><br>> ><br>>
>
---------------------------------------------------------------------<br>><br>>
> > To unsubscribe, e-mail:
users-unsubscribe@maven.apache.org<br>> ><br>> > For
additional commands, e-mail:
users-help@maven.apache.org<br>><br>> > ><br>>
><br><br>> ><br>> ><br>> ><br>> >
---------------------------------------------------------------------<br>>
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org<br>> >
For additional commands, e-mail: users-help@maven.apache.org<br>>
><br>> ><br>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Multiproject resources problem
Posted by Dennis Geurts <de...@gmail.com>.
ok, reasonable, just checking...
the 'java:jar-resources' goal that should copy your test-classes comes
before the 'test:compile' goal
could it be that you start with a clean (multi)project ?? the
'build/testclasses' dir will still be empty,
and you'll copying all the files that are there (that is to say: none at
all) ;-)
Dennis
On 7/27/05, Michael Owen <mi...@hotmail.com> wrote:
>
>
> No. I've changed it to put the test classes into that directory.
>
> Mike
>
> <br><br><br>>From: Dennis Geurts
> <de...@gmail.com><br>>Reply-To: Dennis Geurts
> <de...@gmail.com><br>>To: Maven Users List
> <us...@maven.apache.org><br>>Subject: Re: Multiproject resources
> problem<br>>Date: Wed, 27 Jul 2005 13:16:56
> +0200<br>><br>>Michael,<br>> you specify:<br>>
> <directory>${basedir}/build/testclasses</directory><br>>
> shouldn't that
> be:<br>><directory>${basedir}/target/test-classes</directory><br>>
> ??<br>> Dennis<br>><br>> On 7/27/05, Michael Owen
> <mi...@hotmail.com> wrote:<br>> ><br>> ><br>>
> > Hi,<br>> ><br>> > I have a problem when doing jar:install
> in a multiproject scenerio. In my<br>> > individual project I
> have:<br>> ><br>> > <resources><br>> >
> <resource><br>> >
> <directory>${basedir}/build/testclasses</directory><br>> >
> <includes><br>> > <include>**/*</include><br>>
> > </includes><br>> > </resource><br>> >
> </resources><br>> ><br>> > to include the testclasses into
> the produced jar when I do jar:install.<br>> > This<br>> >
> happens when doing it for the individual project, but when done as a
> goal<br>> > for a multiproject goal ie:<br>> ><br>> >
> <goal name="multi:build"><br>> > <j:set
> var="goal" value="jar:install"/><br>> >
> <attainGoal name="multiproject:goal"/><br>> >
> </goal><br>> ><br>> > The testclasses don't get put into
> the jar. Any help? Looked on the<br>> > multiproject plugin
> documentation page and it says to use ${basedir} to<br>> > solve the
> problem, but I've done that.<br>> ><br>> > Mike<br>>
> ><br>> ><br>> ><br>> >
> ---------------------------------------------------------------------<br>>
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org<br>> >
> For additional commands, e-mail: users-help@maven.apache.org<br>>
> ><br>> ><br>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: Multiproject resources problem
Posted by Michael Owen <mi...@hotmail.com>.
No. I've changed it to put the test classes into that directory.
Mike
<br><br><br>>From: Dennis Geurts
<dennis.geurts@gmail.com><br>>Reply-To: Dennis Geurts
<dennis.geurts@gmail.com><br>>To: Maven Users List
<users@maven.apache.org><br>>Subject: Re: Multiproject resources
problem<br>>Date: Wed, 27 Jul 2005 13:16:56
+0200<br>><br>>Michael,<br>> you specify:<br>>
<directory>${basedir}/build/testclasses</directory><br>>
shouldn't that
be:<br>><directory>${basedir}/target/test-classes</directory><br>>
??<br>> Dennis<br>><br>> On 7/27/05, Michael Owen
<michaelowenuk@hotmail.com> wrote:<br>> ><br>> ><br>>
> Hi,<br>> ><br>> > I have a problem when doing jar:install
in a multiproject scenerio. In my<br>> > individual project I
have:<br>> ><br>> > <resources><br>> >
<resource><br>> >
<directory>${basedir}/build/testclasses</directory><br>> >
<includes><br>> > <include>**/*</include><br>>
> </includes><br>> > </resource><br>> >
</resources><br>> ><br>> > to include the testclasses into
the produced jar when I do jar:install.<br>> > This<br>> >
happens when doing it for the individual project, but when done as a
goal<br>> > for a multiproject goal ie:<br>> ><br>> >
<goal name="multi:build"><br>> > <j:set
var="goal" value="jar:install"/><br>> >
<attainGoal name="multiproject:goal"/><br>> >
</goal><br>> ><br>> > The testclasses don't get put into
the jar. Any help? Looked on the<br>> > multiproject plugin
documentation page and it says to use ${basedir} to<br>> > solve the
problem, but I've done that.<br>> ><br>> > Mike<br>>
><br>> ><br>> ><br>> >
---------------------------------------------------------------------<br>>
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org<br>> >
For additional commands, e-mail: users-help@maven.apache.org<br>>
><br>> ><br>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Multiproject resources problem
Posted by Dennis Geurts <de...@gmail.com>.
Michael,
you specify:
<directory>${basedir}/build/testclasses</directory>
shouldn't that be:
<directory>${basedir}/target/test-classes</directory>
??
Dennis
On 7/27/05, Michael Owen <mi...@hotmail.com> wrote:
>
>
> Hi,
>
> I have a problem when doing jar:install in a multiproject scenerio. In my
> individual project I have:
>
> <resources>
> <resource>
> <directory>${basedir}/build/testclasses</directory>
> <includes>
> <include>**/*</include>
> </includes>
> </resource>
> </resources>
>
> to include the testclasses into the produced jar when I do jar:install.
> This
> happens when doing it for the individual project, but when done as a goal
> for a multiproject goal ie:
>
> <goal name="multi:build">
> <j:set var="goal" value="jar:install"/>
> <attainGoal name="multiproject:goal"/>
> </goal>
>
> The testclasses don't get put into the jar. Any help? Looked on the
> multiproject plugin documentation page and it says to use ${basedir} to
> solve the problem, but I've done that.
>
> Mike
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>