Bug 1011917

Summary: Wrong configuration settings make impossible to build any quickstarts example
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Vladimir Rastseluev <vrastsel>
Component: QuickstartsAssignee: sgilda
Status: CLOSED CURRENTRELEASE QA Contact: Vladimir Rastseluev <vrastsel>
Severity: unspecified Docs Contact: Russell Dickenson <rdickens>
Priority: urgent    
Version: 6.2.0CC: benevides, bsutter, dosoudil, jkudrnac, myarboro, nziakova, pmuir, pslavice, rsvoboda
Target Milestone: ER4   
Target Release: EAP 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-15 16:15:39 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: 1010473    

Description Vladimir Rastseluev 2013-09-25 11:48:52 UTC
Description of problem:
In JBoss EAP 6.2.0 ER3 version of quickstarts there is a new sequence of maven settings steps described. The old file example-settings.xml is replaced by settings.xml and there is no need to add EAP maven repo link there, just place it in ~./m2 repository. Actually this file settings.xml doesn't contain place to insert EAP maven repo link to.
When I tried to build quickstart examples following these recomendations, all builds fail. See:
https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/EAP6/view/EAP6-Quickstarts/job/EAP-6.2-Quickstarts-deploy/4/

Version-Release number of selected component (if applicable):
EAP 6.2.0 ER3

How reproducible:
easy

Steps to Reproduce:
follow instructions from README.md file in quickstarts root
Actual results:
build fails

Expected results:
build success

Additional info:
I found a workaround:
it's enough to add to settings.xml a profile with link to EAP maven repo, like this:
   <profile>
      <id>jboss-eap-repository</id>
      <repositories>
        <repository>
          <id>jboss-eap-repository</id>
          <url>file:///path/to/repo/jboss-eap-6.X.X-maven-repository</url>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>jboss-eap-plugin-repository</id>
          <url>file:///path/to/repo/jboss-eap-6.X.X-maven-repository</url>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>

and make it active:
<activeProfile>jboss-eap-repository</activeProfile>

Comment 1 Vladimir Dosoudil 2013-10-01 08:43:49 UTC
PR modifying original Maven repo configuration:
https://github.com/jboss-developer/jboss-eap-quickstarts/pull/618

Comment 2 Rostislav Svoboda 2013-10-01 08:58:47 UTC
I don't see any BZ for change made in PR 618.

Sande, could you please share some details ?

Comment 3 sgilda 2013-10-01 12:04:25 UTC
With EAP 6.2, customers should NOT be required to download a product Maven respository. For now, all artifacts should be available at the following publically accessible locations:

Tech preview: http://maven.repository.redhat.com/techpreview/all
Early access: http://maven.repository.redhat.com/earlyaccess/all/

During development, our internal teams are using the following for testing purposes only, but artifacts must be moved to the above:

http://jboss-developer.github.io/temp-maven-repo/

The Maven libraries will eventually be moved to a well known location.

If the artifacts are missing from the 'Tech Preview' or 'Early Access' libraries, bugs should be entered for that.

Comment 5 sgilda 2013-10-01 19:38:02 UTC
Let me attempt to summarize the result of the discussions.

1. It was pointed out that the master branch needs 2 repositories: 

Tech preview: http://maven.repository.redhat.com/techpreview/all
Early access: http://maven.repository.redhat.com/earlyaccess/all/

During development, you may need the following temporary repository:  
http://jboss-developer.github.io/temp-maven-repo

However, once a quickstart is merged to https://github.com/jboss-developer/jboss-eap-quickstarts, only the techpreview and earlyaccess repositories should be required.

2. According to @pmuir, the settings in the settings.xml file will never work for QE becuase the repository is promoted after QE and not before. 

So QE will need to override the instructions for testing purposes. 

These settings should work for customers though.

Please let me know if I have misunderstood the situation here.

Comment 6 sgilda 2013-10-01 20:02:24 UTC
Clarified with Rafael that the temp repository is needed for the master branch. I added the temp repo to the settings.xml file for both EAP and WFK quickstart master branches.

Comment 8 sgilda 2013-10-02 11:49:19 UTC
Vladimir, the temporary repository should only be needed for quickstarts in the master branch. We should not be merging changes that require the temp-maven-repo into the 6.2.x product branch. That branch should build with only the techpreview and earlyaccess repositories.

Comment 10 sgilda 2013-10-02 14:19:28 UTC
You should be building the quickstarts from the 6.2.x branch: https://github.com/jboss-developer/jboss-eap-quickstarts/tree/6.2.x

The master branch is for ongoing development. We only merge from master to 5.2.x when asked.

To be honest, I don't have time to test the existing quickstarts against any server build. I only run 'mvn clean install' when I need to update version to make sure they still compile.

Is this issue resolved now?

Comment 12 sgilda 2013-10-03 12:29:56 UTC
The settings.xml file is configured to allow a customer to build against the latest release or tagged version of the master branch for https://github.com/jboss-developer/jboss-eap-quickstarts. It is configured to use these repositories:

Tech preview: http://maven.repository.redhat.com/techpreview/all/
Early access: http://maven.repository.redhat.com/earlyaccess/all/

For development purposes, we also add this repository for testing:

http://jboss-developer.github.io/temp-maven-repo/

We can not add the Mead repository to the settings.xml file.

Can you tell me what artifacts are missing from these respositories that prevent EAP 6.2.0 ER3 from building? If you are dependent on artifacts located in the temp-maven-repo, that is a bug and they need to be updated to the earlyaccess repo. 

Can you please explain what is missing?

Comment 15 Pete Muir 2013-10-03 14:54:23 UTC
There are three stages to a quickstarts lifecycle:

1) The quickstart is developed, and merged into the master branch. At this point the quickstart can use the "temp-maven-repo" on github to fetch *BOMs only*. This allows us to update the BOMs outside of the EAP ER cycle. We document this in COTNRIBUTING.md, as it's necessary for quickstart contributors to know about.

2) The quickstarts are merged to the (currently) 6.2.x branch. At this point the BOMs in use are adjusted to a BOM from the latest ER, or perhaps to a SNAPSHOT early on. At this point, the repo generated for the ER will be needed and must be added. This must be documented by the productisation or QE teams, as it's not something available to external contributors, and requires internal resources.

3) An alpha, beta or ga build is published to our customers. The maven repo from the ER is published, extracted, to maven.repository.redhat.com. The quickstarts work with the settings.xml in the repo. This is documented in README.md.

As you can see, the settings.xml is not expected to work until a GA or Beta is available for customers to use, as that settings.xml is targeted at customers. QE and productisation need to adjust their instructions accordingly.

Does this make sense?

Comment 16 sgilda 2013-10-03 14:59:55 UTC
Thanks Pete! You stated it much clearer and more eloquently than I did.

I believe we can close this as 'NOTABUG' because it is configured as intended.

Comment 17 Jitka Kozana 2013-10-04 13:10:16 UTC
EAP 6.2.0.ER4: Using local maven repository (as advised in readme.txt), I have verified that it is now possible to build the quickstarts.