You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Larry Shatzer (JIRA)" <ji...@codehaus.org> on 2009/11/13 22:10:55 UTC

[jira] Issue Comment Edited: (MSHADE-52) non-attached shade in pom package fails

    [ http://jira.codehaus.org/browse/MSHADE-52?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=198266#action_198266 ] 

Larry Shatzer edited comment on MSHADE-52 at 11/13/09 3:09 PM:
---------------------------------------------------------------

Here is a patch to solve this issue. I was having the same issue with a "parent pom" for shaded "uber jars".

I just put an if statement around 2 sections of code that if the packaging type was pom, to skip those sections.

The patch also puts a test into the integration tests (not sure if this is the right spot, but was easy to add here)

      was (Author: larrys):
    Here is a patch to solve this issue. I was having the same issue with a "parent pom" for shaded "uber jars".

I just put an if statement around 2 sections of code that if the packaging type was pom, to skip those sections.
  
> non-attached shade in pom package fails
> ---------------------------------------
>
>                 Key: MSHADE-52
>                 URL: http://jira.codehaus.org/browse/MSHADE-52
>             Project: Maven 2.x Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 1.2.1
>            Reporter: Benson Margulies
>         Attachments: MSHADE-52.patch
>
>
> I have a project with POM packaging. It's purpose is to run the assembly plugin to prepare releases. I don't want any artifacts except the POM, since the resulting release is a zip file that isn't a maven artifact.
> As part of the process, I configure shade to mush together various other artifacts into a big jar that goes into the releases. So, I specified finalName and turned off attachment, and I am rewarded with the following. Note that i do have the right phase and goal.
> INFO] Unpacking /Users/benson/.m2/repository/com/basistech/rlpj/dictionaries/0.8-SNAPSHOT/dictionaries-0.8-SNAPSHOT.jarto
>  /Users/benson/x/trunk/greenhouse/etrog/distribution/target/dicts
> with Includes null and excludes:null
> [INFO] [site:attach-descriptor]
> [INFO] [shade:shade {execution: default}]
> [ERROR] The project main artifact does not exist. This could have the following
> [ERROR] reasons:
> [ERROR] - You have invoked the goal directly from the command line. This is not
> [ERROR]   supported. Please add the goal to the default lifecycle via an
> [ERROR]   <execution> element in your POM and use "mvn package" to have it run.
> [ERROR] - You have bound the goal to a lifecycle phase before "package". Please
> [ERROR]   remove this binding from your POM such that the goal will be run in
> [ERROR]   the proper phase.

-- 
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