You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jörg Schaible <Jo...@Elsag-Solutions.com> on 2005/07/01 08:05:35 UTC

RE: Resources not being found by test plugin

Erick Dovale wrote on Thursday, June 30, 2005 6:56 PM:

> Btw, the repeated resources in POM was removed and problem persisted.
> It seems like the classpath is not been properly constructed.
> Has anyone had this issue before.

Only, if the paths are wrong.

> I am using Maven 1.0.2

Me too.

[snip]

> <unitTestSourceDirectory>source/testSrc</unitTestSourceDirectory>    
>             <unitTest> <includes>
>                 <include>**/*Test.java</include>
>             </includes>
>                     <resources>
>                         <resource>
>                             <directory>resources</directory>
>                             <filtering>false</filtering>
>                                             <includes>
> 
> <include>**/*</include>
>                                             </includes>
>                             <targetPath>resources</targetPath>
>                         </resource>
>                         <resource>
>                             <directory>resources</directory>
>                             <filtering>false</filtering>
>                                             <includes>
> 
> <include>**/*</include>
>                                             </includes>
>                             <targetPath>resources</targetPath>
>                         </resource>
>                     </resources>
>         </unitTest>
>         <resources>
>             <resource>
>                 <directory>resources</directory>
>                 <targetPath>resources</targetPath>
>                 <filtering>false</filtering>
>                                 <includes>
>                                     <include>**/*</include>
>                                 </includes>
>             </resource>
>         </resources>
>     </build>

[snip]

So you have a "resources" directory in your project root? And you want your resources to be copied into target/classes/resources and as well into target/test-classes/resources? That's what you've told Maven.

- Jörg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: can not build with maven 1.1 beta 1

Posted by Arnaud HERITIER <ah...@gmail.com>.
Hi Dion,

I think that my fix doesn't work with maven 1.0. 
As it was commented on the issue, we should use reflection to make it work with maven 1.0 and 1.1.
I'm not sure I'll be able to do it this week.

If someone else want to do the patch before .... I'll apply it and we'll be able to release the plugin.

We'll certainly release a maven 1.1 beta 2 with a new set of plugins this month.

Arnaud


 

> -----Message d'origine-----
> De : Dion Gillard [mailto:dion.gillard@gmail.com] 
> Envoyé : lundi 4 juillet 2005 03:00
> À : Maven Users List
> Objet : Re: can not build with maven 1.1 beta 1
> 
> Is there going to be a release of the plugin?
> 
> On 7/4/05, Arnaud HERITIER <ah...@gmail.com> wrote:
> > This problem is due to the fact that the plugin was build 
> with maven 1.0.
> > I just published a new SNAPSHOT (built with maven 1.1) that 
> fixes (temporarly) this issue.
> > You can download it with this command :
> > 
> > maven plugin:download 
> > -Dmaven.repo.remote=http://cvs.apache.org/repository 
> -DgroupId=maven 
> > -DartifactId=maven-artifact-plugin
> > -Dversion=SNAPSHOT
> > 
> > Arnaud
> > 
> > > -----Message d'origine-----
> > > De : Dion Gillard [mailto:dion.gillard@gmail.com] Envoyé 
> : dimanche 
> > > 3 juillet 2005 09:21 À : Maven Users List Objet : Re: can 
> not build 
> > > with maven 1.1 beta 1
> > >
> > > It's a known issue.
> > >
> > > See http://jira.codehaus.org/browse/MAVEN-1625
> > >
> > > As yet, no released fix.
> > >
> > > On 7/1/05, Janos Mucsi <mu...@yahoo.com> wrote:
> > > > Hi
> > > > I am getting the following error when building a simple 
> a module:
> > > >
> > > > BUILD FAILED
> > > > File...... C:\Documents and
> > > > Settings\jmucsi\.maven\cache\maven-artifact-plugin-1
> > > > .5.2\plugin.jelly
> > > > Element... artifact:artifact-install Line...... 62 
> Column.... -1 
> > > > 
> org.apache.maven.project.Dependency.setProperties(Ljava/util/List;)V
> > > > Total time   : 3 seconds
> > > > Finished at  : Thursday, June 30, 2005 11:07:40 PM PDT
> > > >
> > > > Any ideas?
> > > >
> > > > thanks.
> > > >
> > > > Janos
> > > >
> > > >
> > >
> > >
> > > --
> > > http://www.multitask.com.au/people/dion/
> > > "You are going to let the fear of poverty govern your 
> life and your 
> > > reward will be that you will eat, but you will not live." 
> - George 
> > > Bernard Shaw
> > >
> > > 
> --------------------------------------------------------------------
> > > - To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > 
> > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> > 
> > 
> 
> 
> --
> http://www.multitask.com.au/people/dion/
> "You are going to let the fear of poverty govern your life 
> and your reward will be that you will eat, but you will not 
> live." - George Bernard Shaw
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: can not build with maven 1.1 beta 1

Posted by Dion Gillard <di...@gmail.com>.
Is there going to be a release of the plugin?

On 7/4/05, Arnaud HERITIER <ah...@gmail.com> wrote:
> This problem is due to the fact that the plugin was build with maven 1.0.
> I just published a new SNAPSHOT (built with maven 1.1) that fixes (temporarly) this issue.
> You can download it with this command :
> 
> maven plugin:download -Dmaven.repo.remote=http://cvs.apache.org/repository -DgroupId=maven -DartifactId=maven-artifact-plugin
> -Dversion=SNAPSHOT
> 
> Arnaud
> 
> > -----Message d'origine-----
> > De : Dion Gillard [mailto:dion.gillard@gmail.com]
> > Envoyé : dimanche 3 juillet 2005 09:21
> > À : Maven Users List
> > Objet : Re: can not build with maven 1.1 beta 1
> >
> > It's a known issue.
> >
> > See http://jira.codehaus.org/browse/MAVEN-1625
> >
> > As yet, no released fix.
> >
> > On 7/1/05, Janos Mucsi <mu...@yahoo.com> wrote:
> > > Hi
> > > I am getting the following error when building a simple a module:
> > >
> > > BUILD FAILED
> > > File...... C:\Documents and
> > > Settings\jmucsi\.maven\cache\maven-artifact-plugin-1
> > > .5.2\plugin.jelly
> > > Element... artifact:artifact-install
> > > Line...... 62
> > > Column.... -1
> > > org.apache.maven.project.Dependency.setProperties(Ljava/util/List;)V
> > > Total time   : 3 seconds
> > > Finished at  : Thursday, June 30, 2005 11:07:40 PM PDT
> > >
> > > Any ideas?
> > >
> > > thanks.
> > >
> > > Janos
> > >
> > >
> >
> >
> > --
> > http://www.multitask.com.au/people/dion/
> > "You are going to let the fear of poverty govern your life
> > and your reward will be that you will eat, but you will not
> > live." - George Bernard Shaw
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 


-- 
http://www.multitask.com.au/people/dion/
"You are going to let the fear of poverty govern your life and your
reward will be that you will eat, but you will not live." - George
Bernard Shaw

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: can not build with maven 1.1 beta 1

Posted by Arnaud HERITIER <ah...@gmail.com>.
This problem is due to the fact that the plugin was build with maven 1.0.
I just published a new SNAPSHOT (built with maven 1.1) that fixes (temporarly) this issue.
You can download it with this command :

maven plugin:download -Dmaven.repo.remote=http://cvs.apache.org/repository -DgroupId=maven -DartifactId=maven-artifact-plugin
-Dversion=SNAPSHOT

Arnaud

