You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by "Andreas Veithen (JIRA)" <ji...@apache.org> on 2010/06/09 22:28:13 UTC

[jira] Created: (WSCOMMONS-547) apache-release profile not working

apache-release profile not working
----------------------------------

                 Key: WSCOMMONS-547
                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-547
             Project: WS-Commons
          Issue Type: Bug
          Components: AXIOM
            Reporter: Andreas Veithen
            Assignee: Andreas Veithen
            Priority: Blocker
             Fix For: Axiom 1.2.9


The root POM of the Axiom source tree contains the following configuration for the maven-assembly-plugin:

<configuration>
    <descriptors>
        <descriptor>src/main/assembly/jar.xml</descriptor>
        <descriptor>src/main/assembly/bin.xml</descriptor>
        <descriptor>src/main/assembly/src.xml</descriptor>
    </descriptors>
    <tarLongFileMode>gnu</tarLongFileMode>
</configuration>

This causes troubles when the build is executed with the apache-release profile (which is required for releases that use the new Nexus staging mechanism). Especially the binary distribution has problems.

Normally, when producing a binary distribution from the root POM, it is recommended to use the assembly:assembly goal:

"Assemble an application bundle or distribution using an assembly descriptor from the command line. This goal will force Maven to build all included POMs up to the package phase BEFORE the assembly is processed. NOTE: This goal should ONLY be run from the command line, and if building a multimodule project it should be used from the root POM. Use the assembly:single goal for binding your assembly to the lifecycle."

Currently, when using the apache-release profile, it is actually the assembly:single goal that is executed. However, even after fixing this, the build still doesn't work. It appears that the assembly:assembly goal for the binary distribution works well with JAR artifacts, but not with OSGi bundles. Indeed, the build fails with the following error:

"[INFO] Failed to create assembly: Artifact: org.apache.ws.commons.axiom:axiom-dom:bundle:1.2.9-SNAPSHOT (included by module) does not have an artifact with a file. Please ensure the package phase is run before the assembly is generated."

Upgrading to the most recent version of the maven-bundle-plugin doesn't help. Therefore the only solution seems to be to build the binary distribution from a module instead of the root POM (exactly as we do in Axis2 and CXF e.g.).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WSCOMMONS-547) apache-release profile not working

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSCOMMONS-547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12878251#action_12878251 ] 

Andreas Veithen commented on WSCOMMONS-547:
-------------------------------------------

Solution 2 works well, except that the Maven site is not included into the binary distribution.

> apache-release profile not working
> ----------------------------------
>
>                 Key: WSCOMMONS-547
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-547
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>            Priority: Blocker
>             Fix For: Axiom 1.2.9
>
>
> The root POM of the Axiom source tree contains the following configuration for the maven-assembly-plugin:
> <configuration>
>     <descriptors>
>         <descriptor>src/main/assembly/jar.xml</descriptor>
>         <descriptor>src/main/assembly/bin.xml</descriptor>
>         <descriptor>src/main/assembly/src.xml</descriptor>
>     </descriptors>
>     <tarLongFileMode>gnu</tarLongFileMode>
> </configuration>
> This causes troubles when the build is executed with the apache-release profile (which is required for releases that use the new Nexus staging mechanism). Especially the binary distribution has problems.
> Normally, when producing a binary distribution from the root POM, it is recommended to use the assembly:assembly goal:
> "Assemble an application bundle or distribution using an assembly descriptor from the command line. This goal will force Maven to build all included POMs up to the package phase BEFORE the assembly is processed. NOTE: This goal should ONLY be run from the command line, and if building a multimodule project it should be used from the root POM. Use the assembly:single goal for binding your assembly to the lifecycle."
> Currently, when using the apache-release profile, it is actually the assembly:single goal that is executed. However, even after fixing this, the build still doesn't work. It appears that the assembly:assembly goal for the binary distribution works well with JAR artifacts, but not with OSGi bundles. Indeed, the build fails with the following error:
> "[INFO] Failed to create assembly: Artifact: org.apache.ws.commons.axiom:axiom-dom:bundle:1.2.9-SNAPSHOT (included by module) does not have an artifact with a file. Please ensure the package phase is run before the assembly is generated."
> Upgrading to the most recent version of the maven-bundle-plugin doesn't help. Therefore the only solution seems to be to build the binary distribution from a module instead of the root POM (exactly as we do in Axis2 and CXF e.g.).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WSCOMMONS-547) apache-release profile not working

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSCOMMONS-547?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved WSCOMMONS-547.
---------------------------------------

    Resolution: Fixed

Documentation is now included as PDF in the binary distribution.

