Bug 1057631 - Modify maven repository generation for CP stream to generate deltas
Summary: Modify maven repository generation for CP stream to generate deltas
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Maven Repository, Documentation
Version: 6.2.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: GA
: EAP 6.2.2
Assignee: sgilda
QA Contact: Nikoleta Hlavickova
URL:
Whiteboard: docrebuild
Depends On:
Blocks: 1056638
TreeView+ depends on / blocked
 
Reported: 2014-01-24 14:06 UTC by Vaclav Tunka
Modified: 2017-10-10 00:18 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-02 12:50:11 UTC
Type: Bug


Attachments (Terms of Use)

Description Vaclav Tunka 2014-01-24 14:06:40 UTC
The patch mechanism currently tries to include only those jboss-as-* or wildfly-* jars, that contain different classes compared to previous released EAP version. However the maven repository contains always the newer jars.

Here is one of the QE potential blocker bugs filed on CP1:
Maven repo contains jars with different version than EAP
https://bugzilla.redhat.com/show_bug.cgi?id=1056638

This currently impacts maven repository and BOMs.

I think this behavior is reasonable for the sake of RPMs, equal distribution content between RPMs & zips and minimal size of the patch itself, given it's cumulative and it's going to be larger and larger as time goes on. However it presents new challenges including the need to compare files on class level instead of just comparing hashes, modifying the generation process for maven repository, etc.

PM have preference to ship deltas of maven repo for each CP (customer would just copy over the CP maven repo zip or use the hosted repository).

Comment 1 Vladimir Dosoudil 2014-01-27 16:11:59 UTC
The Maven Repository Jenkins job produce incremental zip,
https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/jboss-eap-6.2.x-maven-repository/
Application: Unzip into a directory with installed EAP 6.2.0 Maven repository.

Comment 2 Nikoleta Hlavickova 2014-01-29 13:21:27 UTC
The new mechanism was used in 6.2.1.CP.CR3. However, it has not been documented yet. Please add instructions to installation guide how a customer is supposed to use the delta of maven repository (apply/rollback a patch).

Comment 3 sgilda 2014-01-30 00:18:48 UTC
Vladimir, I'll be helping Russell with the documentation for this. Can you ping me (sgilda) so we can discuss this?

Comment 4 Russell Dickenson 2014-01-30 01:01:55 UTC
The documentation of this is slightly complicated. The instructions on handling the Maven zip file is not in the Installation Guide but the Development Guide. The name of the zip file is mentioned explicitly, and as this is likely to change, the instructions also need to change.

Documentation of applying the JBoss EAP 6.2 CPs is already done, including the rollback of said patches. However the installation of the Maven zip file does not have a rollback method other than reinstalling the Maven zip file previously installed.

Perhaps we ought to mention the updated Maven zip file in the JBoss EAP 6.2 CP01 Release Notes?

Comment 5 Vladimir Dosoudil 2014-01-31 12:25:22 UTC
This is the brief and general instruction for installation EAP 6.2.x incremental Maven repository.zip:


Prerequisite:
Installed EAP 6.2.0 GA Maven repository zip. Unzipped into a local directory, hereinafter ${EAP_MAVEN_REPO_PATH}.


Application:
Unzip into existing installation of EAP 6.2.x Maven repository.

Command:
unzip -o jboss-eap-${PATCH_VERSION}-incremental-maven-repository.zip -d ${EAP_MAVEN_REPO_PATH}

where

${PATCH_VERSION} -- the version of applied EAP 6.2.x patch,
${EAP_MAVEN_REPO_PATH} -- the location of installed EAP 6.2.x Maven repository.

Comment 6 sgilda 2014-01-31 13:04:05 UTC
More information from Vladimir on IRC:

* The patch mechanism doesn't work with the Maven repository.

* The Maven patch file is an incremental zip. It only contains new JARs. It does not overwrite any existing JARs nor does it remove JARS, so there is no rollback requirement.

* This is based on the Maven principle that a released maven artifact is never replaced.

Comment 7 sgilda 2014-01-31 16:27:47 UTC
Updated the topic: Apply a Patch to the Local Maven Repository [28282]

Comment 8 sgilda 2014-02-03 12:16:26 UTC
I'm confused. Is the purpose of this bug to generate the patch or to document how to apply the patch?

Comment 9 sgilda 2014-02-03 12:50:28 UTC
Russell, I assume this topic goes in one of the 6.2 books, correct? Where should it be added?

As far as I can see, it could go in either the Installation Guide or Development Guide in the following locations.

********************
INSTALLATION GUIDE
********************

13449: Installation Guide for 6.2 

