Comments (6)
@blirp Thank you for bringing this to our attention. We would like to understand your particular use case. Can you describe your project configuration / setup?
We have no reason to believe that our goals (other than dev mode which is meant to be a single interactive session) are not thread safe, but we have not taken the step to document them as such.
from ci.maven.
I have found two instances of static variables that should be looked at. One is in CommonLogger (this may be more tricky to change) and the other is in StartDebugMojoSupport (configFilesCopied
variable).
from ci.maven.
I have a medium sized application with 44 modules in total, and about 500K of Java code. (And an unknown number of Spring XML configuration). The application is split into three main modules, 'common', 'frontend' and 'backend'. Mostly JSP. We use Liberty for both the frontend and backend modules.
My hope was that giving Maven some more threads, we could speed up build times a bit. That gave various warnings about non-thread-safe plugins. Most I could easily update, but not the liberty-maven-plugin.
from ci.maven.
I have found two instances of static variables that should be looked at. One is in CommonLogger (this may be more tricky to change) and the other is in StartDebugMojoSupport (
configFilesCopied
variable).
Why do you thing the static logger could be a problem? If it is final, I do not see a problem here.
and the other is in StartDebugMojoSupport (configFilesCopied variable).
This one:
I don't see why not just make it non-static. If I am not mistaken, maven plugins are loaded in their own ClassLoader. That means as long as the plugin does not run twice in the same module at the same time with the same goal (which is unlikely for StartDebugMojoSupport), this should work.
from ci.maven.
@bmarwell Thanks for looking at those. I agree that the static variable in StartDebugMojoSupport
can just be made non-static.
As for the CommonLogger
, I suppose I could make the logger
static variable final
. But the loggerImpl
referenced by that static logger
can change with every call to getInstance
, which seems problematic to me if called from multiple threads. Maybe I am overthinking it?
from ci.maven.
Just found another class that needs modifications for thread safety in ci.common. It is utilizing a lot of static variables. Not sure of the history there. Will look into changing those to non-static variables.
from ci.maven.
Related Issues (20)
- 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
- In version 3.10.1, encountering an error in 'Start in container' functionality while running in Podman. HOT 5
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.