[
https://issues.jboss.org/browse/JBIDE-11374?page=com.atlassian.jira.plugi...
]
Nick Boldt edited comment on JBIDE-11374 at 3/23/12 3:07 PM:
-------------------------------------------------------------
Did a bit more digging here... turns out that while you CAN pass in a platform variable
like ${HOME} (if you're not on Windows), you can't use ${basedir} or
${project.build.directory} to define a relative path [1], since ${basedir} is set to each
plugin or feature's path when resolving target platform, eg.:
In parent pom:
{code}
<local.site>file:///${basedir}/../build/target-platform/REPO/</local.site>
{code}
Then run this:
{code}
cd ~/trunk/tests; mvn3 install -Plocal.site
{code}
And get:
{code}
[INFO] Adding repository
file:////home/nboldt/eclipse/workspace-jboss/jbosstools_trunk/tests/plugins/org.jboss.tools.tests/../build/target-platform/REPO/
[ERROR] Internal error: java.lang.RuntimeException: java.lang.RuntimeException:
org.eclipse.equinox.p2.core.ProvisionException: No repository found at
file:////home/nboldt/eclipse/workspace-jboss/jbosstools_trunk/tests/plugins/org.jboss.tools.tests/../build/target-platform/REPO/.
-> [Help 1]
{code}
[1]
http://docs.codehaus.org/display/MAVENUSER/MavenPropertiesGuide
And since I don't know for sure that you have the target-platform folder checked out
in ~/trunk/build/target-platform, and under that a REPO/ folder exists, I can't use an
absolute path to the directory.
So, we're back to just setting the path like this
(
https://community.jboss.org/wiki/HowToBuildJBossToolsWithMaven3):
{code}cd <yourComponent>
mvn clean install -U -B -fae -e -P local.site
-Dlocal.site=file:/${HOME}/trunk/build/target-platform/REPO/ | tee build.all.log.txt
or
mvn3 clean install -U -B -fae -e -Plocal.site
-Dlocal.site=file:///C:/trunk/build/target-platform/REPO/ > build.all.log.txt
{code}
was (Author: nickboldt):
Did a bit more digging here... turns out that while you CAN pass in a platform
variable like ${HOME} (if you're not on Windows), you can't use ${basedir} or
${project.build.directory} to define a relative path [1], since ${basedir} is set to each
plugin or feature's path when resolving target platform, eg.:
In parent pom:
{code}
<local.site>file:///${basedir}/../build/target-platform/REPO/</local.site>
{code}
Then run this:
{code}
cd ~/trunk/tests; mvn3 install -Plocal.site
{code}
And get:
{code}
[INFO] Adding repository
file:////home/nboldt/eclipse/workspace-jboss/jbosstools_trunk/tests/plugins/org.jboss.tools.tests/../build/target-platform/REPO/
[ERROR] Internal error: java.lang.RuntimeException: java.lang.RuntimeException:
org.eclipse.equinox.p2.core.ProvisionException: No repository found at
file:////home/nboldt/eclipse/workspace-jboss/jbosstools_trunk/tests/plugins/org.jboss.tools.tests/../build/target-platform/REPO/.
-> [Help 1]
{code}
[1]
http://docs.codehaus.org/display/MAVENUSER/MavenPropertiesGuide
And since I don't know for sure that you have the target-platform folder checked out
in ~/trunk/build/target-platform, and under that a REPO/ folder exists, I can't use an
absolute path to the directory.
So, we're back to just setting the path like this
(
https://community.jboss.org/wiki/HowToBuildJBossToolsWithMaven3):
{quote}
cd <yourComponent>
mvn clean install -U -B -fae -e -P local.site
-Dlocal.site=file:/${HOME}/trunk/build/target-platform/REPO/ | tee build.all.log.txt
or
mvn3 clean install -U -B -fae -e -Plocal.site
-Dlocal.site=file:///C:/trunk/build/target-platform/REPO/ > build.all.log.txt
{quote}
BUILD USABILITY BUG: build should assume target platform is in
build/target-platform/REPO
------------------------------------------------------------------------------------------
Key: JBIDE-11374
URL:
https://issues.jboss.org/browse/JBIDE-11374
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: Build/Releng
Affects Versions: 3.3.0.Beta3
Reporter: Rob Stryker
Assignee: Nick Boldt
Fix For: 3.3.0.CR1
If I run the command: mvn clean install -f ../build/pom-core.xml
-Parchives-bootstrap,default,local.site -Dmaven.test.skip=true
Then the build system assumes we're running on hudson. The error is:
{code}
[ERROR] Internal error: java.lang.RuntimeException: java.lang.RuntimeException:
org.eclipse.equinox.p2.core.ProvisionException: No repository found at
file:/home/hudson/static_build_env/jbds/target-platform_3.3.indigo.SR2/e372M-wtp332M.target/.
-> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException:
java.lang.RuntimeException: org.eclipse.equinox.p2.core.ProvisionException: No repository
found at
file:/home/hudson/static_build_env/jbds/target-platform_3.3.indigo.SR2/e372M-wtp332M.target/.
{code}
Our documentation, however, insists we put the repo over in build/target-platform/REPO/.
If our documentation wants the target-platform there, then the build system should assume
it is there first, rather than assume it is in a hudson-specific location.
Documentation:
https://community.jboss.org/wiki/HowToBuildJBossToolsWithMaven3
Currently, if no local.site is set, it assumes it will be at
file:/home/hudson/static_build_env/jbds/target-platform_3.3.indigo.SR2/e372M-wtp332M.target/,
but really it should assume it is at ../build/target-platform/REPO/
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira