You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Andreas Schouten (JIRA)" <ji...@codehaus.org> on 2008/03/25 16:09:58 UTC

[jira] Created: (MSHADE-23) ${basedir} is wrong after running shade plugin

${basedir} is wrong after running shade plugin
----------------------------------------------

                 Key: MSHADE-23
                 URL: http://jira.codehaus.org/browse/MSHADE-23
             Project: Maven 2.x Shade Plugin
          Issue Type: Bug
         Environment: Maven version: 2.0.8
Java version: 1.5.0_06
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
            Reporter: Andreas Schouten


After the shade plugin has run, the ${basedir} points to target.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Work stopped: (MSHADE-23) ${basedir} is wrong after running shade plugin

Posted by "Daniel Kulp (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSHADE-23?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on MSHADE-23 stopped by Daniel Kulp.

> ${basedir} is wrong after running shade plugin
> ----------------------------------------------
>
>                 Key: MSHADE-23
>                 URL: http://jira.codehaus.org/browse/MSHADE-23
>             Project: Maven 2.x Shade Plugin
>          Issue Type: Bug
>         Environment: Maven version: 2.0.8
> Java version: 1.5.0_06
> OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
>            Reporter: Andreas Schouten
>            Assignee: Daniel Kulp
>             Fix For: 1.1
>
>
> After the shade plugin has run, the ${basedir} points to target.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MSHADE-23) ${basedir} is wrong after running shade plugin

Posted by "Daniel Kulp (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSHADE-23?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp closed MSHADE-23.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 1.1

> ${basedir} is wrong after running shade plugin
> ----------------------------------------------
>
>                 Key: MSHADE-23
>                 URL: http://jira.codehaus.org/browse/MSHADE-23
>             Project: Maven 2.x Shade Plugin
>          Issue Type: Bug
>         Environment: Maven version: 2.0.8
> Java version: 1.5.0_06
> OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
>            Reporter: Andreas Schouten
>            Assignee: Daniel Kulp
>             Fix For: 1.1
>
>
> After the shade plugin has run, the ${basedir} points to target.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSHADE-23) ${basedir} is wrong after running shade plugin

Posted by "Max Bowsher (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSHADE-23?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=135390#action_135390 ] 

Max Bowsher commented on MSHADE-23:
-----------------------------------

I found this in another context (shade+eclipse), and mused about it on #maven:

Apr 22 14:53:53 <maxb>  I've found a bit of an odd bug. I ran "mvn install eclipse:eclipse" in a project using the shade plugin and the eclipse files were placed into the target/ directory incorrectly
Apr 22 14:54:11 <maxb>  This is because the shade plugin reset the project's file.
Apr 22 14:54:20 <maxb>  But I'm not sure where to file the bug
Apr 22 14:54:28 <maxb>  The shade plugin is working as designed
Apr 22 14:55:09 <maxb>  The eclipse plugin is using project.getFile().getParentFile() to find the dir to write in
Apr 22 14:55:33 <maxb>  This is arguably a bit odd... but this is exactly what project.getBasedir() does internally too :-(
Apr 22 14:56:16 <maxb>  I guess I could file a MNG bug suggesting that project.getBasedir() be decoupled from project.getFile(), and a MECLIPSE bug suggesting that the plugin should use getBasedir().


I never did get around to filing a bug, because of the above-mentioned difficulties in figuring out which project was actually at fault. I guess the sad truth is that the shade plugin is playing with undocumented features by resetting the project's file, and things are breaking as a result. Of course, I'm not quite sure how else the shade plugin could do its job, so no "fix" is immediately apparent.


> ${basedir} is wrong after running shade plugin
> ----------------------------------------------
>
>                 Key: MSHADE-23
>                 URL: http://jira.codehaus.org/browse/MSHADE-23
>             Project: Maven 2.x Shade Plugin
>          Issue Type: Bug
>         Environment: Maven version: 2.0.8
> Java version: 1.5.0_06
> OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
>            Reporter: Andreas Schouten
>            Assignee: Daniel Kulp
>
> After the shade plugin has run, the ${basedir} points to target.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSHADE-23) ${basedir} is wrong after running shade plugin

