Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 899563 (JBPAPP6-39)

Summary: Is org.hamcrest:hamcrest-core missing from the EAP repo?
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Fred Bricon <fbricon>
Component: Maven RepositoryAssignee: Paul Gier <pgier>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0CC: atangrin
Target Milestone: ---   
Target Release: EAP 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBPAPP6-39
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
jboss-eap-6.0.0.Alpha2-maven-repository-DR5
Last Closed: 2012-11-05 00:12:13 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:
Attachments:
Description Flags
pom.xml none

Description Fred Bricon 2011-10-26 10:37:22 UTC
Steps to Reproduce: Try to build attached pom.xml, having the eap6 repo configured in your settings.xml
Workaround Description: Force the use of <version>1.1</version> for hamcrest-core
project_key: JBPAPP6

While trying to adapt the JBoss AS7 community archetypes to use the EAP6 BOM pom, I found this weird issue :
Dependency resolution utterly fails something depends on org.hamcrest:hamcrest-core : 
{noformat}VersionRangeResolutionException: No versions available for org.hamcrest:hamcrest-core:jar:[1.1,1.1-redhat-1] within specified range{noformat}

The weird thing is version 1.1 should be resolved from central. BUT, looking at the maven-central-metadata.xml of hamcrest-core, I have :
{noformat}<metadata>
  <groupId>org.hamcrest</groupId>
  <artifactId>hamcrest-core</artifactId>
  <versioning>
    <latest>1.3.RC2</latest>
    <release>1.3.RC2</release>
    <versions>
      <version>1.2</version>
      <version>1.2.1</version>
      <version>1.3.RC2</version>
    </versions>
    <lastUpdated>20101222163625</lastUpdated>
  </versioning>
</metadata>
{noformat}

No 1.1 here. But forcing the hamcrest-core version to 1.1 in the pom resolves the issue. One maven version resolution weirdness?


Anyway, that [1.1,1.1-redhat-1] range makes me believe hamcrest is known to the EAP6 repo and thus should be shipped with it.

Comment 1 Fred Bricon 2011-10-26 10:37:38 UTC
Attachment: Added: pom.xml


Comment 2 Paul Gier 2011-10-26 13:57:01 UTC
Docs QE Status: Added: NEW


Comment 3 Paul Gier 2011-11-07 16:36:17 UTC
It looks like there are a couple of issues here.  The upstream junit 3.8.2 [1], is packaged with hamcrest, so it doesn't have a dependency in the POM.  Our own build [2] does not include the hamcrest jar, so it is specified as a dependency in the junit POM.  However, the POM doesn't have any version listed for hamcrest which means this POM is invalid and should be fixed.

The second issue is that the hamcrest jar is available in the -build tag [3], but not in the -latest tag [4].  Since junit is in the -latest tag, hamcrest should also be added to this tag to make the Maven repository self contained.

[1]http://repo1.maven.org/maven2/junit/junit/4.8.2/junit-4.8.2.pom
[2]http://download.lab.bos.redhat.com/brewroot/repos/jb-eap-6-rhel-6-latest/latest/maven/junit/junit/4.8.2-redhat-1/
[3]http://download.lab.bos.redhat.com/brewroot/repos/jb-eap-6-rhel-6-build/latest/maven/org/hamcrest/
[4]http://download.lab.bos.redhat.com/brewroot/repos/jb-eap-6-rhel-6-latest/latest/maven/org/hamcrest/


Comment 4 Paul Gier 2011-11-08 13:26:14 UTC
The junit POM is now fixed and the hamcrest dependency was added to the repo.  Also the BOMs used for the quickstarts will be changed in JBPAPP-7225, so the BOM won't try to manage the user's version of junit.

Comment 5 Anne-Louise Tangring 2012-11-04 14:32:43 UTC
Docs QE Status: Removed: NEW 


Comment 6 Anne-Louise Tangring 2012-11-05 00:11:36 UTC
Fixing Affects and Fix in Version