Another Problem building J2EE module

I have run into another annoying problem building exploded ears -

I had some jars attached to my web module, decided they may be bad so I removed them all and attached new versions.

There is no longer a reference anywhere in the settings to the old jars, as far as I can tell.

However, when I build the ear that references the web module, both versions of the jars show up in the WEB-INF/lib of the exploded directory.

In the ear (non-exploded) version, the jars are not duplicated under WEB-INF/lib.

Note: Closing the project and re-opening does not seem to fix the problem.

Version: 5.1.1

ken

6 comments

Hello Ken,

Does rebuild help? Are the old libraries shown in Settings | Modules | "Web
Module Settings" tab | "Modules and Libraries to package" group?

I have run into another annoying problem building exploded ears -

I had some jars attached to my web module, decided they may be bad so
I removed them all and attached new versions.

There is no longer a reference anywhere in the settings to the old
jars, as far as I can tell.

However, when I build the ear that references the web module, both
versions of the jars show up in the WEB-INF/lib of the exploded
directory.

In the ear (non-exploded) version, the jars are not duplicated under
WEB-INF/lib.

Note: Closing the project and re-opening does not seem to fix the
problem.

Version: 5.1.1

ken

---
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0

No, that is the problem -- rebuild keeps putting those jars in (to the exploded version only). I deleted the exploded directory, closed the project, opened the project and rebuilt, and the jars are all doubled up.

No, they do not show up in the libs to package window.

I realized I left out one crucial piece of information that may be of relevance here:

I built the project in 5.1.1. I opened it in EAP 5218, and created the web module there. I wanted to test out the JSF capabilities in the newest build. I believe that I attached the jars to the web module in 5218.

Finding little support for JSF, I ended that experiment and went back to 5.1.1 to do the actual JSF work.

That is where I deleted the old jars and added the new. Perhaps there is something that 5218 did that is hidden to the module settings in 5.1.1, but still affects the build.

I think I will try to replace the web module with a new one in 5.1.1 the next time that I sit down and work on this.

Note, this may also be related to the other problem I posted about (although it seems less likely) with the classes being rebuilt into WEB-INF/classes.

Thanks,
ken

0

Update:

I rebuilt the web module from scratch, then rebuilt.

The extraneous jars are still getting stuck into WEB-INF/lib of the exploded, despite the fact that they are not referenced in any module setting within the project. Where it gets them from, I cannot say.

Note for the classes getting stuck under WEB-INF/classes -- that still happens too.

Reiteration: the problem only occurs for the exploded version. The jarred ear correctly has neither.

New but related problem: I had one version of commons-beanutils.jar in the dependent java module, and a different one in the web module. I changed the java module to match the web module, and rebuilt. After this, the old version shows up in the root of the ear, in both the exploded and jarred versions. The manifest.mf of the EJB (also built into the same ear as the web app) contains a class-path reference to the old commons-beanutils.jar. Of course you can guess that there is no visible reference to this old jar in any of the project modules.

0

One final update:

I recreated the project from scratch, rebuilding each module, and configuring it exactly as before.

Now the project builds correctly. No classes or jars in the wrong place.

It seems like there are some things that are attached to the project file that are hidden from view, and unconfigurable.

I would recommend some sort of display to view (and remove when necessary) these items.

0

Hello Ken,

I have reproduced your problem (see http://www.jetbrains.net/jira/browse/IDEADEV-5658).
You can use a workaround from this issue until it is not fixed.

One final update:

I recreated the project from scratch, rebuilding each module, and
configuring it exactly as before.

Now the project builds correctly. No classes or jars in the wrong
place.

It seems like there are some things that are attached to the project
file that are hidden from view, and unconfigurable.

I would recommend some sort of display to view (and remove when
necessary) these items.

---
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0

Thanks for logging this and providing a workaround.

ken

0

Please sign in to leave a comment.