maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark McGregor (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MASSEMBLY-872) Remote repositories incorrectly used in multi module project
Date Sat, 28 Oct 2017 17:57:00 GMT

     [ https://issues.apache.org/jira/browse/MASSEMBLY-872?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Mark McGregor updated MASSEMBLY-872:
------------------------------------
    Description: 
This sounds 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 the assembly plugin is only 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.   Invocation is
always via the parent pom (.e.g mvn -U clean package on the parent).

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 local 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.



  was:
This sounds 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 the assembly plugin is only 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.




> 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
>         Environment: Jenkins running on Centos linux, Maven 3.3.9, Java 8.0_101
>            Reporter: Mark McGregor
>
> This sounds 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 the assembly plugin is only 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.   Invocation is
always via the parent pom (.e.g mvn -U clean package on the parent).
> 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 local 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)

Mime
View raw message