RBuractaon / addjars-maven-plugin

Automatically exported from code.google.com/p/addjars-maven-plugin
0 stars 0 forks source link

After using the plugin ${basedir} is changed #8

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I have a pom.xml that is using addjars-maven-plugin and the assembly plugin to 
make a zip for distribution.

After using the addjars-maven-plugin, the basedir of the project is changed. 
When using basedir in the assembly file, you are not where expected.

The only solution I found is to define de custom propertie in the pom.xml 
referencing to the right basedir and using the custom propertie in assembly 
instead of basedir propertie.

Original issue reported on code.google.com by guillaum...@gmail.com on 29 Apr 2014 at 9:00

GoogleCodeExporter commented 8 years ago
Same issue here with version addjars 1.0.5
And then the assembly basedir is 
"target\com.googlecode.addjars.mojo.AddJarsMojo\."

Original comment by F.Fa...@gmail.com on 5 Feb 2015 at 11:13

GoogleCodeExporter commented 8 years ago
Also with 1.0.5:
The surefire tests are executed with 
${project.build.directory}/com.googlecode.addjars.mojo.AddJarsMojo which causes 
the tests to fail.

Caused by: java.io.FileNotFoundException: 
<myPath>\com.googlecode.addjars.mojo.AddJarsMojo\<myFile>.xml (The system 
cannot find the path specified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:138)

Original comment by mbru9...@gmail.com on 24 Jun 2015 at 11:29

GoogleCodeExporter commented 8 years ago
Ditto this bug.

As a workaround, you can add a property to your build:
<properties>
    <real.base.dir>${basedir}</real.base.dir>
<properties>

And tell the maven-surefire-plugin where the real working basedir is:
<build>
<plugins>
<plugin>
    <artifactId>maven-surefire-plugin</artifactId>
    <configuration>
        <workingDirectory>${real.base.dir}</workingDirectory>
    </configuration>
</plugin>
</plugins>
</build>

Original comment by david.er...@gmail.com on 8 Jul 2015 at 8:10