0
votes

I have a maven application , It never cleans , only buils directly or build with dependencies only .


Building Schedule Model 1.0

The POM for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

--- maven-clean-plugin:2.4.1:clean (default-clean) @ Model ---

The POM for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

BUILD FAILURE

Total time: 0.870s Finished at: Sun Jun 01 10:03:29 EET 2014

Final Memory: 5M/91M

Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean (default-clean) on project Model: Execution default-clean of goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean failed: A required class was missing while executing org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean: org/codehaus/plexus/util/Os

realm = plugin>org.apache.maven.plugins:maven-clean-plugin:2.4.1 strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy urls[0] = file:/C:/Users/shaima/.m2/repository/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.jar urls[1] = file:/C:/Users/shaima/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar Number of foreign imports: 1 import: Entry[import from realm ClassRealm[maven.api, parent: null]]

-----------------------------------------------------: org.codehaus.plexus.util.Os -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch. Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException

2

2 Answers

1
votes

and it works on cmd line with the same version of maven? (the netbeans builtin version is 3.0.5). I suspect it would not work either.

My guess is that the pom.xml for the maven's clean plugin is somehow messed up, typically that happens when you are behind a firewall or proxy and you get a customized error message. that gets stored as the xml file content.

I would suggest you try deleting org/apache/maven/plugins/maven-clean-plugin folder in your local repository and try again.

1
votes

Had the same maven error message when building some other project with Maven 3.0.3. Simply switching to Maven 3.0.5 resolved the problem.