Extra directory & wrong file location in WAR file

Hello,
I have a project that ultimately generates a .war file. In this one particular project, the final war file contains extra directories. For example, activation.jar needs to be copied into /WEB-INF/lib. However, activation.jar gets copied into /WEB-INF/lib/activation.jar/activation.jar

Basically, a extra directory of the same name is created and the jar file is copied into this directory. This happens for about 7 different jar files.

I have tried all kinds of settings and nothing seems to help. Anyone else hit this and figure it out?

Thanks.

4 comments
Comment actions Permalink

Hello Anil,

Is activation.jar included as a standalone module library or as part of a
project or global library?
Which packaging method is selected for the library containing activation.jar
(Project Structure | ]]> | Web Module Settings tab | Modules and
Libraries to package)?

Hello,
I have a project that ultimately generates a .war file. In this one
particular project, the final war file contains extra directories. For
example, activation.jar needs to be copied into /WEB-INF/lib. However,
activation.jar gets copied into
/WEB-INF/lib/activation.jar/activation.jar
Basically, a extra directory of the same name is created and the jar
file is copied into this directory. This happens for about 7 different
jar files.

I have tried all kinds of settings and nothing seems to help. Anyone
else hit this and figure it out?

Thanks.



0
Comment actions Permalink

Nikholay,
Thanks for the response.

activation.jar (and all the others) are included as a standalone module library. I am new to IDEA and so I am not sure what it means to make the jar files a part of a project/global library. So, I chose module library (need to read the manual/help sometime :)

I have tried both "Do not package" and "Copy files to" for the packaging method. A couple of times, just flipping from one to the other and back or something random like that caused it to work. But I don't know why that would be so.

Thanks,

Anil.

0
Comment actions Permalink

Nikholay/anyone from Jetbrains- any solutions to my issue?

Thanks.

0
Comment actions Permalink

Hello Anil,

Nikholay,
Thanks for the response.
activation.jar (and all the others) are included as a standalone
module library. I am new to IDEA and so I am not sure what it means to
make the jar files a part of a project/global library. So, I chose
module library (need to read the manual/help sometime :)


You can create a project/global library (Settings | Project Structure | "+"
button | "Library" item) containing several jars and then use this library
in any module/project (Module settings | "Dependencies" tab | "Add" button).

I have tried both "Do not package" and "Copy files to" for the
packaging method. A couple of times, just flipping from one to the
other and back or something random like that caused it to work. But I
don't know why that would be so.


What path is specified in "Path relative to deployment root" column for activation.jar
library in "Modules and libraries to package" table?

Thanks,

Anil.



0

Please sign in to leave a comment.