John Farrelly created MASSEMBLY-855: ---------------------------------------
Summary: Remote repositories ignores in a multi-module project Key: MASSEMBLY-855 URL: https://issues.apache.org/jira/browse/MASSEMBLY-855 Project: Maven Assembly Plugin Issue Type: Bug Components: dependencySet Affects Versions: 3.0.0 Reporter: John Farrelly Attachments: test-parent.tar.gz I have attached a small multi-module project to demonstrate the behaviour. I have a {{test-parent}} project with a child module, {{test-child}}. I have defined a repositories section in {{test-parent}}: {code:xml} <repositories> <repository> <id>jboss-public-repository-group</id> <name>JBoss Public Maven Repository Group</name> <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url> <layout>default</layout> <releases> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </releases> <snapshots> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </snapshots> </repository> </repositories> {code} I have defined the executing of {{maven-assembly-plugin}} in {{test-child/pom.xml}}: {code:xml} <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>3.0.0</version> <configuration> <descriptors> <descriptor>src/assembly/repository.xml</descriptor> </descriptors> </configuration> <executions> <execution> <id>create-repository</id> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin> {code} When I run {{mvn clean package}} from {{test-child}}, I can see that it is using {{repository.jboss.org}} to resolve dependencies: {noformat} [test-parent/test-child] $ mvn clean package [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building test-child 1.0.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ test-child --- [INFO] [INFO] --- maven-assembly-plugin:3.0.0:single (create-repository) @ test-child --- [INFO] Reading assembly descriptor: src/assembly/repository.xml Downloading: https://repository.jboss.org/nexus/content/groups/public-jboss/org/jboss/spec/javax/servlet/jboss-servlet-api_3.0_spec/1.0.0.Beta2/jboss-servlet-api_3.0_spec-1.0.0.Beta2.pom {noformat} However, if I run {{mvn clean package}} from the parent project {{test-parent}}, it will only try to resolve dependencies from maven central, ignoring all repository settings: {noformat} [test-parent] $ mvn clean package [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] test-parent [INFO] test-child [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building test-parent 1.0.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ test-parent --- [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building test-child 1.0.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ test-child --- [INFO] Deleting /media/sf_SharedFolder/Temp/test-parent/test-child/target [INFO] [INFO] --- maven-assembly-plugin:3.0.0:single (create-repository) @ test-child --- [INFO] Reading assembly descriptor: src/assembly/repository.xml Downloading: https://repo.maven.apache.org/maven2/org/jboss/spec/javax/servlet/jboss-servlet-api_3.0_spec/1.0.0.Beta2/jboss-servlet-api_3.0_spec-1.0.0.Beta2.pom {noformat} This causes issues for us when we reference dependencies that don't exist in maven central. {panel:title=Note|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1|bgColor=#FFFFCE} I am using maven version 3.3.3 {panel} -- This message was sent by Atlassian JIRA (v6.3.15#6346)