When pom.xml is upgraded from 3.0.3 to 3.0.4 or 3.0.5 I get the following exception with the commando mvn jasypt:encrypt -Djasypt.encryptor.password=mypassword. Otherwise it works well when the Spring Boot application is executed. The application configuration can be found under Grafioschtrader backend
grafioschtrader@v220220633964192939:~/build/grafioschtrader/backend/grafioschtrader-server$ mvn jasypt:encrypt -Djasypt.encryptor.password=mypassword
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------< grafioschtrader:grafioschtrader-server >---------------
[INFO] Building Grafioschtrader 0.28.5
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- jasypt-maven-plugin:3.0.5:encrypt (default-cli) @ grafioschtrader-server ---
[ERROR] Application run failed
java.lang.NoClassDefFoundError: org/springframework/web/context/support/StandardServletEnvironment
at java.lang.ClassLoader.defineClass1 (Native Method)
at java.lang.ClassLoader.defineClass (ClassLoader.java:1012)
at java.security.SecureClassLoader.defineClass (SecureClassLoader.java:150)
at java.net.URLClassLoader.defineClass (URLClassLoader.java:524)
at java.net.URLClassLoader$1.run (URLClassLoader.java:427)
at java.net.URLClassLoader$1.run (URLClassLoader.java:421)
at java.security.AccessController.doPrivileged (AccessController.java:712)
at java.net.URLClassLoader.findClass (URLClassLoader.java:420)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf (ClassRealm.java:425)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass (SelfFirstStrategy.java:42)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass (ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (ClassRealm.java:239)
at org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext$Factory.getEnvironmentType (AnnotationConfigServletWebServerApplicationContext.java:220)
at org.springframework.boot.DefaultApplicationContextFactory.getFromSpringFactories (DefaultApplicationContextFactory.java:61)
at org.springframework.boot.DefaultApplicationContextFactory.getEnvironmentType (DefaultApplicationContextFactory.java:37)
at org.springframework.boot.SpringApplication.deduceEnvironmentClass (SpringApplication.java:358)
at org.springframework.boot.SpringApplication.prepareEnvironment (SpringApplication.java:350)
at org.springframework.boot.SpringApplication.run (SpringApplication.java:301)
at org.springframework.boot.builder.SpringApplicationBuilder.run (SpringApplicationBuilder.java:164)
at com.ulisesbocchio.jasyptmavenplugin.mojo.AbstractJasyptMojo.execute (AbstractJasyptMojo.java:72)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:568)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.lang.ClassNotFoundException: org.springframework.web.context.support.StandardServletEnvironment
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass (SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass (ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (ClassRealm.java:239)
at java.lang.ClassLoader.defineClass1 (Native Method)
at java.lang.ClassLoader.defineClass (ClassLoader.java:1012)
at java.security.SecureClassLoader.defineClass (SecureClassLoader.java:150)
at java.net.URLClassLoader.defineClass (URLClassLoader.java:524)
at java.net.URLClassLoader$1.run (URLClassLoader.java:427)
at java.net.URLClassLoader$1.run (URLClassLoader.java:421)
at java.security.AccessController.doPrivileged (AccessController.java:712)
at java.net.URLClassLoader.findClass (URLClassLoader.java:420)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf (ClassRealm.java:425)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass (SelfFirstStrategy.java:42)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass (ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (ClassRealm.java:239)
at org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext$Factory.getEnvironmentType (AnnotationConfigServletWebServerApplicationContext.java:220)
at org.springframework.boot.DefaultApplicationContextFactory.getFromSpringFactories (DefaultApplicationContextFactory.java:61)
at org.springframework.boot.DefaultApplicationContextFactory.getEnvironmentType (DefaultApplicationContextFactory.java:37)
at org.springframework.boot.SpringApplication.deduceEnvironmentClass (SpringApplication.java:358)
at org.springframework.boot.SpringApplication.prepareEnvironment (SpringApplication.java:350)
at org.springframework.boot.SpringApplication.run (SpringApplication.java:301)
at org.springframework.boot.builder.SpringApplicationBuilder.run (SpringApplicationBuilder.java:164)
at com.ulisesbocchio.jasyptmavenplugin.mojo.AbstractJasyptMojo.execute (AbstractJasyptMojo.java:72)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:568)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.048 s
[INFO] Finished at: 2022-12-18T09:26:47+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.ulisesbocchio:jasypt-maven-plugin:3.0.5:encrypt (default-cli) on project grafioschtrader-server: Execution default-cli of goal com.github.ulisesbocchio:jasypt-maven-plugin:3.0.5:encrypt failed: A required class was missing while executing com.github.ulisesbocchio:jasypt-maven-plugin:3.0.5:encrypt: org/springframework/web/context/support/StandardServletEnvironment
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>com.github.ulisesbocchio:jasypt-maven-plugin:3.0.5
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/home/grafioschtrader/.m2/repository/com/github/ulisesbocchio/jasypt-maven-plugin/3.0.5/jasypt-maven-plugin-3.0.5.jar
[ERROR] urls[1] = file:/home/grafioschtrader/.m2/repository/com/github/ulisesbocchio/jasypt-spring-boot-starter/3.0.5/jasypt-spring-boot-starter-3.0.5.jar
[ERROR] urls[2] = file:/home/grafioschtrader/.m2/repository/com/github/ulisesbocchio/jasypt-spring-boot/3.0.5/jasypt-spring-boot-3.0.5.jar
[ERROR] urls[3] = file:/home/grafioschtrader/.m2/repository/org/jasypt/jasypt/1.9.3/jasypt-1.9.3.jar
[ERROR] urls[4] = file:/home/grafioschtrader/.m2/repository/org/springframework/boot/spring-boot-starter/2.7.6/spring-boot-starter-2.7.6.jar
[ERROR] urls[5] = file:/home/grafioschtrader/.m2/repository/org/springframework/boot/spring-boot/2.7.6/spring-boot-2.7.6.jar
[ERROR] urls[6] = file:/home/grafioschtrader/.m2/repository/org/springframework/spring-context/5.3.24/spring-context-5.3.24.jar
[ERROR] urls[7] = file:/home/grafioschtrader/.m2/repository/org/springframework/spring-aop/5.3.24/spring-aop-5.3.24.jar
[ERROR] urls[8] = file:/home/grafioschtrader/.m2/repository/org/springframework/spring-beans/5.3.24/spring-beans-5.3.24.jar
[ERROR] urls[9] = file:/home/grafioschtrader/.m2/repository/org/springframework/spring-expression/5.3.24/spring-expression-5.3.24.jar
[ERROR] urls[10] = file:/home/grafioschtrader/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.7.6/spring-boot-autoconfigure-2.7.6.jar
[ERROR] urls[11] = file:/home/grafioschtrader/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.7.6/spring-boot-starter-logging-2.7.6.jar
[ERROR] urls[12] = file:/home/grafioschtrader/.m2/repository/ch/qos/logback/logback-classic/1.2.11/logback-classic-1.2.11.jar
[ERROR] urls[13] = file:/home/grafioschtrader/.m2/repository/ch/qos/logback/logback-core/1.2.11/logback-core-1.2.11.jar
[ERROR] urls[14] = file:/home/grafioschtrader/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.17.2/log4j-to-slf4j-2.17.2.jar
[ERROR] urls[15] = file:/home/grafioschtrader/.m2/repository/org/apache/logging/log4j/log4j-api/2.17.2/log4j-api-2.17.2.jar
[ERROR] urls[16] = file:/home/grafioschtrader/.m2/repository/org/slf4j/jul-to-slf4j/1.7.36/jul-to-slf4j-1.7.36.jar
[ERROR] urls[17] = file:/home/grafioschtrader/.m2/repository/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar
[ERROR] urls[18] = file:/home/grafioschtrader/.m2/repository/org/springframework/spring-core/5.3.24/spring-core-5.3.24.jar
[ERROR] urls[19] = file:/home/grafioschtrader/.m2/repository/org/springframework/spring-jcl/5.3.24/spring-jcl-5.3.24.jar
[ERROR] urls[20] = file:/home/grafioschtrader/.m2/repository/org/yaml/snakeyaml/1.30/snakeyaml-1.30.jar
[ERROR] urls[21] = file:/home/grafioschtrader/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] : org.springframework.web.context.support.StandardServletEnvironment
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
When pom.xml is upgraded from 3.0.3 to 3.0.4 or 3.0.5 I get the following exception with the commando
mvn jasypt:encrypt -Djasypt.encryptor.password=mypassword
. Otherwise it works well when the Spring Boot application is executed. The application configuration can be found under Grafioschtrader backend