mavenversion-compatibility

Is it possible to build maven 1.x project using maven 2.x?


I know, we can convert the project.xml from maven 1.x to pom.xml for maven 2.x, but I have come across a complex project setup that was build using maven 1.x, and I just have maven 2.x currently installed in my machine locally.

There is a option to setup maven 1.x, but that would involve changing the PATH variables, and configurations.

I would like to know, if it is possible to build a maven 1.x project using maven 2.x or not? I just need to test few things.

I tried the maven 1.x commands, but they all failed saying no such goal obviously. So, if there is some tricks, tweaks that can be applied that I am not aware of currently, please let me know.


Solution

  • Unless you convert the project with the one:convert goal, you won't be able to. You have to understand that Maven 1.x and 2.x are extremely different. Either just install 1.x and build the project with it, or convert it, if that is at all possible, as the conversion plugin will not solve everything for you for more complicated projects.