I have a web project that references some other Jars on the build path. I've gone into the project properties --> Java EE Module Dependcies, it also relies on a utility project. I check the utility project and the jars required. When I publish, it only copies the utility project but not the other jars selected. This seems like it may be a bug but I'm not sure if I'm missing something here.

In the "Java EE Module Dependencies" tab I have a bunch of others checked but none of them are in this file. The Jars are in another project in the same workspace and already in the build path. If I click "Add Jars" and manually add them, they'll appear with a little yellow warning sign. They'll be in the xml file but they won't get copied over to the lib.

Matt Rossner wrote:
> Ok so after seeing another thread on this I have some additional info
> but still no solution:
>
> This is my org.eclipse.wst.common.component file
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project-modules id="moduleCoreId" project-version="1.5.0">
> <wb-module deploy-name="Ibee">
> <wb-resource deploy-path="/" source-path="/WebContent"/>
> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
> <dependent-module archiveName="IbeeCommon.jar"
> deploy-path="/WEB-INF/lib" handle="module:/resource/IbeeCommon/IbeeCommon">
> <dependency-type>uses</dependency-type>
> </dependent-module>
> <property name="java-output-path" value="build/classes"/>
> <property name="context-root" value="Ibee"/>
> </wb-module>
> </project-modules>
>
>
> In the "Java EE Module Dependencies" tab I have a bunch of others
> checked but none of them are in this file. The Jars are in another
> project in the same workspace and already in the build path. If I click
> "Add Jars" and manually add them, they'll appear with a little yellow
> warning sign. They'll be in the xml file but they won't get copied over
> to the lib.

Sorry I overlooked this one. You need to also post your ".classpath"
file. I'm wondering if a jar appears multiple times in the build path
(in a project and in dependent projects) whether there could be
ambiguity about whether to publish or not publish that is confusing the
publishing code.

Are any jars appearing in the published WEB-INF/lib besides the
IbeeCommon.jar? If so, are there any jars that are not appearing in
WEB-INF/lib that have the "org.eclipse.jst.component.dependency"
attribute in the ".classpath" file?

Actually I understand why only some had the dependency. I had unchecked a few at some point just as a test and forgot to recheck them. When I check them all, they all have the dependency attribute and none of them get copied over. Although the IbeeCommon jar does get copied.

Matt Rossner wrote:
> Actually I understand why only some had the dependency. I had unchecked
> a few at some point just as a test and forgot to recheck them. When I
> check them all, they all have the dependency attribute and none of them
> get copied over. Although the IbeeCommon jar does get copied.
> Thanks

Please post the ".classpath" and
".settings/org.eclipse.wst.common.component" file for the IbeeCommon
project. Maybe something in there is confusing things. Also, are you
using 3.4.2 of the Java EE package? If not, what version of WTP are you
using with Eclipse 3.4.2?

Ah ha. Your component file looks strangely like your ".classpath" file.
Could that be the problem? :) Would I be correct in assuming you
haven't updated to WTP 3.0.5?

On the assumption that the ".components" file has nothing odd in it,
probably the best way to make progress on this is to first try
temporarily removing the dependency on IbeeCommon and see if that
affects publishing. If the jars still don't appear, create a separate
workspace and see if you can create scaled down versions of Ibee and
IbeeBOF, with minimal content and minimal number of jars, which still
exhibits this problem. If you can duplicate this problem in a new
workspace, create a WebTools bugzilla report with WTP ServerTools as the
Product and "jst.server" as the Component. Attach a zip of the
minimal projects to the bug and post the bug number here. Hopefully
with minimal projects, it won't take a lot of effort to get them up my
own workspace. Then I can examine exactly what is not working for you.
So far, all attempts to duplicate this behavior based on what
information I can glean so far have failed. The jars publish as expected.

Anyway, I've tried making a new workspace with just a basic configuration and sure enough Jars get copied over correctly. I've compared all the .classpath and .setting files and I don't really see any difference but on my project it just doesn't work.

For a while I'm just using an Ant script to copy the missing jars whenever I do a clean on the server but it would be really nice to get this working properly.

Matt Rossner wrote:
> Actually, looks like I just copy/pasted the wrong file. The settings
> file is like this:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project-modules id="moduleCoreId" project-version="1.5.0">
> <wb-module deploy-name="IbeeCommon">
> <wb-resource deploy-path="/" source-path="/src"/>
> </wb-module>
> </project-modules>
>
>
> Anyway, I've tried making a new workspace with just a basic
> configuration and sure enough Jars get copied over correctly. I've
> compared all the .classpath and .setting files and I don't really see
> any difference but on my project it just doesn't work.
>
> For a while I'm just using an Ant script to copy the missing jars
> whenever I do a clean on the server but it would be really nice to get
> this working properly.

In this new workspace, import the problem projects, making sure to copy
the projects over to the new workspace. Then see if they misbehave in
the new workspace. The source of the behavior could be something
"odd/corrupt" in the metadata associated with the workspace.