Bug 970610 (-Djboss.dist)

Summary: jboss.dist property is not correctly propagated using -Djboss.dist
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Radim Hatlapatka <rhatlapa>
Component: TestsuiteAssignee: Ondřej Žižka <ozizka>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Jelinek <pjelinek>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 6.1.0, 6.2.0, 6.1.1CC: akostadi, jcacek, jcasey, jmartisk, kkhan, myarboro, ochaloup, olukas, ozizka, pjelinek, rsvoboda, smumford
Target Milestone: DR0   
Target Release: EAP 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1078701 (view as bug list) Environment:
Last Closed: 2014-06-28 15:40:52 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: 1078701    

Description Radim Hatlapatka 2013-06-04 13:00:58 UTC
When I run testsuite of EAP 6.1.0 using command [1], where JBOSS_HOME is a path EAP 6.1.0, the manualmode tests fail with error [2]:

It uses path defined in jboss.dist property defined in testsuite/integration/pom.xml instead of the one provided -Djboss.dist which should redefine it.


[1] ./integration-tests.sh -Dpublic-repos -DallTests -Dmaven.repo.local=${MAVEN_REPO_LOCAL} -Djboss.dist=${JBOSS_HOME} -Dmaven.test.failure.ignore=true  -Dsurefire.forked.process.timeout=3600

[2]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7-redhat-1:run (build-manual-mode-servers) on project jboss-as-ts-integ-manualmode: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] /mnt/hudson_workspace/workspace/eap-60-as-testsuite-one-offs-rhatlapa/jboss-eap-6.1-src/testsuite/integration/src/test/scripts/manualmode-build.xml:52: /mnt/hudson_workspace/workspace/eap-60-as-testsuite-one-offs-rhatlapa/jboss-eap-6.1-src/build/target/jboss-as-7.2.0.Final-redhat-8/modules does not exist.
[ERROR] around Ant part ...<ant antfile="/mnt/hudson_workspace/workspace/eap-60-as-testsuite-one-offs-rhatlapa/jboss-eap-6.1-src/testsuite/integration/manualmode/../src/test/scripts/manualmode-build.xml">... @ 4:180 in /mnt/hudson_workspace/workspace/eap-60-as-testsuite-one-offs-rhatlapa/jboss-eap-6.1-src/testsuite/integration/manualmode/target/antrun/build-main.xml

Comment 1 Radim Hatlapatka 2013-06-05 07:58:27 UTC
I am able to run the testsuite using simple workaround => by changing
<jboss.dist>${jbossas.project.dir}/build/target/jboss-as-${jboss.as.release.version}</jboss.dist>
to
<jboss.dist>${jboss.dist}</jboss.dist>
in testsuite/integration/pom.xml

Comment 2 John Casey 2013-06-05 22:35:28 UTC
Looks like this is failing because of:

https://jira.codehaus.org/browse/MANTRUN-178

One workaround you could try is to define the jboss.dist property as an expression referencing another property, say jboss.dist.dir. This can have a value in the pom.xml properties section.

You would then use -Djboss.dist.dir=/path/to/jboss and allow maven pom interpolation to supply the CLI value for ${jboss.dist} and have that picked up properly by the antrun plugin.

It looks like the property resolver in the antrun plugin isn't using the MavenSession's getUserProperties() correctly.

Comment 3 Rostislav Svoboda 2013-07-09 12:27:50 UTC
*** Bug 982019 has been marked as a duplicate of this bug. ***

Comment 4 Rostislav Svoboda 2013-07-09 12:30:33 UTC
BZ 982019 contains attachments for osgi and manual mode failures

Comment 7 Ondřej Žižka 2013-07-23 13:21:51 UTC
There's a high chance that the workaround suggested by John in comment #2 will work. I use it for other properties. I could get to it soon.

Comment 10 Ondřej Žižka 2013-10-22 19:56:09 UTC
The workaround for this issue may potentially harm other scenarios, and needs to be tested really well.
Hence it should really not go to EAP without getting to upstream first.

Comment 11 Ondřej Žižka 2013-10-24 02:31:28 UTC
For the reasons above, I'm giving it an DEV NACK. Meaning that it won't be in EAP 6.2 yet (I can't set the eap_620 flag).

Comment 12 Radim Hatlapatka 2013-10-24 08:31:27 UTC
Ondra, why should the workaround suggested by John be potentially harmful in any way to other scenarios? Could you provide example of such scenario?

Comment 14 Jan Martiska 2013-12-17 12:12:15 UTC
I prepared a fix for the OSGi part of this issue, as it is described in #982019 (that BZ was closed as duplicate, so resolving it as part of this issue).
PR: https://github.com/jbossas/jboss-eap/pull/739

Comment 15 Ondrej Lukas 2013-12-17 12:45:27 UTC
Fix for manualmode and patching modules:
https://github.com/jbossas/jboss-eap/pull/736

Comment 16 Pavel Jelinek 2014-02-19 13:28:15 UTC
Fixed in EAP 6.3.0 DR0. There is no more issue with mvn install EAP src, erasure of built EAP and then running integration tests with -Djboss.dist specified.