-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to start two apps with the same name #583
Comments
Emily, are you customizing the plugin configuration for particular reasons? With 3.0 or above, you should only need to specify the below:
|
When I was recreating the issue, I found the following in the console: [debug] Variable project.name cannot be resolved. That is why the app is getting defined in configDropins folder, resulting in two apps configured for the server. Need to determine why that variable cannot be resolved. I see it in bootstrap.properties. Will debug further. |
I debugged to the point that I see a potential issue. The DevMojo calls the DeployMojo like this:
but copyConfigFiles() doesn't see the "inlined" bootstrap.properties. So the "is the app configured" calculation can't resolve A bit later, when it's time to actually start the server, though, the bootstrap.properties are set on the mojo config. I wonder if it's because the |
I tried a fix in this branch which seems to fix part of the problem: Not sure if there's already a util for building mojo executor Element(s) from Maven xpp3dom (I coded part of one). I observed that, probably because of plugin prefix resolution.. you have to install locally the parent module... you can't just build/install the liberty-maven-plugin module like I'd sometimes try to do as a shortcut. |
Same as issue #581 ? |
I can reproduce this with this project https://github.com/Emily-Jiang/reactive-service-b Looks related to parsing a variable from the server.xml
|
Hello @scottkurz , Thanks for your excellent work on my stackoverflow question. It reminds me of the golden days when BalusC would be so all over JSF questions on StackOveflow I wondered if he was an AI (he's not). I tried to apply your advice in this fork/branch to my simple use case, which seems exactly the same as @Emily-Jiang 's here. In my case I'm using |
@edburns I don't deserve such praise, but thank you for your appreciation :) Yes, the liberty-maven-plugin is failing to parse the server.xml correctly in order to determine the deployed app location. It's doing this in order to determine if it needs to generate config for the app deployment. But it's not handling variables correctly on the webApplication location itself and on the include location, supplying the "filtered" variable that I suggested you create on the StackOverflow post. I opened #1145 to follow-up on that. I'm going to gloss over the "non-deterministic" aspect just a bit without a full explanation. The reason is that I know from experience there is a cache involved that can lead to experiences like you mentioned where it doesn't work the same each time. Acknowledging, not explaining, I know. Also, it looks like you may have only really be using your own config to select a context root of "/". I also opened issue: #1146 to see if we might find an easier way to use our plugin-generated config with a different ctx root like "/", in which case you might not need to worry about resolving variables in your own config. Thanks for working through this with us. |
I found another issue with liberty:dev. Since my server.xml has webApplication, which will put .war under apps, while liberty:dev uses loose mode. I got the following error:
[INFO] [ERROR ] CWWKZ0013E: It is not possible to start two applications called demo.
The text was updated successfully, but these errors were encountered: