You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Mark McGregor (JIRA)" <ji...@apache.org> on 2017/10/28 17:49:00 UTC

[jira] [Created] (MASSEMBLY-872) Remote repositories incorrectly used in multi module project

Mark McGregor created MASSEMBLY-872:
---------------------------------------

             Summary: Remote repositories incorrectly used in multi module project
                 Key: MASSEMBLY-872
                 URL: https://issues.apache.org/jira/browse/MASSEMBLY-872
             Project: Maven Assembly Plugin
          Issue Type: Bug
    Affects Versions: 3.1.0
            Reporter: Mark McGregor


This is very similar to https://issues.apache.org/jira/browse/MASSEMBLY-855

We just moved to a new build box with no external access.    We immediately started having problems with a couple of projects that use the maven assembly plugin.   We have an internal mirror repository, and everything should be using that.   But when we build these projects we can clearly see in the logs that it is attempting to resolve artifacts externally.

This is a multi module pom.   The plugin version is declared in the parent, plugin details specified in the child.    Repository is only specified in the parent pom.

The build works if the box has external access since the plugin is able to externally resolve all artifcacts.   If there is no external access it fails completely and never attempts to use the repository configured in the parent pom.

Looks to me like the assembly plugin is completely ignoring the repository declarations in the parent pom.

Pom details:

{code:java}
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <appendAssemblyId>false</appendAssemblyId>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                    <finalName>${project.artifactId}</finalName>
                    <archive>
                        <manifest>
                            <mainClass>---our class name was here--</mainClass>
                        </manifest>
                    </archive>
                </configuration>
                <executions>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
{code}

We have no assembly xml or anything like that.

Snippet from log is below.   It always trys to connect outside, never uses our internal repo.   Eventually it abandons the attempts and fails.    Everything else correctly finds all artifacts in our local repo.

{code:java}
[INFO] --- maven-assembly-plugin:3.1.0:single (default) @ resourceservice-migration ---
[INFO] Downloading: https://oss.sonatype.org/content/repositories/snapshots/---OUR JAR NAME--/maven-metadata.xml
[INFO] Downloading: http://repository.apache.org/snapshots/---OUR JAR NAME---/maven-metadata.xml
[WARNING] Could not transfer metadata ---OUR JAR NAME---/maven-metadata.xml from/to sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots): Connect to oss.sonatype.org:443 [oss.sonatype.org/54.173.252.242, oss.sonatype.org/107.23.166.173, oss.sonatype.org/34.199.111.237] failed: Connection timed out
[WARNING] Could not transfer metadata ---OUR JAR NAME--- /maven-metadata.xml from/to apache.snapshots (http://repository.apache.org/snapshots): Connect to repository.apache.org:80 [repository.apache.org/207.244.88.140] failed: Connection timed out
{code}

Workaround for us was to define a proxy to let this get to the outside, but we should not have to do this.





--
This message was sent by Atlassian JIRA
(v6.4.14#64029)