简体   繁体   中英

Getting an error while executing goals from maven plugin flexmojos-maven-plugin

I get the below error while executing the default lifecycle 'clean install' from my maven project.

java.lang.String cannot be cast to org.apache.maven.lifecycle.mapping.LifecyclePhase

My code uses the flexmojos-maven-plugin. As per the jira thread https://issues.apache.org/jira/browse/MNG-5958 this issue has been resolved, but nowhere could I find how.

As per the solution I would have to update Lifecycle.java. Updating Lifecycle.java would mean updating maven-core.jar.

Will I have to go the extent of updating a standard jar which could impact many other files which are using this jar.

I am using maven 3.3.9 and java 8.

The problem is that the Maven guys changed quite a lot internally again with Maven 3.3.9 so currently you will have to use an older Maven version. I also doubt that I will be able to spare the time to address this in the future as Flexmojos has become more and more a beast to maintain. Therefore I am currently working on a completely new maven plugin which I am developing as part of the Apache flex project. For now I would suggest to use Maven 3.3.3 ... should work nicely with that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM