I'd like to store some bootstrap artifacts (like third party jars) in
maven2 repository layout structure and deliver this repository with my
project's sources. I'd like the top-level project pom to define this
repository such that all lower-level projects will attempt to retrieve
resources from this repository. But I want to refer to the repository
with a relative path so that everything will work whether the project's
source tree is placed. So, for example, I'd like this kind of layout:
pom.xml
repository/
module1/
module2/
And I'd like module1 and module2 to find bootstrap artifacts in the
"repository" subdirectory of the top-level project. If I define, in the
parent project's pom, something like:
<repositories>
<repository>
<id>bootstrap</id>
<name> Bootstrap Repoitory</name>
<url>file://localhost/${basedir}/repository</url>
</repository>
</repositories>
Things won't work because ${basedir} is evaluated in the context of a
child module's pom, and will refer to the directory where that child
module's pom is located. How can I define the file: URL such that it
will be valid in all sub-modules?
-- Eric