Question: Configuration of a Loose Application in Liberty

Answered

Hello,

I want to use a loose application on a websphere liberty with intellij idea 2019.1.3.

This is neccesary because I want to add a second directory with resources to the web artifact (s. screenshot below) so that I can make changes below this folder and can see the changes immediately in the web app.

 

This works perfect so far.

But every time when I change something in the profile section from the maven window

this 'resources' directory was deleted and I have to add the 'resources' directory again.

So my question is how can I avoid that this directory was deleted?

Thanks

Christoph

0
3 comments

You can try adding additional resources via Maven configuration:

https://maven.apache.org/plugins/maven-resources-plugin/examples/resource-directory.html
https://stackoverflow.com/a/13406135/104891

Another option is to make a new artifact manually that will include the contents of the automatically imported artifact and add additional resource location. Artifacts added manually will persist after the Maven project refresh.

0

Hello Serge,

thanks for your hints.

I did not make it work with the Maven configuration (the "resources" folder does not appear in the artifact).

But with an additional artifact it works like a charm.

 

Thanks,

Christoph

0

resources folder probably appears under the compiler output entry. You may need to look for the similar solution for additional webapp contexts.

0

Please sign in to leave a comment.