문제

I have a Maven-3 multi-module project:

/root
  pom.xml
  /bar
    pom.xml
  /foo
    pom.xml

Module foo depends on module bar, and they both have the same parent: root. Everything works fine, until I decided to clean my local repository and run mvn site:site. Build fails with a message:

Failed to resolve artifact.
Missing:
1) com.XXX:bar:jar:1.0-SNAPSHOT

It is a known bug or I'm doing something wrong? I didn't configure maven-project-info-reports-plugin anyhow in any pom.xml yet.

도움이 되었습니까?

해결책

If you do site:site, you are running the specific site goal and not the build cycle, thus the project will not build, and since you just cleaned the repository, the artifact will not be there anywhere to use.

See following links for more information about build lifecycles in maven:

http://www.sonatype.com/books/mvnref-book/reference/lifecycle.html

http://www.sonatype.com/books/mvnref-book/reference/lifecycle-sect-package-specific.html

다른 팁

Perhaps you should try goal site:stage on the root/master-pom.

I didn't try this with src/site in the childs, cause i only have a src/site in the master.

But this work fine for me with Maven 3.0 and a menu ref="reports" in roots site.xml and putting maven-project-info-reports-plugin in the childs pom.xml

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top