Skip to content

Manu WildFly Quickstarts :: Step by Step

chalda edited this page Feb 15, 2021 · 4 revisions

This guide shows how to get running the Manu based JBoss EAP quickstart testuite.

When developing a new or adjusting an old WildFly quickstart then there should be reated a new manuscript (or adjusted the existing one) which defines the test for that quickstart

Warning
This process is a bit troublesome for me and I don’t know if the presented guideline is the easiest or even good enough.

HOW TO

  1. Download the EAP artifacts from http://download.eng.brq.redhat.com/released/JBoss-middleware/eap7/

    We need the jboss-eap-…​-full-maven-repository.zip, jboss-eap-…​-quickstarts.zip and jboss-eap-…​.zip.

  2. Unzip the maven repository and quickstarts to some directory

    cd /tmp
    unzip ~/Downloads/jboss-eap-7.3.4-full-maven-repository.zip
    unzip ~/Downloads/jboss-eap-7.3.4-quickstarts.zip
  3. Build the quickstarts in the current form (mainly to get poms and download possibly needed jars)

    cd jboss-eap-7.3.4.GA-quickstarts
    mvn clean install -DskipTests -Dmaven.repo.local=/tmp/jboss-eap-7.3.4.GA-maven-repository/maven-repository
    cd -
  4. In the next step we have quickstart changes we want to test with Manu tests. Then update the unzipped quickstart folder with the new quickstart or update the existing one.

    cp -r ~/jboss/quickstart/ejb-txn-remote-call/ jboss-eap-7.3.4.GA-quickstarts
  5. Zip the both folders

    zip -r /tmp/jboss-eap-7.3.4.GA-maven-repository-updated.zip jboss-eap-7.3.4.GA-maven-repository
    zip -r /tmp/jboss-eap-7.3.4-quickstarts-updated.zip jboss-eap-7.3.4.GA-quickstarts
  6. Go (or clone) to the folder with the Manuscripts

    git clone [email protected]:jbossqe-eap/manu-unit-eap-quickstarts.git
    cd manu-unit-eap-quickstarts
  7. Prepare the Manu execution

    export BUILD_ZIP_URL='file:///home/ochaloup/Downloads/eap/jboss-eap-7.3.4.zip'
    export BUILD_QUICKSTART_ZIP_URL='file:///tmp/jboss-eap-7.3.4-quickstarts-updated.zip'
    export MAVEN_REPOSITORY='file:///tmp/jboss-eap-7.3.4.GA-maven-repository-updated.zip'
  8. Compile Manu project to be prepared to execute the manu test in the next step

    mvn clean install -DskipTests
  9. To check if the basic setup works fine you can run the following Manu test

    mvn clean compile manu:execute -Dmanu.scriptPath=org/jboss/manu/eap/quickstarts/dependency-sources.manu \
      -Deap.zip.url=$BUILD_ZIP_URL -Deap.quickstarts.zip.url=$BUILD_QUICKSTART_ZIP_URL -Deap.maven.repository.zip.url=$MAVEN_REPOSITORY
  10. Hack the Manuscript you want to run to be aware of your local ~/.repository folder. You can do so by adding following Manu unit declaration to the desired .manu file below the manu unit execute unit org.jboss.manu.eap.units.CreateMavenSettingsXml (the HackingMaven has to be executed after the settings xml is created).

    execute unit org.jboss.manu.common.units.NativeCommand HackingMaven {
      command=sed
      command.working.directory=/home/ochaloup/jboss/manu-unit-eap-quickstarts/out/CreateSettingsXml/workspace/
      command.arguments=-i, s|<repositories>|<repositories><repository><id>my-internal-site</id><url>file:///home/<YOUR_USER_NAME>/.m2/repository/</url></repository>|,settings.xml
    }
  11. Run the desired Manu test by referencing the .manu file

    mvn clean compile manu:execute -Dmanu.scriptPath=org/jboss/manu/eap/quickstarts/dependency-sources.manu \
      -Deap.zip.url=$BUILD_ZIP_URL -Deap.quickstarts.zip.url=$BUILD_QUICKSTART_ZIP_URL -Deap.maven.repository.zip.url=$MAVEN_REPOSITORY
  12. When something needs to be changed in the code then you will need to change the quickstart and zip it again.

Tips

Manudoc with description of the Manu unit options is available for example at: http://repository.engineering.redhat.com/nexus/content/repositories/jboss-qa-releases/jbossqe-eap-tools-manu/manu-eap-dist/1.1.159/manu-eap-dist-1.1.159.zip After extracting the manudoc can be checked with like firefox doc/manudoc/index.html.

The logs can be found at log/manu-.log. For particular unit log output can be found at out/<unit-name>/.

Trouble shooting

1)

There is error on enforcer about http:// is defined as respository?

Solution: Try to add to manuscript file to manu unit for maven execution (e.g. org.jboss.manu.eap.quickstarts.QuickstartsMaven) the parameters which skp the enforcer plugin (or force it to not fail): -Dinsecure.repositories=WARN -Denforcer.skip=true.

2)

Enforcer plugin fails with

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M2:enforce (enforce-java-version) on project quickstart-parent: Unable to parse configuration of mojo org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M2:enforce for parameter bannedRepositories: Cannot assign configuration entry 'bannedRepositories' with value 'http://*' of type java.lang.String to property of type java.util.List → [Help 1]

Solution: try to upgrade to newer Maven version (e.g. 3.6.3)

3)

In case of failure during compilation Failed to execute goal org.codehaus.mojo:findbugs-maven-plugin:3.0.1:findbugs

Solution: try to downgrade the Maven version (e.g. to 3.3.9).