Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342046 - Invalid third party dependencies in Mavenized BIRT plugins
Summary: Invalid third party dependencies in Mavenized BIRT plugins
Status: RESOLVED FIXED
Alias: None
Product: Dash
Classification: Technology
Component: Maven (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Dash Incoming bugs CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-06 12:34 EDT by Mike Pettypiece CLA
Modified: 2011-12-29 16:19 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Pettypiece CLA 2011-04-06 12:34:43 EDT
Build Identifier: 

Many of the third party dependencies for BIRT artifacts are invalid:

http://maven.eclipse.org/nexus/content/repositories/testing/org/eclipse/birt/org.eclipse.birt.core/2.6.2/org.eclipse.birt.core-2.6.2.pom

<dependency>
<groupId>org.mozilla.javascript</groupId>
<artifactId>org.mozilla.javascript</artifactId>
<version>[1.6.0,2.0.0)</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>com.ibm.icu</artifactId>
<version>[4.2.1,5.0.0)</version>
<optional>false</optional>
</dependency>

They should probably be (with appropriate versions):

<dependency>
    <groupId>com.ibm.icu</groupId>
    <artifactId>icu4j</artifactId>
</dependency>
<dependency>
    <groupId>rhino</groupId>
    <artifactId>js</artifactId>
</dependency>

org.eclipse.birt.report.engine also has invalid dependencies:

http://maven.eclipse.org/nexus/content/repositories/testing/org/eclipse/birt/org.eclipse.birt.report.engine/2.6.2/org.eclipse.birt.report.engine-2.6.2.pom


<dependency>
<groupId>org.w3c.css</groupId>
<artifactId>org.w3c.css.sac</artifactId>
<version>[0,)</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.lowagie.text</groupId>
<artifactId>com.lowagie.text</artifactId>
<version>[1.3.0,3.0.0)</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.xerces</groupId>
<artifactId>org.apache.xerces</artifactId>
<version>[2.8.0,3.0.0)</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.batik</groupId>
<artifactId>org.apache.batik.transcoder</artifactId>
<version>[0,)</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>org.apache.batik</groupId>
<artifactId>org.apache.batik.css</artifactId>
<version>[0,)</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>org.apache.batik</groupId>
<artifactId>org.apache.batik.util</artifactId>
<version>[0,)</version>
<optional>false</optional>
</dependency>




Reproducible: Always

Steps to Reproduce:
1. Add a BIRT component as a dependency to a maven project

e.g.
<dependency>
<groupId>org.eclipse.birt</groupId>
<artifactId>org.eclipse.birt.core</artifactId>
<version>2.6.2</version>
</dependency>

Only the POM will be downloaded to the local maven repository because of the invalid transitive dependencies.
Comment 1 Aaron Digulla CLA 2011-04-14 10:13:17 EDT
I'm working on a fix. I have half of it (a way to specify patches for POMs). Now I need a smart way to merge them into the POM.

Some of the missing dependencies are from Project Orbit which contains a lot of projects which you can also find on Maven Central.

So some people will have Orbit imported into their Maven Repo. They will want the original names.

Others will want to work with Maven Central. For those, the dependencies need to be swapped out.

I'll try to solve this with profiles but I'm not sure about the names I should chose.
Comment 2 Aaron Digulla CLA 2011-05-16 04:49:36 EDT
Ok, I created new tools to apply patches. The current solution is to use two profiles (m4e.orbit and m4e.maven-central). 

m4e.orbit is active by default. If you want Maven Central, you need to deactivate it for your builds.

I'm still investigating methods to do this in a POM (say in the parent POM of your build).

The POM you mentions contains the new code. Have a look and let me know if this solves your issues.
Comment 3 Bob Tiernay CLA 2011-09-22 22:39:51 EDT
Any word on this?
Comment 4 Aaron Digulla CLA 2011-12-19 16:46:25 EST
Mike, please give me feedback whether this is resolved or not so I can close the issue.

FWIW: My solution at work (where we use BIRT) was to create a Maven project that consists of all BIRT sources copied into a single place plus a simple POM with all the dependencies.

Allows me to build a BIRT release in a couple of seconds but that doesn't really help here.

I could probably share this code but I'm not sure how useful it is. It contains lots of patches (replacing JUL with slf4j, replacing some singletons with Guice, ...) and I don't really want to open another can of worms :-)
Comment 5 Mike Pettypiece CLA 2011-12-29 14:25:18 EST
I've verified that the 3rd party dependencies are now resolved correctly in maven.
Comment 6 Aaron Digulla CLA 2011-12-29 16:19:00 EST
Thanks :-)