Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5782

Maven axis2-repo-maven-plugin does not allow module names to be specified on multiple lines.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.7.3
    • 1.7.4
    • Tools
    • None

    Description

      Currently the 'axis2-repo-maven-plugin' Maven Plugin does not permit you to place the named modules on more than one line. If you are configuring a lot of modules, then this leads to a very long line. Furthermore, if a line-break is added it breaks the plugin.

      <plugin>
        <groupId>org.apache.axis2</groupId>
        <artifactId>axis2-repo-maven-plugin</artifactId>
        <version>${axis2.version.pwc}</version>
        <executions>
          <execution>
            <id>axis2-modules-server</id>
            <phase>generate-resources</phase>
            <goals><goal>create-repository</goal></goals>
            <configuration>
              <outputDirectory>${project.build.directory}/webResources/WEB-INF</outputDirectory>
              <modules>addressing, rampart, soapmonitor, someModuleA, someModuleB, someModuleC, someModuleD</modules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      

      In my patched version, I have added three lines to "AbstractCreateRepositoryMojo.java" to simply remove whitespace between the defined module names at the start of the execution.

      public void execute() throws MojoExecutionException, MojoFailureException {
              Set<Artifact> artifacts = new HashSet<Artifact>();
      
              if (modules != null) {
                  modules = modules.replaceAll("\\s", "");
              }
      

      Thus I can specify:

              <modules>
                addressing, 
                rampart, 
                soapmonitor, 
                someModuleA, 
                someModuleB, 
                someModuleC, 
                someModuleD
              </modules>
      

      IMHO an even better configuration may be to replace the "modules" String in the MOJO with a "List<String>" for:

              <modules>
                <module>addressing</module>
                <module>rampart</module>
                <module>soapmonitor</module>
                <module>someModuleA</module>
                <module>someModuleB</module>
                <module>someModuleC</module> 
                <module>someModuleD</module>
              </modules>
      

      Attachments

        Activity

          People

            veithen Andreas Veithen
            JWT007 Jeff Thomas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: