[
https://issues.jboss.org/browse/AS7-3122?page=com.atlassian.jira.plugin.s...
]
Ondrej Zizka updated AS7-3122:
------------------------------
Description:
John Casey:
{quote}
Can you explain exactly how the ${basedir} property will be used? This matters, because
expression resolution happens two different ways, once for POM interpolation and again for
plugin parameter injection. For more information on the differences, you can play with an
expression plugin I built:
http://github.com/jdcasey/expression-maven-plugin (see the
README for information on using it).
{quote}
We need to refer to ${basedir} for two purposes:
1) To be able to pass important directories to the tests, for example:
* AS project root dir
* Testsuite root dir (to access global resources)
* Integration testsuite root dir (to access int. ts. resources)
In this case, we need to be able to define the value in parent pom and retain it for
sub-modules.
2) For various operations (plugin executions) which are defined in parent pom, but
inherited in sub-modules.
In this case, we really need to have it done using relative paths, e.g.
${basedir}/src/config/arquillian .
In both cases, ${basedir} is used for plugins configuration.
John Casey:
{quote}
I've written a plugin called org.commonjava.maven.plugins:directory-maven-plugin that
has goals:
* execution-root = Resolves to the directory where maven was invoked
* directory-of = uses a <project/> configuration with groupId and artifactId to
find another project in the current session, and returns its basedir
* highest-basedir = traverses the parent hierarchies of all current projects, up until
it finds a parent that has been resolved instead of loaded locally. Then, it sorts these
basedir paths and returns the one closest to the filesystem root. If the top two hits
(highest results) are not nested within one another, it will fail.
I'd expect you to use something like these to pin down a particular project basedir
reference, and inject it consistently into each project in the session. It may be that you
actually need something like a combination of the last two, to reference a particular
parent project that was loaded from disk (but may not be in the current session per se).
If so, that's another easy one to write.
The plugin is here:
http://github.com/jdcasey/directory-maven-plugin
You can take a look at the README.md for more information.
{quote}
TS: Find a way to retain same value of property with ${basedir} in
submodules.
------------------------------------------------------------------------------
Key: AS7-3122
URL:
https://issues.jboss.org/browse/AS7-3122
Project: Application Server 7
Issue Type: Sub-task
Components: Test Suite
Reporter: Ondrej Zizka
Assignee: Ondrej Zizka
Fix For: 7.2.0.Alpha1
John Casey:
{quote}
Can you explain exactly how the ${basedir} property will be used? This matters, because
expression resolution happens two different ways, once for POM interpolation and again for
plugin parameter injection. For more information on the differences, you can play with an
expression plugin I built:
http://github.com/jdcasey/expression-maven-plugin (see the
README for information on using it).
{quote}
We need to refer to ${basedir} for two purposes:
1) To be able to pass important directories to the tests, for example:
* AS project root dir
* Testsuite root dir (to access global resources)
* Integration testsuite root dir (to access int. ts. resources)
In this case, we need to be able to define the value in parent pom and retain it for
sub-modules.
2) For various operations (plugin executions) which are defined in parent pom, but
inherited in sub-modules.
In this case, we really need to have it done using relative paths, e.g.
${basedir}/src/config/arquillian .
In both cases, ${basedir} is used for plugins configuration.
John Casey:
{quote}
I've written a plugin called org.commonjava.maven.plugins:directory-maven-plugin that
has goals:
* execution-root = Resolves to the directory where maven was invoked
* directory-of = uses a <project/> configuration with groupId and artifactId to
find another project in the current session, and returns its basedir
* highest-basedir = traverses the parent hierarchies of all current projects, up
until it finds a parent that has been resolved instead of loaded locally. Then, it sorts
these basedir paths and returns the one closest to the filesystem root. If the top two
hits (highest results) are not nested within one another, it will fail.
I'd expect you to use something like these to pin down a particular project basedir
reference, and inject it consistently into each project in the session. It may be that you
actually need something like a combination of the last two, to reference a particular
parent project that was loaded from disk (but may not be in the current session per se).
If so, that's another easy one to write.
The plugin is here:
http://github.com/jdcasey/directory-maven-plugin
You can take a look at the README.md for more information.
{quote}
--
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