Edwin Punzalan <epunzalan <at> exist.com> writes:

> What is your directory structure for this?

c:\prj
    +--m1
    +--m2

> The parent pom is searched in the file system FIRST before any of the 
> repositories... The reason why your build is searching the repo is 
> probably because the parent pom is not located "../pom.xml" from the 
> module project.

As you can see above, the parent pom.xml is indeed in the parent
directory. It has made no attempt to locate it in the file 
system.

> You can use <relativePath> inside the <parent> tag to tell the reactor 
> where to look for the parent's pom.

It doesn't seem to work. I receive the same error. Here is m2's pom:

<project>
        <parent>
                <groupId>org.foo</groupId>
                <artifactId>prj</artifactId>
                <version>1.0</version>
                <relativePath>../pom.xml</relativePath>
        </parent>
        ...
<project>

The error is:

$ mvn install
[INFO] Scanning for projects...
[INFO] --------------------------------------
[INFO] Building Module 2 for Test Project
[INFO]    task-segment: [install]
[INFO] --------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
Downloading: http://repo1.maven.org/maven2/org/foo/prj/1.0/prj-1.0.pom
[WARNING] Unable to get resource from repository central 
(http://repo1.maven.org/maven2)
[INFO] --------------------------------------
[ERROR] BUILD ERROR
[INFO] --------------------------------------
[INFO] Failed to resolve artifact.

GroupId: org.foo
ArtifactId: prj
Version: 1.0

Reason: Unable to download the artifact from any repository

  org.foo:prj:pom:1.0



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

Reply via email to