> -----Message d'origine-----
> De : Dion Gillard [mailto:dion.gillard@gmail.com] 
> Envoyé : dimanche 3 juillet 2005 09:21
> À : Maven Users List
> Objet : Re: can not build with maven 1.1 beta 1
> 
> It's a known issue.
> 
> See http://jira.codehaus.org/browse/MAVEN-1625
> 
> As yet, no released fix.
> 
> On 7/1/05, Janos Mucsi <mu...@yahoo.com> wrote:
> > Hi
> > I am getting the following error when building a simple a module:
> > 
> > BUILD FAILED
> > File...... C:\Documents and 
> > Settings\jmucsi\.maven\cache\maven-artifact-plugin-1
> > .5.2\plugin.jelly
> > Element... artifact:artifact-install
> > Line...... 62
> > Column.... -1
> > org.apache.maven.project.Dependency.setProperties(Ljava/util/List;)V
> > Total time   : 3 seconds
> > Finished at  : Thursday, June 30, 2005 11:07:40 PM PDT
> > 
> > Any ideas?
> > 
> > thanks.
> > 
> > Janos
> > 
> > 
> 
> 
> --
> http://www.multitask.com.au/people/dion/
> "You are going to let the fear of poverty govern your life 
> and your reward will be that you will eat, but you will not 
> live." - George Bernard Shaw
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: can not build with maven 1.1 beta 1

Posted by Dion Gillard <di...@gmail.com>.
It's a known issue.

See http://jira.codehaus.org/browse/MAVEN-1625

As yet, no released fix.

On 7/1/05, Janos Mucsi <mu...@yahoo.com> wrote:
> Hi
> I am getting the following error when building a simple a module:
> 
> BUILD FAILED
> File...... C:\Documents and Settings\jmucsi\.maven\cache\maven-artifact-plugin-1
> .5.2\plugin.jelly
> Element... artifact:artifact-install
> Line...... 62
> Column.... -1
> org.apache.maven.project.Dependency.setProperties(Ljava/util/List;)V
> Total time   : 3 seconds
> Finished at  : Thursday, June 30, 2005 11:07:40 PM PDT
> 
> Any ideas?
> 
> thanks.
> 
> Janos
> 
> 


-- 
http://www.multitask.com.au/people/dion/
"You are going to let the fear of poverty govern your life and your
reward will be that you will eat, but you will not live." - George
Bernard Shaw

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


can not build with maven 1.1 beta 1

Posted by Janos Mucsi <mu...@yahoo.com>.
Hi
I am getting the following error when building a simple a module:
 
BUILD FAILED
File...... C:\Documents and Settings\jmucsi\.maven\cache\maven-artifact-plugin-1
.5.2\plugin.jelly
Element... artifact:artifact-install
Line...... 62
Column.... -1
org.apache.maven.project.Dependency.setProperties(Ljava/util/List;)V
Total time   : 3 seconds
Finished at  : Thursday, June 30, 2005 11:07:40 PM PDT
 
Any ideas?
 
thanks.
 
Janos

RE: Resources not being found by test plugin

Posted by Erick Dovale <ed...@carosys.com>.
I totally agree with you about the preferred way to do it. In this case
however, changing the project structure is sort of difficult as the project
has been around for a while. I am just trying to mavenize an existing
project and need to respect the structure that's already in place. 
Now, what is the point of the targetPath element if it is not what I am
trying to use it for? In fact, it works; I can move resources around to
wherever I want. The only problem seems to be that it does not get added to
the classpath. 
What is the easiest way to achieve this?? 



-----Original Message-----
From: Kenney Westerhof [mailto:forge@neonics.com] 
Sent: July 1, 2005 11:11 AM
To: Maven Users List
Subject: RE: Resources not being found by test plugin

On Fri, 1 Jul 2005, Erick Dovale wrote:

You should remove the targetPath directive.

Say you've got a resource source/testSrc/resources/A.
This is copied to target/test-classes/resources/A.
Your resource is accessible under /resources/A (using
ClassLoader.findResource e.a.).

Normally you add the files under resources/ to the root of your classes
directory, so in this case A would be target/test-classes/A.

This is the preferred way usually; what if you need to create a WAR
and have some resources in /WEB-INF/? That dir would be in
sources/testSrc/resources/WEB-INF/ and should end up in
target/test-classes/WEB-INF/. Same goes for META-INF.

Greetings,

	Kenney Westerhof