Chapter: Patching and Upgrading JBoss EAP 6
  About Patches and Upgrades [24385, rev: 550310]
    [Refer-to:
      Patch Installation [T-Patch-Installation],
      Upgrade Instructions [T-Upgrade-Instructions]]
  Section: Patch Installation [T-Patch-Installation]
    About Patching Mechanisms [13441, rev: 545448]
    Subscribe to Patch Mailing Lists [13442, rev: 545448]
#    Install Patches in zip form [13443]
    Section: Install Patches in Zip Form
      The <command>patch</command> Command [21440, rev: 545448]
      Installing Patches in Zip Form Using the <command>patch</command> Command [21405, rev: 545448]
        [Prerequisite:
          JBoss EAP 6 Installation Prerequisites [234]]
      Rollback the Application of a Patch in Zip Form Using the <command>patch</command> Command [21470, rev: 545448]
    Install Patches in RPM form [13444, rev: 548478]
      [Prerequisite:
        JBoss EAP 6 Installation Prerequisites [234]]
    Severity and Impact Rating of JBoss Security Patches [13447, rev: 545448]
  Section: Upgrade Instructions [T-Upgrade-Instructions]
    Upgrade the JBoss EAP 6 ZIP Installation [12710, rev: 567287]
    Upgrade the JBoss EAP 6 RPM Installation [12709, rev: 545737]
    Upgrade JBoss EAP Cluster from 6.0 to 6.1 [13892, rev: 545738]
  Section: Upgrade the Maven Repository                  <----- NEW SECTION
    Apply a Patch to the Local Maven Repository [28282]  <----- NEW TOPIC

********************
DEVELOPMENT GUIDE
********************

14875: Development Guide for 6.2
Chapter: Maven Guide
  Section: Learn about Maven
    About the Maven Repository [1841, rev: 459881]
    About the Maven POM File [5721, rev: 155458]
    Minimum Requirements of a Maven POM File [5723, rev: 332011]
    About the Maven Settings File [5756, rev: 155458]
  Section: Install Maven and the JBoss Maven Repository
    Download and Install Maven [8896, rev: 332015]
    Install the JBoss EAP 6 Maven Repository [8321, rev: 459882]
    Install the JBoss EAP 6 Maven Repository Locally [5707, rev: 581809]
    Install the JBoss EAP 6 Maven Repository for Use with Apache httpd [5722, rev: 581768]
    Install the JBoss EAP 6 Maven Repository Using Nexus Maven Repository Manager [7827, rev: 581774]
    About Maven Repository Managers [8765, rev: 332098]
  Section: Use the Maven Repository
    Configure the JBoss EAP Maven Repository [8418, rev: 459886]
    Configure the JBoss EAP 6 Maven Repository Using the Maven Settings [5709, rev: 562921]
    Configure the JBoss EAP 6 Maven Repository Using the Project POM [4606, rev: 459888]
    Manage Project Dependencies [22363, rev: 569205]
  Section: Upgrade the Maven Repository                  <----- NEW SECTION
    Apply a Patch to the Local Maven Repository [28282]  <----- NEW TOPIC

Comment 11 Nikoleta Hlavickova 2014-02-09 14:47:48 UTC
Please move the new topic to EAP 6.2 book as it describes how to apply a patch to EAP Maven repository for 6.2.x CP releases.

I reviewed the topic at provided URL and found these issues:

(1) Sentence "The ZIP file contains new JAR files." is true but not complete because the incremental ZIP file does not contain only JARs. It contains POM files too.

Suggestion for improvement: The ZIP file contains new JAR and POM files.

(2) redundant "in the"
For more information about the JBoss EAP patching process, see the chapter entitled Patching and Upgrading JBoss EAP 6 >>>in the in the<<< Administration and Configuration Guide for JBoss Enterprise Application Platform 6 located on the Customer Portal at https://access.redhat.com/site/documentation/JBoss_Enterprise_Application_Platform/. 

(3) Inaccurate Procedure 2.10. Update the Maven Repository
Sentence "Locate the path to JBoss EAP Maven repository, referred to in the commands below as EAP_MAVEN_REPOSITORY_PATH, for your operating system." is correct. 
However the rest of this point refer to default Maven repository, not the EAP 6.2.0 one:
A. For Linux, this is usually the ~/.m2/repository/ directory.
B. For Windows, this can be either \Documents and Settings\USER_NAME\.m2\repository\ or \Users\USER_NAME\.m2\repository\, depending on the version of the operating system.

Look at topic 2.2.3. Install the JBoss EAP 6 Maven Repository Locally and the result of Procedure 2.1. Download and Install the JBoss EAP 6 Maven Repository to the Local File System. It says: "This creates a Maven repository directory called jboss-eap-6.2.0.maven-repository." - this is the correct location of the EAP 6.2.0 Maven repository which is referred as EAP_MAVEN_REPOSITORY_PATH.

