Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] Trying to get maven plugin working with m2e



On Tue, Oct 4, 2016 at 4:41 PM, Igor Fedorenko <igor@xxxxxxxxxxxxxx> wrote:
source=workspace means the plugin is ignored at workspace level, most likely you used quick-fix to do that some time in the past. You can see workspace-level configuration in Eclipse Preferences, Maven, Lifecycle Mapping ("basic" is a polite way to describe the preference page).




Thanks.  I should've checked global config after you pointed me at the project config.  That pointed me to a file containing

     <pluginExecution>
      <pluginExecutionFilter>
        <groupId>com.google.closure</groupId>
        <artifactId>closure-maven-plugin</artifactId>
        <versionRange>0.0.1-SNAPSHOT</versionRange>
        <goals>
          <goal>generate-closure-sources</goal>
        </goals>
      </pluginExecutionFilter>
      <action>
        <ignore />
      </action>
    </pluginExecution>

which, IIUC, should suppress an older version.  I am debugging <version>1.3.0-SNAPSHOT</version> of my plugin.
I shut down Eclipse, edited that file to remove that fragment, and restarted and it worked even without a local override in integration-test POM :)

I also found that everything (narrowly construed) works when I add the following to my demo project POM.  I tried adding this initially without a <versionRange>, and got an error message about <versionRange> being required.

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>com.google.closure</groupId>
                    <artifactId>closure-maven-plugin</artifactId>
                    <versionRange>1.3.0-SNAPSHOT</versionRange>
                    <goals>
                      <goal>generate-closure-sources</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute>
                    ...

so AFAICT, <versionRange> is optional in the META-INF context, required in the <pluginManagement> context and ignored in the global configuration context.

 Thanks for all your help

Back to the top