In a maven multi-module project, how to pack one child project?

I am working on a multi-module maven project. Some time ago, the project was divided into subprojects:

  • "General" JAR project
  • "User" of the WAR project, depending on Common
  • and etc.

This is the same project that is described here in this matter .

When I call mvn packageat the superproject level, the team succeeds, and as a result, war can be launched. But if I try to call mvn packageat the subproject level, the command will fail.

[ERROR] Failed to execute goal on project User: Could not resolve 
dependencies for project xxx.xxx:User:war:0.0.1-SNAPSHOT: Failed 
to collect dependencies for [xxx.xxx:Common:jar:0.0.1-SNAPSHOT (compile), ...

Apparently maven is trying to load my own project (Common) from a remote repo ...

Downloading: http://repository.jboss.org/maven2/xxx/xxx/Common/0.0.1-SNAPSHOT/maven-metadata.xml
Downloading: http://download.java.net/maven/glassfish/xxx/xxx/Common/0.0.1-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata xxx.xxx:Common:0.0.1-SNAPSHOT/maven-metadata.xml from/to jboss (http:/
/repository.jboss.org/maven2): Access denied to: http://repository.jboss.org/maven2/xxx/xxx/common/0.0.1-SNA
PSHOT/maven-metadata.xml

What could be wrong in my configuration?

+3
source share
3 answers

mvn package superproject, target, .

, mvn package subproject, dependency sibling module, dependency , , , .

mvn install superproject, mvn package .

+2

(JBoss) pom.xml settings.xml. . , "403 Forbidden". Jboss. (Http://repository.jboss.org/)

0

, "", Raghuram, , , , mvn , . , mvn install/package .

0

All Articles