You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Alfonso Presa (JIRA)" <ji...@codehaus.org> on 2010/11/08 16:14:04 UTC

[jira] Issue Comment Edited: (MASSEMBLY-520) Classpath is setup incorrectly if assembly-plugin is used several times on the same reactor

    [ http://jira.codehaus.org/browse/MASSEMBLY-520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=242409#action_242409 ] 

Alfonso Presa edited comment on MASSEMBLY-520 at 11/8/10 9:13 AM:
------------------------------------------------------------------

Hi!,

Isn't it a better way to use descriptorRef to reference those assemblies than using the method told in the "sharing-descriptors" guide. I mean using something like this:

Given the following shared-descriptors project's structure:

    +-- src
       `-- main
           `-- resources
               `-- assemblies
                   `-- myassembly.xml
    -- pom.xml

We can reference it inside the main project's pom file as follows:

...........
            <configuration>
              <!-- This is where we use our shared assembly descriptor -->
              <descriptorRefs>
                <descriptorRef>myassembly</descriptorRef>
              </descriptorRefs>
            </configuration>
..............


This is working great for me in version 2.2 with maven 2.2.1 and 3.0. I don't know if it's the supported and recomended way to do it, but I find it a cleaner way to reference the files without knowing the internals of the shared descriptors project and might also prevent some classpath issues from happening.

BTW,...This is my first comment on JIRA about maven so I might probably be wrong, if so... please correct me... and be kind :).


      was (Author: alfpresa):
    Hi!,

Isn't it a better way to use descriptorRef to reference those assemblies than using the method told in the "sharing-descriptors" guide. I mean using something like this:

Given the following shared-descriptors project's structure:

    +-- src
    |   `-- main
    |       `-- resources
    |           `-- assemblies
    |               `-- myassembly.xml
    `-- pom.xml

We can reference it inside the main project's pom file as follows:

...........
            <configuration>
              <!-- This is where we use our shared assembly descriptor -->
              <descriptorRefs>
                <descriptorRef>myassembly</descriptorRef>
              </descriptorRefs>
            </configuration>
..............


This is working great for me in version 2.2 with maven 2.2.1 and 3.0. I don't know if it's the supported and recomended way to do it, but I find it a cleaner way to reference the files without knowing the internals of the shared descriptors project and might also prevent some classpath issues from happening.

BTW,...This is my first comment on JIRA about maven so I might probably be wrong, if so... please correct me... and be kind :).

  
> Classpath is setup incorrectly if assembly-plugin is used several times on the same reactor
> -------------------------------------------------------------------------------------------
>
>                 Key: MASSEMBLY-520
>                 URL: http://jira.codehaus.org/browse/MASSEMBLY-520
>             Project: Maven 2.x Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2-beta-5
>            Reporter: Thomas Arand
>            Priority: Critical
>
> I have some projects (which use the maven-assembly-plugin) sharing the same assembly-descriptor. Thus I setup my projects as described in http://maven.apache.org/plugins/maven-assembly-plugin/examples/sharing-descriptors.html. In principle that works fine.
> Unfortunately when invoking maven on a higher directory level (that means putting more projects in the same reactor) I got Classpath related assembly-descriptor-not-found problems in my new projects. This problem occurs whenever at least one of the other projects also use the maven-assembly-plugin. These other projects typically do not have the dependency specification for the shard-assembly-descriptor project. Obviously in that case the shared-assembly-descriptor jar is not put on the CLASSPATH when the plugin is invoked for my new projects.
> Note that there is a workaround: When adding the dependency to the shared-assembly-descriptor project to all other projects using the maven-assembly-plugin, everything compiles perfectly. However, this workaround is a bad one.

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