I installed newer version of Maven on my Windows machine. But with newer version of Maven I am failing to build an existing app. Is it possible to define in application configurations to use an older version of maven? But the older one is not installed on my machine.
Asked
Active
Viewed 4,948 times
3
-
1First question: What does it mean: `failing to build an existing app`..furthermore you can of course install older versions of Maven..just download it and run it?... Download page or https://archive.apache.org/dist/maven/maven-3/ – khmarbaise May 11 '20 at 11:37
-
You can also use maven wrapper and specify the version you want to use https://github.com/takari/maven-wrapper – Oleg May 11 '20 at 11:48
-
Newer java versions require that the maven plugins used are updated to the newest or builds will break. – Thorbjørn Ravn Andersen May 11 '20 at 13:30
-
@Oleg That was not the question and will not help here... – khmarbaise May 11 '20 at 14:41
-
@khmarbaise I see you're involved with maven so I assume you're right but don't see how. I posted an answer explaining how to use maven wrapper to build an application with an older version of maven. Please explain how it will not help, thank you. – Oleg May 11 '20 at 16:03
-
Which JDK version are you using? Or do you need to use? – khmarbaise May 11 '20 at 17:12
-
Thanks guys. Using wrapper was a solution I did not know. – tapan May 12 '20 at 11:09
1 Answers
3
You can use maven-wrapper. For example if you want to build with version 3.5.4 do:
mvn -N io.takari:maven:0.7.7:wrapper -Dmaven=3.5.4
and then when you run:
mvnw package
Your project will be built with 3.5.4
version of maven.

Oleg
- 6,124
- 2
- 23
- 40