Comments (9)
Before I dive too deep on this one, I want to make sure you are using the Maven plugin and not our Gradle plugin, since you used the word tasks
. Please respond with which plugin you are using and what version. Thank you.
from ci.maven.
Yes, I am using the maven plugin, if there is an error caused the task failed, it should clean up the background JVM instance created by OpenLiberty maven plugin.
from ci.maven.
For example, I encountered this issue when deploying app via mvn liberty:run
, OpenLiberty/open-liberty#25363
It will fail my deployment, although I tried to send a CTRL+C
, the open liberty JVM instance is till running.
If I do not stop them in Windows Task Manager manually, I will encountered some resource lock error when running the command again.
from ci.maven.
Hi again, what version of the Liberty Maven Plugin are you using please.
from ci.maven.
3.7.1 at that moment, I will try again later.
from ci.maven.
@hantsy Looks like you will need to set the embedded
parameter to true if you want Control-C to stop the server. See this documentation.
from ci.maven.
Also wanted to mention that we do have a ShutdownHook implemented in the Ant ServerTask
, but it seems to not get reliably invoked on Windows in particular. I am not able to recreate this problem on my Mac.
from ci.maven.
Yes, you should be able to do a Ctrl+C even after a normal mvn liberty:run
to stop both Maven and the server JVMs.
But it's a "best-effort" kind of thing, and if it doesn't end up working it could very well be a low-level, OS-level reason that's hard to debug from our build tooling. For example, on Windows, I know I can reliably recreate an issue like this by simply closing the terminal window/program used to launch mvn from. If I do this, the ShutdownHook will not have a chance to run and I'll experience this kind of issue, though in my experience this doesn't seem to be an issue on Mac or Linux. On the other hand, if I do a Ctrl+C from a normal session after mvn liberty:run
it works fine.
Note that "dev mode", i.e. mvn liberty:dev
, has a similar ShutdownHook registered, and a similar story: "works mostly except for sometimes on Windows".
This might be an opportunity to note that, when possible, we've tried to add additional cleanup in our Liberty Tools IDE plugins. E.g. in Liberty Tools Eclipse we have an extra cleanup watcher. You might be interested to take a look at them (or the Liberty Tools IntelliJ, VSCode extensions), if you haven't yet.
from ci.maven.
@hantsy I am going to close this issue since there are no additional code changes that we are aware of that should be made. We have the correct shutdown hooks in place. Unfortunately, we are at the mercy of the OS and the Java implementation.
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.