You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rolf Krueger <ro...@gmx.de> on 2009/01/10 15:05:38 UTC

Strange behaviour of maven assembly plugin

Hello,


I have seen that the assembly plugin always doubles the class files from
my projects src-folder in the resulting "xxx-jar-with-dependencies.jar".

The class files from the dependency-jars are put correctly into the
resulting assembly-jar.

Is this a bug, or am I doing something wrong?


Thankx in advance
Rolf



-- ENV -----------------------------------------

Maven: 2.0.9
JDK: 1.6.0_07
OS: Linux, kernel 2.26.24-23
Maven assembly plugin: 2.2 beta 2



-- POM --------------------------------------

<project xmlns="http://maven.apache.org/POM/4.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>de.rk.my.tools</groupId>
	<artifactId>simple-cc</artifactId>
	<name>simple.cc</name>
	<version>0.1-SNAPSHOT</version>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.5</source>
					<target>1.5</target>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<configuration>
					<descriptorRefs>
						<descriptorRef>
							jar-with-dependencies
						</descriptorRef>
					</descriptorRefs>
					<archive>
						<manifest>
							<mainClass>
								de.rk.my.tools.simplecc.SimpleCC
							</mainClass>
						</manifest>
					</archive>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<dependency>
			<groupId>jexcelapi</groupId>
			<artifactId>jxl</artifactId>
			<version>2.4.2</version>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.14</version>
		</dependency>
		<dependency>
			<groupId>commons-collections</groupId>
			<artifactId>commons-collections</artifactId>
			<version>3.2</version>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>1.3.2</version>
		</dependency>
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
			<version>2.2</version>
		</dependency>
		<dependency>
			<groupId>swiftgantt</groupId>
			<artifactId>swiftgantt</artifactId>
			<version>0.3.6</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>3.8.1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>jmock</groupId>
			<artifactId>jmock</artifactId>
			<version>1.2.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>jmock</groupId>
			<artifactId>jmock-cglib</artifactId>
			<version>1.2.0</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
</project>



--- CL-Output of "mvn clean assembly:assembly" -------

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'assembly'.
[INFO]
------------------------------------------------------------------------
[INFO] Building simple.cc
[INFO]    task-segment: [assembly:assembly] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] Preparing assembly:assembly
[INFO]
------------------------------------------------------------------------
[INFO] Building simple.cc
[INFO]
------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
Downloading:
http://repo1.maven.org/maven2/swiftgantt/swiftgantt/0.3.6/swiftgantt-0.3.6.pom
[INFO] [compiler:compile]
[INFO] Compiling 31 source files
to /home/rolf/dev/workspace/simple-cc/target/classes
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Compiling 12 source files
to /home/rolf/dev/workspace/simple-cc/target/test-classes
[INFO] [surefire:test]
[INFO] Surefire report
directory: /home/rolf/dev/workspace/simple-cc/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running de.rk.my.tools.simplecc.model.ExcelTaskConnectionsProviderTest

(...)

Results :

Tests run: 26, Failures: 0, Errors: 0, Skipped: 0

[INFO] [jar:jar]
[INFO] Building
jar: /home/rolf/dev/workspace/simple-cc/target/simple-cc-0.1-SNAPSHOT.jar
[INFO] [assembly:assembly]
[INFO] Processing DependencySet (output=)
[INFO] Building
jar: /home/rolf/dev/workspace/simple-cc/target/simple-cc-0.1-SNAPSHOT-jar-with-dependencies.jar
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 14 seconds
[INFO] Finished at: Sat Jan 10 14:54:08 CET 2009
[INFO] Final Memory: 18M/81M
[INFO]
------------------------------------------------------------------------








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


Re: problems with eclipse maven plugin

Posted by Rolf Krueger <ro...@gmx.de>.
Hi Duygu,


Hmm, I NEVER downloaded any maven plugin explicitly before using it.
Just prepare your project POM and do a 
   
   mvn eclipse:eclipse

which automatically searches and downloads the eclipse-plugin and
creates the eclipse project structure.

In order to update the eclipse project structure again, run

   mvn eclipse:clean

followed by

   mvn eclipse:eclipse

again.


hth
Rolf



> Hello,
> I'm working on a school project currently and this is the first time I'm using maven:)) So I need to use Eclipse's maven plugin , I tried  on Linux :
> 
> duygu@penguen:~$ mvn -DartifactId=maven-eclipse-plugin-plugin -DgroupId=mevenide -Dversion=0.3.1 plugin:download
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'plugin'.
> [INFO] org.apache.maven.plugins: checking for updates from central
> [INFO] org.codehaus.mojo: checking for updates from central
> Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-plugin-plugin/2.4.1/maven-plugin-plugin-2.4.1.pom
> 8K downloaded
> Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-plugins/10/maven-plugins-10.pom
> 7K downloaded
> Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-parent/7/maven-parent-7.pom
> 20K downloaded
> Downloading: http://repo1.maven.org/maven2/org/apache/apache/4/apache-4.pom
> 4K downloaded
> Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-plugin-plugin/2.4.1/maven-plugin-plugin-2.4.1.jar
> 30K downloaded
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Required goal not found: plugin:download in org.apache.maven.plugins:maven-plugin-plugin:2.4.1
> [INFO] ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 4 seconds
> [INFO] Finished at: Sat Jan 10 16:24:21 EET 2009
> [INFO] Final Memory: 1M/4M
> 
> 
> I dunno what's wrong , I googled the error but nothing came out.Any help is appreciated thanx:))
> _________________________________________________________________
> Sadece e-posta iletilerinden daha fazlası: Diğer Windows Live™ özelliklerine göz atın.
> http://www.microsoft.com/windows/windowslive/


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


problems with eclipse maven plugin

Posted by duygu altinok <du...@hotmail.com>.
Hello,
I'm working on a school project currently and this is the first time I'm using maven:)) So I need to use Eclipse's maven plugin , I tried  on Linux :

duygu@penguen:~$ mvn -DartifactId=maven-eclipse-plugin-plugin -DgroupId=mevenide -Dversion=0.3.1 plugin:download
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'plugin'.
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from central
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-plugin-plugin/2.4.1/maven-plugin-plugin-2.4.1.pom
8K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-plugins/10/maven-plugins-10.pom
7K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-parent/7/maven-parent-7.pom
20K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/apache/4/apache-4.pom
4K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-plugin-plugin/2.4.1/maven-plugin-plugin-2.4.1.jar
30K downloaded
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Required goal not found: plugin:download in org.apache.maven.plugins:maven-plugin-plugin:2.4.1
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Sat Jan 10 16:24:21 EET 2009
[INFO] Final Memory: 1M/4M


I dunno what's wrong , I googled the error but nothing came out.Any help is appreciated thanx:))
_________________________________________________________________
Sadece e-posta iletilerinden daha fazlası: Diğer Windows Live™ özelliklerine göz atın.
http://www.microsoft.com/windows/windowslive/