kahing / addjars-maven-plugin

Automatically exported from code.google.com/p/addjars-maven-plugin
Apache License 2.0
1 stars 1 forks source link

plugin is installing provided deps #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. leave a provided dep in configured resource folder
2. mvn install
3. plugin installs the dep into local repo, duplicating the dep and causes 
duplicate entries on classpath (this is an issue with android dexing).

What is the expected output? What do you see instead?
should not install the provided dependency.

What version of the product are you using? On what operating system?
1.0.5 MacOS

Please provide any additional information below.
I did a fix locally by changing this line
https://code.google.com/p/addjars-maven-plugin/source/browse/src/main/java/com/g
ooglecode/addjars/mojo/AddJarsMojo.java#101

to be this:
if(jar.lastModified() > stamp.lastModified() && 
(!"provided".equals(resource.getScope()))) {

Please verify and merge this fix into a new release so that I don't need to 
fork your codebase.

Thanks!

Original issue reported on code.google.com by ebrid...@squarespace.com on 15 Mar 2013 at 5:28

GoogleCodeExporter commented 8 years ago
To employ the change I made, the pom.xml of my project had this as a resource 
declaration of the addjars-maven-plugin:
              <resources>
                <resource>
                  <directory>${basedir}/libs</directory>
                  <scope>provided</scope>
                </resource>
              </resources>

Original comment by ebrid...@squarespace.com on 15 Mar 2013 at 5:30

GoogleCodeExporter commented 8 years ago
Could you clarify what you mean by duplication?
I added the provided scope declaration to my project and that did not cause any 
problems.
Can I see I the pom affected by this issue?

> Please verify and merge this fix into a new release so that I don't need to 
fork your codebase.

Actually, I don't mind if someone forks the codebase and continue supporting 
the plugin.
If you do so, I will add links to the new project location from the Wiki pages.

Original comment by v.kary...@gmail.com on 16 Mar 2013 at 1:26