Skip to content
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

Tomcat deploy path considering target/classes instead of actual war folder #122

Open
marcelocastrillo opened this issue Feb 27, 2024 · 1 comment
Assignees
Labels

Comments

@marcelocastrillo
Copy link

Describe the bug
I'm deploying a java app that has a webapp folder.
Inside that webapp folder, we have a web-inf folder where we drop some files that we need in runtime.
Then in the app we access them via: BirtEngine.class.getProtectionDomain().getCodeSource().getLocation().getPath() (BirtEngine is a class of the app).
But the problem is that instead of getting path of the generated folder via maven, it takes as path /target/classes

Intellij & SmartTomcat Version (Help -> About copy & paste below)
IntelliJ IDEA 2023.3.3 (Community Edition)
Smarttomcat 4.7.2

Repository owner deleted a comment from tb12315 Mar 20, 2024
@yuezk
Copy link
Collaborator

yuezk commented Mar 20, 2024

Got your point. This happens because the plugin is trying to collect the class path from different folders (e.g. the Maven output folder) and virtually mount them to WEB-INF/lib or WEB-INF/classes. Since the output folders usually have a higher priority, you could get the target/classes as the result.

But sadly, I didn't come with a solution for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants