Hi, Brain Dump wrote:
> Hey -- sorry about the information overload. I've seen other posts on > other forums where people posted too little information and were asked to > post their source code or run something on full debug, etc., so I tried to > be complete. Didn't mean to overwhelm, and thanks for the responses. > > Simply said, the dependency child-dep-jdk15 was handled without a problem > in Maven 2.2.1 but its presence causes Maven 3.0.4 to look for the parent > POM in remote repositories. Both child-alpha and child-dep-jdk15 have the > same parent. The dependency child-dep-jdk15 was separately compiled and > available on our own remote repository. > > I did try adding <relativePath>../pom.xml</relativePath> to the parent > section of child-alpha, and that had no effect. The only two things that > I've managed to do to get the build to succeed is to (1) remove the > dependency listed within <profiles></profiles> of child-alpha, or (2) > first run mvn -N install on the parent first. So it seems that the > presence of the dependency is what's causing the problem, but I don't > understand why. (I haven't tried starting from scratch yet.) Neither > option above is okay because I need that dependency, and running mvn -N > install would be complicated for branching and our continuous integration > server. 1/ Your parent is not a SNAPSHOT version (*), therefore M3 might resolve it from the repository and ignore any relativePath element. 2/ You seem to define the repository in the POM. Don't do this. M3 might ignore these, because you could never really control foreign repositories defined in arbitrary POMs. Repositories should be declared in your settings.xml. 3/ Because of 1 and 2, M3 might fail to resolve the parent POM. *) You should never build a non-SNAPSHOT version except when releasing it. - Jörg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
