Bug 1004868

Summary: EAP cartridge maps to specific EAP release
Product: OpenShift Container Platform Reporter: Rich Lucente <rlucente>
Component: ContainersAssignee: Brenton Leanhardt <bleanhar>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.2.0CC: baulakh, gpei, libra-onpremise-devel, rlucente
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openshift-origin-cartridge-jbosseap-2.3.11.2-1 openshift-origin-cartridge-jbossews-0.4.10-1 Doc Type: Bug Fix
Doc Text:
Previously the default pom template for JBoss EAP referenced an older version of JBoss EAP, and the EWS cartridge referenced a dependency that was not required. This was confusing for users, and in some cases initial application builds failed in environments where only the latest EAP jars were available in the maven repository. The EAP pom templates have been updated to eliminate confusion and application builds no longer fail.
Story Points: ---
Clone Of:
: 1005281 (view as bug list) Environment:
Last Closed: 2013-09-25 15:31:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1005281    

Description Rich Lucente 2013-09-05 15:55:28 UTC
The template files included in the EAP cartridge (specifically pom.xml) refer to a specific version of EAP.  This is problematic because the EAP rpm package tracks the latest EAP release although the cartridge itself is not synced to that release.  For OSE 1.2, the pom.xml file specifies:

        <dependencies>
                <dependency>
                        <groupId>org.jboss.spec</groupId>
                        <artifactId>jboss-javaee-6.0</artifactId>
                        <version>3.0.0.Final-redhat-1</version>
                        <type>pom</type>
                        <scope>provided</scope>
                </dependency>
        </dependencies> 

The org.jboss.spec dependency is then used by maven during builds to transitively get all the needed EAP artifact dependencies.  Because the version element is 3.0.0.Final-redhat-1, the cartridge is essentially specifying all dependencies for the EAP 6.0.0 release.  For EAP 6.1.1 (most recent), the version should be 3.0.2.Final-redhat-4.

This problem manifests itself in disconnected environments when a shared EAP maven repository only contains artifacts for the current EAP release, resulting in missing dependencies during maven builds.  Including artifacts from the EAP 6.0.0 release in the shared maven repository resolves this issue, but software is then being built against artifacts several releases older than what's currently installed.

The default repository reference used by the cartridge for both artifacts and maven plugins is http://maven.repository.redhat.com/techpreview/all.  This repository includes specs for all released versions of EAP, but the maven builds within OSE are only going to use the EAP 6.0.0 dependencies.  For disconnected environments, the downloaded maven repository zips from our customer support portal must be used and they are not cumulative to past versions.

Ideally, changes to EAP releases should also include changes to the corresponding OSE cartridge to ensure they remain in sync.

Comment 2 Brenton Leanhardt 2013-09-06 17:19:41 UTC
Should we change the EWS cartridge's pom template as well?

Comment 3 Rich Lucente 2013-09-06 19:26:59 UTC
The EWS cartridge includes the same information:

		<dependency>
			<groupId>org.jboss.spec</groupId>
			<artifactId>jboss-javaee-6.0</artifactId>
			<version>3.0.0.Final-redhat-1</version>
			<type>pom</type>
			<scope>provided</scope>
		</dependency>

I'm not sure this makes sense since EWS is basically supported tomcat (6 or 7 with EWS 2) and Apache HTTPD.  I'm not sure why the template specifies the JEE 6 compliant jars.

Comment 5 Gaoyun Pei 2013-09-11 12:34:04 UTC
Checked this issue on puddle 1.2/2013-09-10.2

The related content has been added to the pom.xml.
But for jbossews app, the jboss-javaee-6.0 dependency was still exist in pom.xml, so assign it back.

Comment 6 Brenton Leanhardt 2013-09-11 13:12:46 UTC
I'm looking into this problem.  For some reason the EWS cartridge wasn't built in Brew.

Comment 8 Gaoyun Pei 2013-09-12 02:41:51 UTC
Verify this with openshift-origin-cartridge-jbossews-0.4.10-1.el6op.noarch.

The jboss-javaee-6.0 dependency has been removed from pom.xml.

Thanks!

Comment 11 errata-xmlrpc 2013-09-25 15:31:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1275.html