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

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

    [ https://issues.apache.org/jira/browse/SPARK-38362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17499500#comment-17499500 ] 

Apache Spark commented on SPARK-38362:
--------------------------------------

User 'martin-g' has created a pull request for this issue:
https://github.com/apache/spark/pull/35698

> 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
>            Priority: Minor
>
> 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.
> {*}T{*}he actual problem was that ./dev/make-distribution was failing to read the version from pom.xml. The warnings above was the only thing printed by "mvn help:evaluate -Dexpression=project.version" so I thought it was related and spent time investigating it. There is no need other developers to waste time on Eclipse M2E warnings!
>  
> 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