You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Sebastien Pennec <se...@qos.ch> on 2006/07/17 11:53:34 UTC

[M2] Assembly: scope of dependencies

Hello,

I'm having a small problem with the assembly plug-in.
Here's a part of my pom.xml:

<dependencies>
	<dependency>
		<groupId>some.group.id</groupId>
		<artifactId>core</artifactId>
		<version>0.1-SNAPSHOT</version>
		<scope>compile</scope>
	</dependency>

	<dependency>
		<groupId>same.group.id</groupId>
		<artifactId>core</artifactId>
		<version>0.1-SNAPSHOT</version>
		<classifier>tests</classifier>
		<scope>test</scope>
	</dependency>

	<dependency>
		<groupId>junit</groupId>
		<artifactId>junit</artifactId>
		<version>3.8.1</version>
		<scope>test</scope>
		</dependency>
</dependencies>

I have a dependency to a given module in two scopes: compile and test. Since the jar 
plug in makes two jars, one with source and one with tests, this module depends to 
core in compile scope and core-test in test scope. Of course, JUnit is also needed.

Now to my assembly file:

<dependencySets>
     <dependencySet>
       <outputDirectory>/lib</outputDirectory>
       <unpack>false</unpack>
       <scope>test</scope>
     </dependencySet>
</dependencySets>


Nothing fancy here: I just want all my libs, including test scope dependencies, to be 
included.

What is strange, is that the core jar is included in my assembly, the junit jar too, 
but the core-test jar is missing. How come does the plug-in take "some" of the 
dependencies of the test scope and not all of them? Does it think that since a same 
groupID+artifactID is already included in compile scope, it doesn't need to package 
the jar with the test classifier?

Thanks for your help...

Sebastien

-- 
Sebastien Pennec
sebastien@qos.ch

LOGBack: the generic, reliable, fast and flexible logging library for Java.

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


Re: [M2] Assembly: scope of dependencies

Posted by Sebastien Pennec <se...@qos.ch>.
Looks like updating to version 2.1 of the assembly plug-in corrected the problem...

-- 
Sebastien Pennec
sebastien@qos.ch

LOGBack: the generic, reliable, fast and flexible logging library for Java.

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