> apache-release profile not working
> ----------------------------------
>
>                 Key: WSCOMMONS-547
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-547
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>            Priority: Blocker
>             Fix For: Axiom 1.2.9
>
>
> The root POM of the Axiom source tree contains the following configuration for the maven-assembly-plugin:
> <configuration>
>     <descriptors>
>         <descriptor>src/main/assembly/jar.xml</descriptor>
>         <descriptor>src/main/assembly/bin.xml</descriptor>
>         <descriptor>src/main/assembly/src.xml</descriptor>
>     </descriptors>
>     <tarLongFileMode>gnu</tarLongFileMode>
> </configuration>
> This causes troubles when the build is executed with the apache-release profile (which is required for releases that use the new Nexus staging mechanism). Especially the binary distribution has problems.
> Normally, when producing a binary distribution from the root POM, it is recommended to use the assembly:assembly goal:
> "Assemble an application bundle or distribution using an assembly descriptor from the command line. This goal will force Maven to build all included POMs up to the package phase BEFORE the assembly is processed. NOTE: This goal should ONLY be run from the command line, and if building a multimodule project it should be used from the root POM. Use the assembly:single goal for binding your assembly to the lifecycle."
> Currently, when using the apache-release profile, it is actually the assembly:single goal that is executed. However, even after fixing this, the build still doesn't work. It appears that the assembly:assembly goal for the binary distribution works well with JAR artifacts, but not with OSGi bundles. Indeed, the build fails with the following error:
> "[INFO] Failed to create assembly: Artifact: org.apache.ws.commons.axiom:axiom-dom:bundle:1.2.9-SNAPSHOT (included by module) does not have an artifact with a file. Please ensure the package phase is run before the assembly is generated."
> Upgrading to the most recent version of the maven-bundle-plugin doesn't help. Therefore the only solution seems to be to build the binary distribution from a module instead of the root POM (exactly as we do in Axis2 and CXF e.g.).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WSCOMMONS-547) apache-release profile not working

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSCOMMONS-547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12877940#action_12877940 ] 

Andreas Veithen commented on WSCOMMONS-547:
-------------------------------------------

After some more investigation, I noticed that the explanation for this issue is actually different:

The apache-release profile binds an execution of the assembly plugin to the lifecycle. This works fine for the source distribution. However, the execution defined in org.apache:apache:7 gets merged with the configuration defined in the Axiom root POM. This means that there is now an execution of the assembly plugin with an assembly descriptor that uses moduleSets (namely the bin assembly). Since the root POM is also the parent POM for the modules, we run into the issue described in [1]. This issue is not specific to bundles and occurs for normal jar artifacts as well.

There are thus two potential solutions:

1. Move the binary distribution to a module.
2. Create a parent POM that is different from the root POM (as we do in Axis2).

I've implemented solution 1 (see r953422), but since I would like to include the generated (Docbook and Javadoc) documentation in the binary distribution and the Maven site, I will probably end up with the site being built in a submodule as well. This is not ideal because aggregate reporting plugins can no longer be used. Therefore I will do an attempt to implement solution 2.

[1] http://www.sonatype.com/books/mvnref-book/reference/assemblies-set-dist-assemblies.html

> apache-release profile not working
> ----------------------------------
>
>                 Key: WSCOMMONS-547
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-547
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>            Priority: Blocker
>             Fix For: Axiom 1.2.9
>
>
> The root POM of the Axiom source tree contains the following configuration for the maven-assembly-plugin:
> <configuration>
>     <descriptors>
>         <descriptor>src/main/assembly/jar.xml</descriptor>
>         <descriptor>src/main/assembly/bin.xml</descriptor>
>         <descriptor>src/main/assembly/src.xml</descriptor>
>     </descriptors>
>     <tarLongFileMode>gnu</tarLongFileMode>
> </configuration>
> This causes troubles when the build is executed with the apache-release profile (which is required for releases that use the new Nexus staging mechanism). Especially the binary distribution has problems.
> Normally, when producing a binary distribution from the root POM, it is recommended to use the assembly:assembly goal:
> "Assemble an application bundle or distribution using an assembly descriptor from the command line. This goal will force Maven to build all included POMs up to the package phase BEFORE the assembly is processed. NOTE: This goal should ONLY be run from the command line, and if building a multimodule project it should be used from the root POM. Use the assembly:single goal for binding your assembly to the lifecycle."
> Currently, when using the apache-release profile, it is actually the assembly:single goal that is executed. However, even after fixing this, the build still doesn't work. It appears that the assembly:assembly goal for the binary distribution works well with JAR artifacts, but not with OSGi bundles. Indeed, the build fails with the following error:
> "[INFO] Failed to create assembly: Artifact: org.apache.ws.commons.axiom:axiom-dom:bundle:1.2.9-SNAPSHOT (included by module) does not have an artifact with a file. Please ensure the package phase is run before the assembly is generated."
> Upgrading to the most recent version of the maven-bundle-plugin doesn't help. Therefore the only solution seems to be to build the binary distribution from a module instead of the root POM (exactly as we do in Axis2 and CXF e.g.).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.