Uploaded image for project: 'Axiom'
  1. Axiom
  2. AXIOM-227

apache-release profile not working

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • 1.2.9
    • None
    • None

    Description

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

      Attachments

        Activity

          People

            veithen Andreas Veithen
            veithen Andreas Veithen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: