maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrian Shum" <tcs...@taifook.com>
Subject RE: relativePath not working
Date Fri, 13 Apr 2007 03:48:47 GMT
I have found some discussion of mine with another people long time before, and this may be
related:
 
http://jira.codehaus.org/browse/MNG-740
 
Adrian
 

________________________________

From: franz see [mailto:franz.see@gmail.com]
Sent: Fri 4/13/2007 11:13 AM
To: users@maven.apache.org
Subject: Re: relativePath not working




Good day,

I just tried creating a simple project with inheritance and I cannot
duplicate your problem. I ran mvn validate, mvn package, mvn
compiler:compile and it builds just fine with my Maven 2.0.6, and Java
1.5.0_11, running under Windows XP.

I've attached here that simple project, kindly check if it works in your
machine. If it does not, then I guess it has something to do with your
machine ( maven setup perhaps? ). If it does, then maybe there's something
maybe something in your maven project is causing the failure.

Thanks http://www.nabble.com/file/7847/relative-path-of-parent.zip
relative-path-of-parent.zip ,
Franz


Davis Ford-2 wrote:
>
> Hi Adrian,
>
> I've tried nearly everything.  Note, I'm using 2.0.6.  I tried
>
>   1 removing the <relativePath> setting altogether
>   2 <relativePath>../pom.xml</relativePath>
>   3 <relativePath>../../parent_project</relativePath>
>   4 <relativePath>../../parent_project/pom.xml</relativePath>
>   5 <relativePath> [absolute path here] </relativePath>
>
> I've double-checked the artifactId, groupId, and version in all pom's like
> 100 times to make sure they match.  I've double-checked the directory
> structure the same number of times to make sure it is right.
>
> If I sit in parent_project dir and execute: mvn -N install
>
> Then, yes, I can go into sub-dirs and run commands just fine, b/c it pulls
> the parent pom from the local repo.  This is not desired, b/c I will have
> to
> tell users to execute this command everytime.  They will find it
> confusing,
> and it is yet another step that is easily forgotten.
>
> Is there *any* way to get the relativePath to work?  I've seen other posts
> in the mailing list about it...people having problems, JIRA's filed.  Is
> this still a known issue in 2.0.6?
>
> Thanks in advance,
> Davis
>
>
> On 4/12/07, Adrian Shum <tcshum@taifook.com> wrote:
>>
>> If I remember correctly, if your parent POM is located at the parent
>> directory, you don't need to declare the relative path, as mvn2 should be
>> able to find it.
>>
>> that is, (hope I remember correctly :P ), mvn2 will find the parent POM
>> in
>> the following order:
>> 1) parent directory
>> 2) modules in the same multi-module build
>> 3) repository
>>
>> (However, in 2.0.4, there seems to be a bug prohibiting 1 from working in
>> some scenerioes)
>>
>> Adrian
>>
>> ________________________________
>>
>> From: Davis Ford [mailto:davisford@gmail.com]
>> Sent: Fri 4/13/2007 8:51 AM
>> To: Maven Users List
>> Subject: relativePath not working
>>
>>
>>
>> Hi, I'm using mvn 2.0.6
>>
>> I have a simple structure
>>
>> parent_project
>>    ----sub_project
>>       ----pom.xml
>>    ----pom.xml
>>
>> parent_project has this:
>>
>>    <groupId>my.org</groupId>
>>    <artifactId>parent</artifactId>
>>    <version>1.0-SNAPSHOT</version>
>>    <packaging>pom</packaging>
>>
>> sub_project has this:
>>
>>    <parent>
>>        <groupId>my.org</groupId>
>>        <artifactId>parent</artifactId>
>>        <version>1.0-SNAPSHOT</version>
>>        <relativePath>../pom.xml</relativePath>
>>    </parent>
>>    <groupId>my.org</groupId>
>>    <artifactId>sub</artifactId>
>>    <packaging>pom</packaging>
>>    <version>1.0-SNAPSHOT</version>
>>
>> anytime i issue any mvn command in the sub_project dir, i get:
>> org.apache.maven.reactor.MavenExecutionException: Cannot find parent:
>> etc...
>>
>> how can i get relativePath to work?
>>
>> thx,
>> davis
>>
>>
>>
>>
>> This email is confidential. If you are not the intended recipient, please
>> delete it from your system and notify the sender immediately. Any
>> unauthorized use, disclosure, dissemination or copying of this email is
>> prohibited. Taifook Securities Group, its group companies and their
>> content
>> providers ("Parties") shall not be responsible for the accuracy or
>> completeness of this email or its attachment, if any, which could contain
>> virus, be corrupted, destroyed, incomplete, intercepted, lost or arrive
>> late.   The Parties do not accept liability for any damage caused by this
>> email.
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
>
>
> --
> Zeno Consulting, Inc.
> http://www.zenoconsulting.biz
> 248.894.4922 phone
> 313.884.2977 fax
>
>

--
View this message in context: http://www.nabble.com/relativePath-not-working-tf3569116s177.html#a9972253
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org






This email is confidential. If you are not the intended recipient, please delete it from your
system and notify the sender immediately. Any unauthorized use, disclosure, dissemination
or copying of this email is prohibited. Taifook Securities Group, its group companies and
their content providers ("Parties") shall not be responsible for the accuracy or completeness
of this email or its attachment, if any, which could contain virus, be corrupted, destroyed,
incomplete, intercepted, lost or arrive late.   The Parties do not accept liability for any
damage caused by this email.



Mime
View raw message