>
> Yes, that is exactly what I told maven and it actually does it. The only
> problem is that the resources folder is not added to the classpath and
> therefore no resource into the folder is being found by my testes.
> The paths don't seem to be wrong as every single resource gets copied to
> target/classes/resources and to target/test-classes/resources.
> Perhaps there is a different way to achieve this??
>
> -----Original Message-----
> From: Jörg Schaible [mailto:Joerg.Schaible@Elsag-Solutions.com]
> Sent: July 1, 2005 2:06 AM
> To: Maven Users List
> Subject: RE: Resources not being found by test plugin
>
> Erick Dovale wrote on Thursday, June 30, 2005 6:56 PM:
>
> > Btw, the repeated resources in POM was removed and problem persisted.
> > It seems like the classpath is not been properly constructed.
> > Has anyone had this issue before.
>
> Only, if the paths are wrong.
>
> > I am using Maven 1.0.2
>
> Me too.
>
> [snip]
>
> > <unitTestSourceDirectory>source/testSrc</unitTestSourceDirectory>
> >             <unitTest> <includes>
> >                 <include>**/*Test.java</include>
> >             </includes>
> >                     <resources>
> >                         <resource>
> >                             <directory>resources</directory>
> >                             <filtering>false</filtering>
> >                                             <includes>
> >
> > <include>**/*</include>
> >                                             </includes>
> >                             <targetPath>resources</targetPath>
> >                         </resource>
> >                         <resource>
> >                             <directory>resources</directory>
> >                             <filtering>false</filtering>
> >                                             <includes>
> >
> > <include>**/*</include>
> >                                             </includes>
> >                             <targetPath>resources</targetPath>
> >                         </resource>
> >                     </resources>
> >         </unitTest>
> >         <resources>
> >             <resource>
> >                 <directory>resources</directory>
> >                 <targetPath>resources</targetPath>
> >                 <filtering>false</filtering>
> >                                 <includes>
> >                                     <include>**/*</include>
> >                                 </includes>
> >             </resource>
> >         </resources>
> >     </build>
>
> [snip]
>
> So you have a "resources" directory in your project root? And you want
your
> resources to be copied into target/classes/resources and as well into
> target/test-classes/resources? That's what you've told Maven.
>
> - Jörg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.323 / Virus Database: 267.8.8/35 - Release Date: 30/06/2005
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.323 / Virus Database: 267.8.8/35 - Release Date: 30/06/2005
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.323 / Virus Database: 267.8.8/35 - Release Date: 30/06/2005
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org



-- 
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.8/35 - Release Date: 30/06/2005


-- 
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.8/35 - Release Date: 30/06/2005
 

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.8/37 - Release Date: 01/07/2005
 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Resources not being found by test plugin

Posted by Kenney Westerhof <fo...@neonics.com>.
On Fri, 1 Jul 2005, Erick Dovale wrote:

You should remove the targetPath directive.

Say you've got a resource source/testSrc/resources/A.
This is copied to target/test-classes/resources/A.
Your resource is accessible under /resources/A (using
ClassLoader.findResource e.a.).

Normally you add the files under resources/ to the root of your classes
directory, so in this case A would be target/test-classes/A.

This is the preferred way usually; what if you need to create a WAR
and have some resources in /WEB-INF/? That dir would be in
sources/testSrc/resources/WEB-INF/ and should end up in
target/test-classes/WEB-INF/. Same goes for META-INF.

Greetings,

	Kenney Westerhof

>
> Yes, that is exactly what I told maven and it actually does it. The only
> problem is that the resources folder is not added to the classpath and
> therefore no resource into the folder is being found by my testes.
> The paths don't seem to be wrong as every single resource gets copied to
> target/classes/resources and to target/test-classes/resources.
> Perhaps there is a different way to achieve this??
>
> -----Original Message-----
> From: Jörg Schaible [mailto:Joerg.Schaible@Elsag-Solutions.com]
> Sent: July 1, 2005 2:06 AM
> To: Maven Users List
> Subject: RE: Resources not being found by test plugin
>
> Erick Dovale wrote on Thursday, June 30, 2005 6:56 PM:
>
> > Btw, the repeated resources in POM was removed and problem persisted.
> > It seems like the classpath is not been properly constructed.
> > Has anyone had this issue before.
>
> Only, if the paths are wrong.
>
> > I am using Maven 1.0.2
>
> Me too.
>
> [snip]
>
> > <unitTestSourceDirectory>source/testSrc</unitTestSourceDirectory>
> >             <unitTest> <includes>
> >                 <include>**/*Test.java</include>
> >             </includes>
> >                     <resources>
> >                         <resource>
> >                             <directory>resources</directory>
> >                             <filtering>false</filtering>
> >                                             <includes>
> >
> > <include>**/*</include>
> >                                             </includes>
> >                             <targetPath>resources</targetPath>
> >                         </resource>
> >                         <resource>
> >                             <directory>resources</directory>
> >                             <filtering>false</filtering>
> >                                             <includes>
> >
> > <include>**/*</include>
> >                                             </includes>
> >                             <targetPath>resources</targetPath>
> >                         </resource>
> >                     </resources>
> >         </unitTest>
> >         <resources>
> >             <resource>
> >                 <directory>resources</directory>
> >                 <targetPath>resources</targetPath>
> >                 <filtering>false</filtering>
> >                                 <includes>
> >                                     <include>**/*</include>
> >                                 </includes>
> >             </resource>
> >         </resources>
> >     </build>
>
> [snip]
>
> So you have a "resources" directory in your project root? And you want your
> resources to be copied into target/classes/resources and as well into
> target/test-classes/resources? That's what you've told Maven.
>
> - Jörg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.323 / Virus Database: 267.8.8/35 - Release Date: 30/06/2005
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.323 / Virus Database: 267.8.8/35 - Release Date: 30/06/2005
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.323 / Virus Database: 267.8.8/35 - Release Date: 30/06/2005
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Resources not being found by test plugin

Posted by Erick Dovale <ed...@carosys.com>.
Yes, that is exactly what I told maven and it actually does it. The only
problem is that the resources folder is not added to the classpath and
therefore no resource into the folder is being found by my testes.
The paths don't seem to be wrong as every single resource gets copied to
target/classes/resources and to target/test-classes/resources.
Perhaps there is a different way to achieve this??

-----Original Message-----
From: Jörg Schaible [mailto:Joerg.Schaible@Elsag-Solutions.com] 
Sent: July 1, 2005 2:06 AM
To: Maven Users List
Subject: RE: Resources not being found by test plugin

Erick Dovale wrote on Thursday, June 30, 2005 6:56 PM:

> Btw, the repeated resources in POM was removed and problem persisted.
> It seems like the classpath is not been properly constructed.
> Has anyone had this issue before.

Only, if the paths are wrong.

> I am using Maven 1.0.2

Me too.

[snip]

> <unitTestSourceDirectory>source/testSrc</unitTestSourceDirectory>    
>             <unitTest> <includes>
>                 <include>**/*Test.java</include>
>             </includes>
>                     <resources>
>                         <resource>
>                             <directory>resources</directory>
>                             <filtering>false</filtering>
>                                             <includes>
> 
> <include>**/*</include>
>                                             </includes>
>                             <targetPath>resources</targetPath>
>                         </resource>
>                         <resource>
>                             <directory>resources</directory>
>                             <filtering>false</filtering>
>                                             <includes>
> 
> <include>**/*</include>
>                                             </includes>
>                             <targetPath>resources</targetPath>
>                         </resource>
>                     </resources>
>         </unitTest>
>         <resources>
>             <resource>
>                 <directory>resources</directory>
>                 <targetPath>resources</targetPath>
>                 <filtering>false</filtering>
>                                 <includes>
>                                     <include>**/*</include>
>                                 </includes>
>             </resource>
>         </resources>
>     </build>

[snip]

So you have a "resources" directory in your project root? And you want your
resources to be copied into target/classes/resources and as well into
target/test-classes/resources? That's what you've told Maven.

- Jörg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org



-- 
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.8/35 - Release Date: 30/06/2005

-- 
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.8/35 - Release Date: 30/06/2005
 

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.8/35 - Release Date: 30/06/2005
 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org