maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Re: Re: Assembly plugin - Java 7 classes are missing in the final JAR file
Date Wed, 13 Feb 2013 10:33:52 GMT
When the Clean build is made, the resulted jar contains all the classes 
except these from external dependencies.

When assemly:single goal is used, I am getting the opposite - only external 
classes, not primary ones.

But in this case there is a suspicious Warning in the log:

Cannot include project artifact: in.drifted.documentation:xmlmodifier:jar:
1.0; it doesn't have an associated file or directory.

I googled for similar messages, but it is still not clear how to fix it.

It could be related to my problem...

---------- Původní zpráva ----------
Od: Milos Kleint <>
Datum: 13. 2. 2013
Předmět: Re: Assembly plugin - Java 7 classes are missing in the final JAR 

"are you doing a clean build? do you have Compile on safe turned on or
off? are the classes in question in target/classes after the build?
are they part of the original jar produced by the jar plugin?

in general the source/target value in compiler plugin should not have
any influence over other plugins. So the reason is probably someplace

Milos Kleint

On Wed, Feb 13, 2013 at 10:49 AM, <> wrote:
> Dear All,
> I want to inlude one small dependency library together with my JAR file.
> There is an assembly plugin for this and it works fine. But now my primary
> project is coded in Java 7 syntax. Netbeans IDE adds a special settings
> (source/target) for maven-compiler-plugin in my POM file. I don't know if
> this is the reason, but when this project is built using assembly:single,
> there is only the content of external libraries in my file, not my Java 7
> classes of the primary project. Is it necessary to switch something else 
> Thanks, Jan
> <plugins>
> <plugin>
> <artifactId>maven-assembly-plugin</artifactId>
> <version>2.4</version>
> <configuration>
> <archive>
> <manifest>
> <mainClass>... my main class ...</mainClass>
> </manifest>
> </archive>
> <descriptorRefs>
> <descriptorRef>jar-with-dependencies</descriptorRef>
> </descriptorRefs>
> </configuration>
> </plugin>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <version>2.4</version>
> <configuration>
> <source>1.7</source>
> <target>1.7</target>
> </configuration>
> </plugin>

To unsubscribe, e-mail:
For additional commands, e-mail:"
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message