You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Martin Tzvetanov Grigorov (Jira)" <ji...@apache.org> on 2022/03/01 11:41:00 UTC

[jira] [Created] (SPARK-38362) Move eclipse.m2e Maven plugin config in its own profile

Martin Tzvetanov Grigorov created SPARK-38362:
-------------------------------------------------

             Summary: Move eclipse.m2e Maven plugin config in its own profile
                 Key: SPARK-38362
                 URL: https://issues.apache.org/jira/browse/SPARK-38362
             Project: Spark
          Issue Type: Improvement
          Components: Build
    Affects Versions: 3.3.0
            Reporter: Martin Tzvetanov Grigorov


Today I had a weird issue with org.eclipse.m2e:lifecycle-mapping Maven fake-plugin:
{code:java}
WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 was not found in https://maven-central.storage-download.googleapis.com/maven2/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of gcs-maven-central-mirror has elapsed or updates are forced {code}
 

It was weird because I didn't do any changes to my setup since yesterday when the maven build was working fine.

 

org.eclipse.m2e:lifecycle-mapping is a hack that is used by Eclipse to map Maven plugins' lifecycle with Eclipse lifecycle. It does not affect plain Maven usage on the command line! There is no Maven artifact at [https://repo.maven.apache.org/maven2/org/eclipse/m2e] !

 

As explained at [https://stackoverflow.com/a/23707050/497381] the best way to setup Maven+m2e is by using a custom Maven profile that is auto-activated only by Eclipse when M2E plugin is being used:
{code:java}
<profile>
  <id>only-eclipse</id>
  <activation>
    <property>
      <name>m2e.version</name>
    </property>
  </activation>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            ...
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
</profile> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org