You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. The one-jar maven plugin will copy all dependency libraries in to the
one.jar/lib/ directory.
2. This includes even <scope>compile</scope> libraries of transitive
dependencies, which are in 99% of all cases not needed to run the one.jar.
3. This means there are unnecessary libraries in the one.jar, bloating the
resulting archive.
Ideally I should be able to pick
a) if transitive dependencies should be copied at all
b) for all dependencies (transitive or not) what scopes should be considered
c) probably, the default should be to copy transitive dependencies with
<scope>runtime</scope> and not any other scope
What version of onejar-maven-plugin are you using?
1.4.3
What is the output of "mvn -version" on your machine?
Please provide any additional information below.
Original issue reported on code.google.com by [email protected] on 8 Jul 2010 at 10:12
The text was updated successfully, but these errors were encountered:
This is a classic problem with artifacts which are not declared correctly,
bringing in too many or too few transitive dependencies. It should be handled
by the authors/maintainers of those dependencies, but can be overridden by you
in the <dependency> declaration using <excludes>.
I know how to declare dependencies and their transitive behavior and I'm quite
sure I've not made a mistake. Compile scoped transitive dependencies should
not be copied into the one-jar archive but they are.
Related to this bug: one-jar also copies <optional>true</optional> transitive
dependencies into the archive.
This declaration in my parent pom:
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>${javax.inject.version}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
Results in the javax.inject jar inside my one-jar archive. Why?
Original issue reported on code.google.com by
[email protected]
on 8 Jul 2010 at 10:12The text was updated successfully, but these errors were encountered: