1

1] I added the maven-clean-plugin:2.6.1.jar to my local repository. I did not specify a pom, so it generated one called mavin-plugin and gives me the error messages

     [WARNING] The POM for org.apache.maven.plugins:maven-clean-plugin:jar:2.6.1 is invalid, transitive dependencies (if any) will not be available: 2 problems were encountered while building the effective model for org.apache.maven.plugins:maven-clean-plugin:2.6.1
     [ERROR] Invalid packaging for parent POM org.apache.maven.plugins:maven-clean-plugin:2.6.1, must be "pom" but is "maven-plugin" @
     [FATAL] The parents form a cycle: org.apache.maven.plugins:maven-clean-plugin:2.6.1 -> org.apache.maven.plugins:maven-clean-plugin:2.6.1 @

2] I also tried adding in 2.4.1 by putting in both the jar and pom.xml with its jar packaging but got the error message:

     [WARNING] The POM for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1 is invalid, transitive dependencies (if any) will not be available: 2 problems were encountered while building the effective model for org.apache.maven.plugins:maven-clean-plugin:2.4.1
     [ERROR] Invalid packaging for parent POM rg.apache.maven.plugins:maven-clean-plugin:2.4.1, must be "pom" but is "jar" @
     [FATAL] The parents form a cycle: org.apache.maven.plugins:maven-clean-plugin:2.4.1 -> org.apache.maven.plugins:maven-clean-plugin:2.4.1 @

3]
I also tried to update the jar file but did not specify a pom.xml and got an error

     Downloading: https://mvnrepository.com/artifact/org.apache.maven.plugins/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
     [DEBUG] Writing resolution tracking file C:\Users\xxx\.m2\repository\org\apache\maven\plugins\maven-clean-plugin\2.4.1\maven-clean-plugin-2.4.1.pom.lastUpdated
     [WARNING] The POM for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1 is missing, no dependency information available
     [INFO] ------------------------------------------------------------------------
     [INFO] BUILD FAILURE
     [INFO] ------------------------------------------------------------------------
     [INFO] Total time: 2.300s
     [INFO] Finished at: Tue Dec 13 13:22:06 CST 2016
     [INFO] Final Memory: 6M/121M
     [INFO] ------------------------------------------------------------------------
     [ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: 
     Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1: 
     Could not find artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 in central (http://xxxxzero1.dev.deodiaus.com:8081/artifactory/plugins-release) -> [Help 1]
     org.apache.maven.plugin.PluginResolutionException: 
     Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: 
     Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1
     at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:129)
     at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:142)
     at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:261)
     at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:185)
     at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecution(DefaultLifecycleExecutionPlanCalculator.java:152)
     at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecutions(DefaultLifecycleExecutionPlanCalculator.java:139)

4] I also tried to manually change the pom.xml in my ~/repository/.../pom.xml file

Walter
  • 21
  • 2
  • 6
  • I did try the suggestion http://stackoverflow.com/questions/13330930/invalid-packaging-for-parent-pom-xml-must-be-pom-but-is-ear – Walter Dec 14 '16 at 15:49
  • re : http://stackoverflow.com/questions/40934041/invalid-packaging-for-parent-pom-org-apache-maven-pluginsmaven-clean-plugin2-5 my proxy works – Walter Dec 14 '16 at 15:53
  • please share your `pom.xml` file for the project which you are trying to build – Naman Dec 14 '16 at 15:57
  • 1
    @WalterDeodiaus why is this `(http://xxxxzero1.dev.deodiaus.com:8081/artifactory/plugins-release)` is the link to your central ? – Hohenheim Dec 14 '16 at 16:07
  • I do delete the entire ~/.m2/repository dir between each build. On my initial update to the maven local repository, I put in the original pom.xml with the packaging type as pom – Walter Dec 14 '16 at 16:14
  • @Hohenheim http://xxxxzero1.dev.deodiaus.com:8081/artifactory/plugins-‌​release is to be central repos. Should I change that? – Walter Dec 14 '16 at 16:23
  • yes : you have this `https://mvnrepository.com/` – Hohenheim Dec 14 '16 at 16:41
  • my pom.xml is at http://deodiaus.tripod.com/pom.xml.txt – Walter Dec 14 '16 at 16:42
  • Do not use `https://mvnrepository.com/` cause this is no Maven repository nor is this Maven Central. – khmarbaise Dec 14 '16 at 16:58
  • @WalterDeodiaus please don't link things of importance in comments, instead share them with edit of your question. – Naman Dec 15 '16 at 06:51
  • it works `https://mvnrepository.com/` as a central too : i use it to dl jars – Hohenheim Dec 15 '16 at 13:06
  • 1
    I forgot to specify a groupid!! – Walter Dec 15 '16 at 16:32
  • @WalterDeodiaus, is this the answer? Can you post these words as the answer, please? Our case turned different when another employee uploaded the maven-clean-plugin with the modified groupId, and this screened the "authorized" Apache maven-clean-plugin. – eel ghEEz Mar 09 '20 at 23:28

0 Answers0