You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ch...@gmail.com on 2024/09/03 23:33:12 UTC
Migration of Spring MVC 4 app to Spring MVC 6
I am migrating a Spring MVC app from 4.x to 6.x so I am going from Tomcat
9.1 Java 8 to Tomcat 10.1 Java 17.
I noticed that in the migration steps on the Tomcat site that there is a
tool to help with the javax to Jakarta package conversions
I have downloaded the migration tool from Github
https://github.com/apache/tomcat-jakartaee-migration
I currently have 2 versions of Java on my machine. Java 8 (Oracle) and Java
17 (Open JDK)
And am trying to build it and am getting the following error in Eclipse when
running maven verify.
It appears to be using my Java 8 JRE to run the maven build even though I
have JRE_HOME set to below
JRE_HOME=C:\Program Files\OpenLogic\jdk-17.0.12.7-hotspot
And my PATH has the Open JDK first in the PATH variable
Path=C:\Program Files\OpenLogic\jdk-17.0.12.7-hotspot\bin;C:\Program
Files\Microsoft\jdk-11.0.16.101-hotspot\bin;C:\Program
Files\Java\jre-1.8;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C
:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\P
rogram Files\Java\jre-1.8\bin;C:\Program Files\dotnet\;C:\Program Files
(x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program
Files\Amazon\AWSCLIV2\;C:\Program Files (x86)\Bitvise SSH Client;C:\Program
Files\MySQL\MySQL Shell
8.0\bin\;C:\Users\charlie\AppData\Local\Microsoft\WindowsApps;C:\Users\charl
ie\.dotnet\tools
Output from Maven verify is below
Not sure what to do about it
Scanning for projects...
[INFO]
[INFO] [1m---------------< [0;36morg.apache.tomcat:jakartaee-migration[0;1m
>----------------[m
[INFO] [1mBuilding Apache Tomcat Migration Tool for Jakarta EE
1.0.9-SNAPSHOT[m
[INFO] from pom.xml
[INFO] [1m--------------------------------[ jar
]---------------------------------[m
[INFO]
[1m------------------------------------------------------------------------[
m
[INFO] [1;31mBUILD FAILURE[m
[INFO]
[1m------------------------------------------------------------------------[
m
[INFO] Total time: 0.647 s
[INFO] Finished at: 2024-09-03T19:27:17-04:00
[INFO]
[1m------------------------------------------------------------------------[
m
[ERROR] Failed to execute goal on project [36mjakartaee-migration[m:
[1;31mCould not resolve dependencies for project
org.apache.tomcat:jakartaee-migration:jar:1.0.9-SNAPSHOT: The following
artifacts could not be resolved: com.sun:tools:jar:1.8.0: Could not find
artifact com.sun:tools:jar:1.8.0 at specified path C:\Program
Files\Java\jre-1.8/../lib/tools.jar[m -> [1m[Help 1][m
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the
[1m-e[m switch.
[ERROR] Re-run Maven using the [1m-X[m switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please
read the following articles:
[ERROR] [1m[Help 1][m
http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionExcepti
on
Re: Migration of Spring MVC 4 app to Spring MVC 6
Posted by Konstantin Kolinko <kn...@gmail.com>.
ср, 4 сент. 2024 г. в 02:33, <ch...@gmail.com>:
>
> I am migrating a Spring MVC app from 4.x to 6.x so I am going from Tomcat
> 9.1 Java 8 to Tomcat 10.1 Java 17.
>
> I noticed that in the migration steps on the Tomcat site that there is a
> tool to help with the javax to Jakarta package conversions
>
>
>
> I have downloaded the migration tool from Github
> https://github.com/apache/tomcat-jakartaee-migration
>
> I currently have 2 versions of Java on my machine. Java 8 (Oracle) and Java
> 17 (Open JDK)
>
>
>
> And am trying to build it and am getting the following error in Eclipse when
> running maven verify.
>
> It appears to be using my Java 8 JRE to run the maven build even though I
> have JRE_HOME set to below
>
> JRE_HOME=C:\Program Files\OpenLogic\jdk-17.0.12.7-hotspot
>
> [...]
>
>
> Output from Maven verify is below
>
How do you start Maven?
Is it "mvn verify" in a Windows Console, or in some other way (e.g.
from within an IDE)?
On Windows "mvn" executes "mvn.cmd" batch script, and that script
works with JAVA_HOME (and knows nothing about JRE_HOME).
If you run from within an IDE, the Java Runtime used for Maven is
configured in launch configuration for Maven (within the IDE), and
environment variables do not matter at all.
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Migration of Spring MVC 4 app to Spring MVC 6
Posted by Mark Thomas <ma...@apache.org>.
On 04/09/2024 00:33, charliedidonato@gmail.com wrote:
> I am migrating a Spring MVC app from 4.x to 6.x so I am going from Tomcat
> 9.1 Java 8 to Tomcat 10.1 Java 17.
>
> I noticed that in the migration steps on the Tomcat site that there is a
> tool to help with the javax to Jakarta package conversions
>
>
>
> I have downloaded the migration tool from Github
> https://github.com/apache/tomcat-jakartaee-migration
>
> I currently have 2 versions of Java on my machine. Java 8 (Oracle) and Java
> 17 (Open JDK)
>
>
>
> And am trying to build it and am getting the following error in Eclipse when
> running maven verify.
Possibly an issue with the Eclipse environment?
mvn clean verify
works for me with both Java 8 and Java 17 with the current HEAD of the
main branch.
I'd suggest building on the command line as a first step towards
debugging what is going on.
Mark
>
> It appears to be using my Java 8 JRE to run the maven build even though I
> have JRE_HOME set to below
>
> JRE_HOME=C:\Program Files\OpenLogic\jdk-17.0.12.7-hotspot
>
>
>
> And my PATH has the Open JDK first in the PATH variable
>
> Path=C:\Program Files\OpenLogic\jdk-17.0.12.7-hotspot\bin;C:\Program
> Files\Microsoft\jdk-11.0.16.101-hotspot\bin;C:\Program
> Files\Java\jre-1.8;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C
> :\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\P
> rogram Files\Java\jre-1.8\bin;C:\Program Files\dotnet\;C:\Program Files
> (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program
> Files\Amazon\AWSCLIV2\;C:\Program Files (x86)\Bitvise SSH Client;C:\Program
> Files\MySQL\MySQL Shell
> 8.0\bin\;C:\Users\charlie\AppData\Local\Microsoft\WindowsApps;C:\Users\charl
> ie\.dotnet\tools
>
>
>
>
>
> Output from Maven verify is below
>
> Not sure what to do about it
>
>
>
> Scanning for projects...
>
> [INFO]
>
> [INFO] [1m---------------< [0;36morg.apache.tomcat:jakartaee-migration[0;1m
>> ----------------[m
>
> [INFO] [1mBuilding Apache Tomcat Migration Tool for Jakarta EE
> 1.0.9-SNAPSHOT[m
>
> [INFO] from pom.xml
>
> [INFO] [1m--------------------------------[ jar
> ]---------------------------------[m
>
> [INFO]
> [1m------------------------------------------------------------------------[
> m
>
> [INFO] [1;31mBUILD FAILURE[m
>
> [INFO]
> [1m------------------------------------------------------------------------[
> m
>
> [INFO] Total time: 0.647 s
>
> [INFO] Finished at: 2024-09-03T19:27:17-04:00
>
> [INFO]
> [1m------------------------------------------------------------------------[
> m
>
> [ERROR] Failed to execute goal on project [36mjakartaee-migration[m:
> [1;31mCould not resolve dependencies for project
> org.apache.tomcat:jakartaee-migration:jar:1.0.9-SNAPSHOT: The following
> artifacts could not be resolved: com.sun:tools:jar:1.8.0: Could not find
> artifact com.sun:tools:jar:1.8.0 at specified path C:\Program
> Files\Java\jre-1.8/../lib/tools.jar[m -> [1m[Help 1][m
>
> [ERROR]
>
> [ERROR] To see the full stack trace of the errors, re-run Maven with the
> [1m-e[m switch.
>
> [ERROR] Re-run Maven using the [1m-X[m switch to enable full debug logging.
>
> [ERROR]
>
> [ERROR] For more information about the errors and possible solutions, please
> read the following articles:
>
> [ERROR] [1m[Help 1][m
> http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionExcepti
> on
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org