Posted by "Paul Sundling (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSHADE-23?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=132694#action_132694 ] 

Paul Sundling commented on MSHADE-23:
-------------------------------------

When trying to mix shade with assembly plugin, this can result in several catastrophic errors that have no obvious relation.  I've seen such problems as the following:

no manifiest section for signature file entry org/bouncycastle/asn1/DEREnumerated.class
(not sure how this is created indirectly)


The functionality of shaded jar seems to be mostly available in the assembly plugin, except for filtering specific files within an artifact.



> ${basedir} is wrong after running shade plugin
> ----------------------------------------------
>
>                 Key: MSHADE-23
>                 URL: http://jira.codehaus.org/browse/MSHADE-23
>             Project: Maven 2.x Shade Plugin
>          Issue Type: Bug
>         Environment: Maven version: 2.0.8
> Java version: 1.5.0_06
> OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
>            Reporter: Andreas Schouten
>
> After the shade plugin has run, the ${basedir} points to target.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSHADE-23) ${basedir} is wrong after running shade plugin

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSHADE-23?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=135394#action_135394 ] 

Benjamin Bentmann commented on MSHADE-23:
-----------------------------------------

A possible short-term solution might be to have the Shade Plugin write the modified POM always next to the original POM instead of {{target}}. This way, the base directory would at least stay the same.

bq. I guess the sad truth is that the shade plugin is playing with undocumented features
If you have a look at [{{MavenProject}}|http://maven.apache.org/ref/current/maven-project/apidocs/org/apache/maven/project/MavenProject.html], it's fair to say that quite every non-trivial plugin is using undocumented features... That somehow frightens me and I hope the day will arive when the core guys realize that a complex beast like Maven needs a thorough API as its foundation.

> ${basedir} is wrong after running shade plugin
> ----------------------------------------------
>
>                 Key: MSHADE-23
>                 URL: http://jira.codehaus.org/browse/MSHADE-23
>             Project: Maven 2.x Shade Plugin
>          Issue Type: Bug
>         Environment: Maven version: 2.0.8
> Java version: 1.5.0_06
> OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
>            Reporter: Andreas Schouten
>            Assignee: Daniel Kulp
>
> After the shade plugin has run, the ${basedir} points to target.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Work started: (MSHADE-23) ${basedir} is wrong after running shade plugin

Posted by "Daniel Kulp (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSHADE-23?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on MSHADE-23 started by Daniel Kulp.

> ${basedir} is wrong after running shade plugin
> ----------------------------------------------
>
>                 Key: MSHADE-23
>                 URL: http://jira.codehaus.org/browse/MSHADE-23
>             Project: Maven 2.x Shade Plugin
>          Issue Type: Bug
>         Environment: Maven version: 2.0.8
> Java version: 1.5.0_06
> OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
>            Reporter: Andreas Schouten
>            Assignee: Daniel Kulp
>             Fix For: 1.1
>
>
> After the shade plugin has run, the ${basedir} points to target.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSHADE-23) ${basedir} is wrong after running shade plugin

Posted by "Daniel Kulp (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSHADE-23?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=135392#action_135392 ] 

Daniel Kulp commented on MSHADE-23:
-----------------------------------


Well, it's partially my fault.    In one of the alphas, I moved the dependency reduced pom into the target directory to make sure it got properly cleaned.   That's what caused this.   However, I wanted the reduced pom left there so I can see it.

The fix is going to be to do that, but then copy it into the basedir, set the file to delete on exit, and set the project file to that file.   Thus, the reduced pom will still be left in target (for me), but the "runtime" will use the version in basedir so the paths don't get screwed up.  The delete on exit will make sure the reduced pom is not left in the basedir to keep that directory clean.





> ${basedir} is wrong after running shade plugin
> ----------------------------------------------
>
>                 Key: MSHADE-23
>                 URL: http://jira.codehaus.org/browse/MSHADE-23
>             Project: Maven 2.x Shade Plugin
>          Issue Type: Bug
>         Environment: Maven version: 2.0.8
> Java version: 1.5.0_06
> OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
>            Reporter: Andreas Schouten
>            Assignee: Daniel Kulp
>
> After the shade plugin has run, the ${basedir} points to target.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira