mvn test

View: New views
4 Messages — Rating Filter:   Alert me  

mvn test

by yelo_3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello, I've build an application which depends on a library.
The tests in the application also depends on the test which are in the
library (they are implementation of abstract tests)

when I run mvn test I get an error message saying that nunit-console failed:
[INFO] ** (/usr/lib/nunit/nunit-console.exe:3579): WARNING **: The
following assembly referenced from
/home/yelo3/EsameIS/RemotingNetworkServices/target/test-assemblies/RemotingNetworkServices-1.0-test.dll
could not be loaded:

the test compiles, so the pom.xml is correct for compilation,
the problem is that nunit-console needs the mylib-1.0-test.dll in the path:
in fact in the directory test-assemblies there is only mylib-1.0.dll

how can I format pom.xml to copy the test assemblies of the mylib
dependency in test-assemblies?

I have this:
<dependency>
    <groupId>it.unibo.deis.EsameIS</groupId>
    <artifactId>MyLib</artifactId>
    <version>1.0</version>
    <classifier>test</classifier>
    <scope>test</scope>
    <type>dotnet:library</type>
</dependency>

Thanks

Re: mvn test

by Nicolò Chieffo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

this is a page related to maven
http://maven.apache.org/guides/mini/guide-attached-tests.html

but we don't use maven-jar-plugin right?

Re: mvn test

by brettporter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Right... this seems a deciciency in the nmaven packaging plugins that  
exist today. However, I believe they do create the test DLL, so you  
could use the build helper plugin in the original project to attach  
that to the build and have it installed for the other.

Cheers,
Brett

On 20/11/2008, at 10:57 AM, Nicolò Chieffo wrote:

> this is a page related to maven
> http://maven.apache.org/guides/mini/guide-attached-tests.html
>
> but we don't use maven-jar-plugin right?

--
Brett Porter
brett@...
http://blogs.exist.com/bporter/


Re: mvn test

by Nicolò Chieffo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think I found a bug:
with this in my pom.xml

<dependency>
   <groupId>it.unibo.deis.EsameIS</groupId>
   <artifactId>MyLib</artifactId>
   <version>1.0</version>
   <classifier>test</classifier>
   <scope>test</scope>
   <type>dotnet:library</type>
</dependency>

the compiler compiles well the code, but can't execute the test
because in the directory test-assemblies there's no file
MyLib-1.0-test.dll

the thing that happens is that I find MyLib-1.0.dll instead of the
test library! In the project there are no other MyLib deps