Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Maven-execution-plugin is not running when its enclosed in in pluginmanagement of pom.xml #125

Open
navakrishna opened this issue Mar 8, 2017 · 3 comments

Comments

@navakrishna
Copy link

navakrishna commented Mar 8, 2017

Maven execution plugin is failing for below configuration if i enclose this plugin in pluginmanagement tag. How pluginmanagement works? Plugins execution works with and without pluginmanagement configuration. What is the difference in the execution if we use or don't?




org.codehaus.mojo
exec-maven-plugin


exec-npm-install
generate-sources

cmd
${project.basedir}/src/main/webapp/ngapp

/c
npm
install



exec



exec-gulp
generate-sources

cmd
${project.basedir}/src/main/webapp/ngapp

/c
gulp
build-all-prod



exec





@erijonhson
Copy link

Also with me:

<project xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <!-- ... ... --> 

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven.compiler.source>1.8</maven.compiler.source>
  </properties>

  <repositories>
    <repository>
      <id>in-project</id>
      <name>In Project Repo</name>
      <url>file://${project.basedir}/lib</url>
    </repository>
  </repositories>

  <dependencies>
    <dependency>
      <groupId>jflex</groupId>
      <artifactId>jflex</artifactId>
      <version>1.6.1</version>
    </dependency>
    <dependency>
      <groupId>cup</groupId>
      <artifactId>java-cup</artifactId>
      <version>11b</version>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>1.2.1</version>
          <executions>
            <execution>
              <id>create-lexer</id>
              <phase>validate</phase>
              <configuration>
                <executable>java</executable>
                <workingDirectory>${project.basedir}/src/main/java/br/edu/ufcg/ccc</workingDirectory>
                <arguments>
                  <argument>-jar</argument>
                  <argument>${project.basedir}/lib/jflex/jflex/1.6.1/jflex-1.6.1.jar</argument>
                  <argument>-d</argument>
                  <argument>${project.basedir}/src/main/java/br/edu/ufcg/ccc</argument>
                  <argument>${project.basedir}/src/main/java/go.flex</argument>
                </arguments>
              </configuration>
              <goals>
                <goal>exec</goal>
              </goals>
            </execution>
            <execution>
              <id>create-parser-and-sym</id>
              <phase>validate</phase>
              <configuration>
                <executable>java</executable>
                <workingDirectory>${project.basedir}/src/main/java/br/edu/ufcg/ccc</workingDirectory>
                <arguments>
                  <argument>-jar</argument>
                  <argument>${project.basedir}/lib/cup/java-cup/11b/java-cup-11b.jar</argument>
                  <argument>-parser</argument>
                  <argument>Parser</argument>
                  <argument>-interface</argument>
                  <argument>-symbols</argument>
                  <argument>sym</argument>
                  <argument>${project.basedir}/src/main/java/go.cup</argument>
                </arguments>
              </configuration>
              <goals>
                <goal>exec</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

</project>

Just remove </pluginManagement> that works again, although it shows error in the pom.

@jeacott1
Copy link

its not supposed to. pluginManagement is a template for actual plugin definitions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants