Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 333343

Summary: Incorrect packaging of JAR dependencies when deploying WAR to Embedded Virgo via STS/Eclipse
Product: [RT] Virgo Reporter: Jason M. Hanna <jason.m.hanna.at.coincident>
Component: toolingAssignee: Chris Frost <eclipse>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: eclipse, glyn.normington, jason.m.hanna.at.coincident, mlippert
Version: 2.1.0.RELEASE   
Target Milestone: 1.0.1.RELEASE   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 368785    
Attachments:
Description Flags
Test STS Project Demonstrating Issue none

Description Jason M. Hanna CLA 2010-12-30 11:31:09 EST
Build Identifier: 201011111000

Certain types of JAR file dependencies are incorrectly packaged when deploying a WAR-packaged web application to an embedded Virgo Web Server through STS 2.5.1.

The included test project should illustrate the issue. A simple Dynamic Web Project was created in STS and Maven dependency management was enabled. Three library dependencies were added to the pom.xml (OpenJPA, Xalan, and Log4J).

The target runtime was specified as my local Virgo Web Server instance, and we should expect to see these dependencies packaged in WEB-INF/lib.

Unfortunately the OpenJPA and Xalan archives seem to be re-jarred when deployed (e.g. openjpa-2.0.1.jar.jar).

This doesn't happen if I deploy the project to my embedded Tomcat or SpringSource tc Server instances, however. Only when I deploy to my embedded Virgo Web Server instance.



Reproducible: Always

Steps to Reproduce:
1. Download the zipped test project.
2. Import into a STS 2.5.1 instance.
3. Change the project properties to use the Targeted Runtime for your embedded Virgo Web Server
4. Deploy the test project through STS to your embedded Virgo Web Server
5. Browse to the <virgo-install>/stage/TestWP.war/WEB-INF/lib directory from a terminal or Windows Explorer.

You should see the OpenJPA and Xalan JARs have been re-jarred during packaging (e.g. openjpa-2.0.1.jar.jar).
Comment 1 Glyn Normington CLA 2010-12-30 11:42:38 EST
Thanks for raising this Jason. As I mentioned earlier, it will take a while before this is looked at as the donation of the tooling to Eclipse takes priority.
Comment 2 Jason M. Hanna CLA 2010-12-30 11:50:06 EST
Created attachment 185910 [details]
Test STS Project Demonstrating Issue

I'm a newb when it comes to sharing test cases and Eclipse projects. Not sure this was the best way to package and share a project.

When I tried to import my own test I noticed I also needed to re-enable the following project facets:

* Java 1.5
* Dynamic Web Module (v2.5)
 * Select 'Further configuration available...'
 * Change Source folder on build path to: src/main/java
 * Change Default output folder to target/classes
 * Select 'Next'
 * Change Content Directory to: src/main/webapp
 * Click OK

Thanks!
Comment 3 Glyn Normington CLA 2010-12-30 11:54:16 EST
Adding Chris as he has recent experience with the tooling and may be able to advise on workarounds.
Comment 4 Jason M. Hanna CLA 2010-12-30 12:09:36 EST
Thanks Glyn. Could you clarify your 'donation of the tooling to Eclipse' statement?

Virgo has already been fully donated to Eclipse, right? Are you referring to the dm Server application development tools that are currently packaged as part of STS?
Comment 5 Glyn Normington CLA 2010-12-30 12:13:59 EST
(In reply to comment #4)
> Thanks Glyn. Could you clarify your 'donation of the tooling to Eclipse'
> statement?
> 
> Virgo has already been fully donated to Eclipse, right? Are you referring to
> the dm Server application development tools that are currently packaged as part
> of STS?

Yes, but more specifically just the EclipseRT/Virgo portion of the STS tooling. I.e. the donation won't include support for dm Server per se.
Comment 6 Chris Frost CLA 2013-01-28 09:57:45 EST
Tested on the latest tooling and this is working. It may well now be working on the 1.0.0 release of the tooling but if not it will be on the upcoming 1.0.1.RELEASE of the tooling.