Maven 2 & 3
  1. Maven 2 & 3
  2. MNG-4694

extractor for language: ant fails to detect Ant mojos

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Not A Bug
    • Affects Version/s: 3.0-beta-1
    • Fix Version/s: 3.0-beta-1
    • Component/s: None
    • Labels:
      None
    • Environment:
      Any
    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      Using simple project to develop Ant plugins described at-

      http://maven.apache.org/guides/plugin/guide-ant-plugin-development.html

      I noticed the maven-plugin-plugin/Extractor is not able to detect any Ant mojos. This same example works fine in mvn-2.2.1

      — SNIP —
      [INFO] — maven-plugin-plugin:2.3:descriptor (default-descriptor) @ maven-javac-plugin —
      [WARNING] Goal prefix is: javac; Maven currently expects it to be javac
      [INFO] Using 3 extractors.
      [INFO] Applying extractor for language: java
      [INFO] Extractor for language: java found 0 mojo descriptors.
      [INFO] Applying extractor for language: ant
      [INFO] Extractor for language: ant found 0 mojo descriptors.
      [INFO] Applying extractor for language: bsh
      [INFO] Extractor for language: bsh found 0 mojo descriptors.
      — SNIP —

      $ mvn -v
      Apache Maven 3.0-beta-1 (r935667; 2010-04-19 10:00:39-0700)
      Java version: 1.6.0_20
      Java home: /opt/jdk1.6.0_20/jre
      Default locale: en_US, platform encoding: UTF-8
      OS name: "linux" version: "2.6.32-21-generic-pae" arch: "i386" Family: "unix"

        Activity

        Hide
        Kaizer Sogiawala added a comment - - edited

        Updating the dependencies (maven-script-ant and maven-plugin-tools-ant) and maven-plugin-plugin to current versions resolved this issue. This issue can be closed.

          <dependencies>
            <dependency>
              <groupId>org.apache.maven</groupId>
              <artifactId>maven-script-ant</artifactId>
              <version>2.2.1</version>
            </dependency>
          </dependencies>
          
          <build>
            <sourceDirectory>src/main/scripts</sourceDirectory>
            <plugins>
              <plugin>
        	<groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>2.6</version>
                <dependencies>
                  <dependency>
                    <groupId>org.apache.maven.plugin-tools</groupId>
                    <artifactId>maven-plugin-tools-ant</artifactId>
                    <version>2.6</version>
                  </dependency>
                </dependencies>
                <configuration>
                  <goalPrefix>javac</goalPrefix>
                </configuration>
              </plugin>
            </plugins>
          </build>
        
        Show
        Kaizer Sogiawala added a comment - - edited Updating the dependencies (maven-script-ant and maven-plugin-tools-ant) and maven-plugin-plugin to current versions resolved this issue. This issue can be closed. <dependencies> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-script-ant</artifactId> <version>2.2.1</version> </dependency> </dependencies> <build> <sourceDirectory>src/main/scripts</sourceDirectory> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-plugin-plugin</artifactId> <version>2.6</version> <dependencies> <dependency> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-tools-ant</artifactId> <version>2.6</version> </dependency> </dependencies> <configuration> <goalPrefix>javac</goalPrefix> </configuration> </plugin> </plugins> </build>
        Hide
        Kaizer Sogiawala added a comment -

        The plugin works as specified in the documentation for 2.x.

        Show
        Kaizer Sogiawala added a comment - The plugin works as specified in the documentation for 2.x.
        Hide
        Chris Wash added a comment -

        The above workaround worked for me as well.

        Show
        Chris Wash added a comment - The above workaround worked for me as well.

          People

          • Assignee:
            Unassigned
            Reporter:
            Kaizer Sogiawala
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: