Comments (13)
hello @cherylking, @scottkurz,
I have been able to test the version 3.9-SNAPSHOT this morning.
The defect is gone.
Thanks a lot for your action !
Regards,
André
from ci.maven.
@andre-doherty Can you include the console messages for the initial startup? I want to compare the features it installs on initial startup vs the restart. The console messages you included show the restart tries to install the same list of features as the server.xml. So I am not sure what you meant by:
It seems the plugin looses track of the actual server configuration at this point.
from ci.maven.
I would like you to remove the features from the pom.xml. Just leave the acceptLicense in the pom.xml. The features should be in the server.xml and will get installed by the plugin. I believe the server is getting created by default with a server.xml that includes the javaee-7.0
feature (since you are using the wlp-javaee7
runtime) and it is trying to install that in addition to what you have in the pom.xml, and that is not compatible with all the javaee6 features.
Where is your server.xml located? Do you need to add the location to the plugin configuration in the pom.xml? If it is not in src/main/liberty/config
it will not use it.
from ci.maven.
@andre-doherty Can you include the console messages for the initial startup? I want to compare the features it installs on initial startup vs the restart. The console messages you included show the restart tries to install the same list of features as the server.xml. So I am not sure what you meant by:
It seems the plugin looses track of the actual server configuration at this point.
Hello @cherylking,
Please find the following :
The feature installed matches the features listed in the server.xml (located in the default directory submodule-ws/src/main/liberty/config/server.xml.
[INFO] [AUDIT ] CWWKT0016I: Application Web disponible, (default_host) : http://localhost:9080/samplepim/
[INFO] [AUDIT ] CWWKZ0001I: Application samplepim3-ws démarrée en 2,871 secondes.
[INFO] [AUDIT ] CWWKF0012I: Le serveur a installé les fonctions suivantes : [beanValidation-1.0, cdi-1.0, ejbLite-3.1, jaxb-2.2, jaxrs-1.1, jaxws-2.2, jdbc-4.2, jndi-1.0, jpa-2.0, json-1.0, jsp-2.2, localConnector-1.0, servlet-3.0, ssl-1.0, transportSecurity-1.0].
[INFO] [AUDIT ] CWWKF0011I: Le serveur defaultServer est prêt pour une planète plus intelligente. Il a démarré en 4,419 secondes.
[INFO] CWWKM2015I: Le numéro correspondant est 1 à la ligne [19/09/23 19:26:48:451 CEST] 00000024 com.ibm.ws.kernel.feature.internal.FeatureManager A CWWKF0011I: Le serveur defaultServer est prêt pour une planète plus intelligente. Il a démarré en 4,419 secondes..
[INFO] ************************************************************************
[INFO] * Liberty is running in dev mode.
[INFO] * Automatic generation of features: [ Off ]
[INFO] * h - see the help menu for available actions, type 'h' and press Enter.
[INFO] * q - stop the server and quit dev mode, press Ctrl-C or type 'q' and press Enter.
[INFO] *
[INFO] * Liberty server port information:
[INFO] * Liberty server HTTP port: [ 9080 ]
[INFO] * Liberty server HTTPS port: [ 9443 ]
[INFO] * Liberty debug port: [ 7777 ]
[INFO] ************************************************************************
Note: /Users/a983152/Workspace/git/pf-java/samples/sample.samplepim3-parent/samplepim3-service/src/main/java/fr/bnpp/pf/samplepim3/dao/CrudServiceImpl.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[INFO] samplepim3-service source compilation was successful.
Note: /Users/a983152/Workspace/git/pf-java/samples/sample.samplepim3-parent/samplepim3-service/src/test/java/fr/bnpp/pf/samplepim3/business/PersonServiceImplTest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
[INFO] samplepim3-service tests compilation was successful.
Note: /Users/a983152/Workspace/git/pf-java/samples/sample.samplepim3-parent/samplepim3-ws/src/main/java/fr/bnpp/pf/samplepim3/Samplepim3Init.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
[INFO] samplepim3-ws source compilation was successful.
Everything is fine until i try to restart the server...
All configuration files are corrected picked on the first start.
from ci.maven.
I would like you to remove the features from the pom.xml. Just leave the acceptLicense in the pom.xml. The features should be in the server.xml and will get installed by the plugin. I believe the server is getting created by default with a server.xml that includes the
javaee-7.0
feature (since you are using thewlp-javaee7
runtime) and it is trying to install that in addition to what you have in the pom.xml, and that is not compatible with all the javaee6 features.Where is your server.xml located? Do you need to add the location to the plugin configuration in the pom.xml? If it is not in
src/main/liberty/config
it will not use it.
The server.xml is correctly found (located in the default location) : datasources, libraries are configured.
So i have tried to remove the features list in the pom, doesn't change anything.
Restart still fails.
Regards
André
from ci.maven.
Actually the plugin behaves just as if there was no server.xml, as if the module name specified in the command line with the pl switch was not kept.
from ci.maven.
hello @cherylking,
Do you need some more elements ?
Regards,
André
from ci.maven.
@andre-doherty Can you provide a sample project to recreate?
Until then, I have a suggestion. Instead of using the wlp-javaee7
server when you are using Java EE 6 features, can you try using the wlp-kernel
runtime artifactId instead?
from ci.maven.
@andre-doherty Can you provide a sample project to recreate?
Hello @cherylking,
Here you are :
sample.zip
I have tried to minimize it as max as possible.
To reproduce :
from the parent pom run :
mvn clean install
mvn -am -pl module-ws io.openliberty.tools:liberty-maven-plugin:dev
Try to restart the server using the 'r'
Note : i am using the following :
mvn --version
Maven home: /opt/homebrew/Cellar/maven/3.9.3/libexec
Java version: 17.0.7, vendor: Homebrew, runtime: /opt/homebrew/Cellar/openjdk@17/17.0.7/libexec/openjdk.jdk/Contents/Home
Default locale: fr_FR, platform encoding: UTF-8
OS name: "mac os x", version: "14.0", arch: "aarch64", family: "mac"
André
from ci.maven.
Thanks for the sample project @andre-doherty. I will try to work on this next week. Did you try the workaround?
from ci.maven.
hello @cherylking,
Yes, sorry i did not give you a feedback on the suggested workaround.
It doesn't work as well, it fails also but with a different error.
[ERROR] Could not restart the server.
io.openliberty.tools.common.plugins.util.PluginExecutionException: org.apache.maven.plugin.MojoExecutionException: CWWKM2173E: Failed to install application from project project:lib:jar:0.0.1-SNAPSHOT. The project packaging type is not supported.
at io.openliberty.tools.maven.server.DevMojo$DevMojoUtil.libertyDeploy (DevMojo.java:417)
at io.openliberty.tools.common.plugins.util.DevUtil.restartServer (DevUtil.java:1855)
at io.openliberty.tools.common.plugins.util.DevUtil$HotkeyReader.readInput (DevUtil.java:2610)
at io.openliberty.tools.common.plugins.util.DevUtil$HotkeyReader.run (DevUtil.java:2577)
at java.lang.Thread.run (Thread.java:833)
Caused by: org.apache.maven.plugin.MojoExecutionException: CWWKM2173E: Failed to install application from project project:lib:jar:0.0.1-SNAPSHOT. The project packaging type is not supported.
at io.openliberty.tools.maven.applications.DeployMojo.installProject (DeployMojo.java:204)
at io.openliberty.tools.maven.applications.DeployMojo.doDeploy (DeployMojo.java:103)
at io.openliberty.tools.maven.applications.DeployMojo.execute (DeployMojo.java:61)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo (MojoExecutor.java:120)
at io.openliberty.tools.maven.server.StartDebugMojoSupport.runLibertyMojo (StartDebugMojoSupport.java:362)
at io.openliberty.tools.maven.server.StartDebugMojoSupport.runLibertyMojoDeploy (StartDebugMojoSupport.java:328)
at io.openliberty.tools.maven.server.StartDebugMojoSupport.runLibertyMojoDeploy (StartDebugMojoSupport.java:311)
at io.openliberty.tools.maven.server.DevMojo$DevMojoUtil.libertyDeploy (DevMojo.java:415)
at io.openliberty.tools.common.plugins.util.DevUtil.restartServer (DevUtil.java:1855)
at io.openliberty.tools.common.plugins.util.DevUtil$HotkeyReader.readInput (DevUtil.java:2610)
at io.openliberty.tools.common.plugins.util.DevUtil$HotkeyReader.run (DevUtil.java:2577)
at java.lang.Thread.run (Thread.java:833)
André
from ci.maven.
You can test the fix with the 3.9-SNAPSHOT
. We are targeting a release by the end of this week.
from ci.maven.
FWIW, just noting that I tried and failed to recreate this with Maven v3.8.8.... but I did succeed recreating on the noted v3.9.3. Thought that was interesting to observe the version-specific behavior for this Maven API.
from ci.maven.
Related Issues (20)
- Maven properties are not being replaced by their values when prepare-feature reads a bill of materials
- Add support for Maven property references in `copyDependencies`
- Add automated test for Podman support
- In multi-module dev mode, the DevUtil compile fails for a sub-module although compile mojo compilation suceeds.
- Duplicate jvm.options entries generated from a single -Dliberty.jvm.xyz=123 system property in v3.10 HOT 3
- Confusing when user provides app config but plugin generates one anyway because of location mismatch HOT 2
- liberty-maven-plugin should rely on the build toolchain configuration to build / rebuild code HOT 3
- Maven plugin prints extraneous warnings HOT 2
- Unable to measure code coverage after migrating to 3.10 HOT 5
- Warning message on download of feature *.esa.ac file when installing features yet feature verification seems to succeed HOT 4
- Support expansion variables for server.env config files
- In liberty:create goal, liberty-plugin-config.xml doesn't reflect precedence of liberty.bootstrap.* props over <bootstrapPropertiesFile> plugin config HOT 2
- Deploy goal doesn't allow for user-specified <springBootApplication> config in server.xml; will always generate deployment config HOT 1
- Exception when 'run' goal is executed for SpringBoot repackaged WAR with looseApplication=false and SB deploy
- Detect installation directory changes when `dev` mode is running and handle it somehow
- Incorrect values in liberty-plugin-config.xml for assemblyArtifact and assemblyInstallDirectory HOT 1
- Handle spaces in project path for devc HOT 3
- Error found when running Liberty dev container mode with Liberty Maven Plugin 3.10.1 on Linux HOT 2
- Maven Version issue HOT 4
- LMP 3.10 and 3.10.1 do not pickup the change from server.xml HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ci.maven.