Suggestion for improvement:
Refer to Procedure 2.1. Download and Install the JBoss EAP 6 Maven Repository to the Local File System. instead of saying:

Comment 12 sgilda 2014-02-10 03:31:29 UTC
I made the changes suggested above.

Russell, you asked me to update the 6.3 Development Guide. Is it okay to modify the 6.2 Development Guide as this impacts localization?

Comment 14 sgilda 2014-02-11 16:47:05 UTC
Modified the following topic that is included in the 6.2.1 Release Notes: 

Install a Patch Update [28500]

The release notes now say:

For information about how to apply an incremental patch to a local Maven repository, see Apply a Patch to the Local Maven Repository in the Development Guide for JBoss EAP 6.

Comment 15 sgilda 2014-02-13 19:16:04 UTC
From Mark Yarborough on IRC:

For 6.2.1: (discussed and agreed after the PM call by jawilson, vtunka, myarboro)
     
Text displayed: Red Hat JBoss Enterprise Application Platform 6.2 CP01
Zip file name:  jboss-eap-6.2.1.zip

Text displayed: Red Hat JBoss Enterprise Application Platform 6.2 CP01 Incremental Maven 
Zip file name:  jboss-eap-6.2.1-incremental-maven-repository.zip 

Text displayed: Red Hat JBoss Enterprise Application Platform 6.2 CP01 Source Code
Zip file name:  jboss-eap-6.2.1-src.zip

Text displayed: Red Hat JBoss Enterprise Application Platform 6.2 CP01 Javadocs
Zip file name:  jboss-eap-6.2.1-javadoc.zip

Comment 17 Nikoleta Hlavickova 2014-02-24 09:56:23 UTC
There are some minor corrections needed:

(1) No need to point to Development Guide URL in Development Guide: 
For more information about the Maven, see the chapter entitled Maven Guide in the Development Guide for JBoss Enterprise Application Platform 6 located on the Customer Portal at https://access.redhat.com/site/documentation/JBoss_Enterprise_Application_Platform/.

Suggestion for improvement:
Link to appropriate section in the same document

Note:
This section is located in chapter Maven Guide so do not refer the whole chapter.


(2) Incorrect Customer Portal text: Find Red Hat JBoss Enterprise Application Platform 6.x.x.CP.xx Maven Repository in the list and click 
Download. 

Suggestion for improvement:
Red Hat JBoss Enterprise Application Platform 6.2 CPx Incremental Maven Repository 
(Almost the same as in comment #15 -- missing "Repository" there)


(3) Unzip the Maven patch file directly into the installation directory of the JBoss EAP 6.x.x Maven repository. 

Suggestion for improvement:
Unzip the Maven patch file directly into the installation directory of the JBoss EAP 6.2.x Maven repository. 

Note:
The guide is for EAP 6.2.x releases and it is not applicable to all 6.x.x releases. 


(4) unzip -o jboss-eap-PATCH_VERSION-incremental-maven-repository.zip -d EAP_MAVEN_REPOSITORY_PATH

Suggestion for improvement:
unzip -o jboss-eap-6.2.x-incremental-maven-repository.zip -d EAP_MAVEN_REPOSITORY_PATH

Comment 18 sgilda 2014-02-24 14:32:11 UTC
1) This topic was originally intened for the Installation Guide. As it was moved to Chapter 3 in the Development Guide, I think we should totally remove the reference to see the this chapter. 

2) This is correct in the topic XML. Apparently the revision was not updated in the content spec. I will see if I can get a rebuild of the book.

3) Again, this is correct in the topic. It did not make the book.

4) Fixed.

I will get a build to docstage, 

Once it's verified, I will get it pushed to the Customer Portal.

Comment 20 sgilda 2014-02-24 20:45:28 UTC
This needs a rebuild of the 6.2.1 Development Guide.

Comment 21 Nikoleta Hlavickova 2014-02-25 07:09:30 UTC
Looks good, thanks for the fixes. I now noticed another minor problem:

"nor does it remove JARS" should be "nor does it remove JARs" (lowercase 's')

Sorry I did not notice earlier, I hope it can be fixed in the same rebuild.

Comment 22 sgilda 2014-02-25 11:54:34 UTC
Good catch! Fixed it time. Thanks!

Comment 24 sgilda 2014-03-03 18:00:39 UTC
This change was never published.

In the meantime, someome modified this topic replacing 6.2 with 6.3. This makes no sense because 6.3 will not even need a patching process at this point. 

I reverted this topic back to its original state.
I will build the book on docstage.
I will talk to Russell about pushing it to the Customer Portal.

Comment 26 Nikoleta Hlavickova 2014-03-04 13:50:34 UTC
Verified with EAP 6.2.2.CP.CR2


Note You need to log in before you can comment on or make changes to this bug.