Philippe,

Excellent comments, and I agree with you on not depending on stuff with
relative paths.  But here's where it gets into a jam.

My far-from-modern CM group requires that we check in the binary artifacts
for our 3ps, and depend on them from a VOB checked out of ClearCase.  So our
repo, as is now supported in Maven 2, is a "file://../../3pvob" type of path
rather than an HTTP path.

So I think with that extra revelation on my part, you can see that I can't
quite "gather these files up" as I would be able to do with a set of
resources, or something similar, but rather actually HAVE to path to the
file-based-repository in this case.  I know this is a tough little problem
here, and it's mostly because of the antiquatedness of my CM group.

Let me know if you have any more ideas on this.  And thanks again all.

-Matthew


Philippe Le Marchand wrote:
> 
> Hi Matthew,
> 
> This question comes back regularly, as I looked for an answer myself...
> I came to the conclusion that, according to some posts on this matter,
> that Maven's philosophy doesn't encourgae the use of relative paths
> connecting modules, as you are never sure that a module will reside on
> the same file system than an other, hence the basic dependency
> mechanism ;-)
> 
> The solution would be to gather all build related resources, like
> filter properties files, in a separate project (jar packaging) and set
> this artifact as a dependency in the modules that need it.
> It should even be declared as an extension, like :
> 
> ...
>   <build>
>     <extensions>
>       <extension>
>         <groupId>my.group.id</groupId>
>         <artifactId>build-tools</artifactId>
>         <version>1.0-SNAPSHOT</version>
>       </extension>
>     </extensions>
> ...
> 
> You therefore just need to access the required resources from the
> classpath.
> A question remains to me : how to do so? :-D
> By declaring my filter like that ?
> 
> ...
>    <filters>
>      <filter>filter-${env}.properties</filter>
>    </filters>
> ...
> 
> The <filter> entry doesn't work, I get :
> 
> [INFO] Error loading property file
> '/path/to/project/folder/filter-myenv.properties'
> 
> I've tried with ${classpath}/filter-${env}.properties,
> ${maven.compile.classpath}/filter-${env}.properties, without
> success...
> 
> Does anybody has an idea?
> 
> Thanks,
> 
> Philippe
> 
> On 10/5/07, Matthew McCullough <[EMAIL PROTECTED]> wrote:
>>
>> Here's an additional thread on this exact same problem by someone else.
>> Can't find a solution in the thread though:
>>
>> http://mail-archives.apache.org/mod_mbox/maven-continuum-users/200701.mbox/[EMAIL
>>  PROTECTED]
>>
>>
>>
>> Matthew McCullough wrote:
>> >
>> > Maven users,
>> >
>> > Is there a way to retrieve the super, or super-super pom.xml's
>> ${basedir}
>> > such that it consistently returns the "rootmost pom.xml's path"?  It
>> > appears that ${basedir} is always the leafmost pom's path when running
>> a
>> > multimodule build.
>> >
>> > So, for example:
>> > 1) I have a pom.xml at the root of my tree.
>> > 2) I have pom.xmls in subdirectories that reference the parent
>> > 3) I have a property that is defined in the root pom.xml that includes
>> > ${basedir}
>> > 4) Unfortunately, even when running the build via "mvn install" from
>> the
>> > root, each leaf pom, as it gets invoked, recalculates the
>> > root-pom-defined-property for $(basedir) to be relative to the leaf,
>> not
>> > to the original root.
>> >
>> > Any way to get the root pom.xml's path so that I can do a relative
>> pathing
>> > from there?
>> >
>> > -Matthew McCullough
>> > Ambient Ideas
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-can-I-get-the-path-for-a-root-pom.xml%27s-basedir-in-a-multimodule-project-with-pom-inheritance-tf4577123s177.html#a13065923
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-can-I-get-the-path-for-a-root-pom.xml%27s-basedir-in-a-multimodule-project-with-pom-inheritance-tf4577123s177.html#a13096572
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to