Skip to content

[MASSEMBLY-944] Goal assembly:single tries to load artifacts from unknown repositories-server #1161

@jira-importer

Description

@jira-importer

Oliver Glowa opened MASSEMBLY-944 and commented

Problem Description

According to MASSEMBLY-917 and the comment i have to disagree. The problem occurs in case :

  • You are using an artifact-A (from the official maven-repo)
  • This artifcat has an <repositories>-Tag defined, for some (private) maven-repo-A
  • Your own artifact-B is only deployed on your own (private) maven-repo-B
  • You have defined in artifcat-B an <repositories>-Tag for your own maven-repo-B
  • Your artifact-B is not deployed to the official maven-repo

When executing goal "assembly:single" the goal tries to load artifact-B from

  • official maven-repo -> (fails)
  • maven-repo-A (1-n defined servers) -> (fails)
  • maven-repo-B (success)

Logfile excerpt

[INFO] --- maven-assembly-plugin:3.0.0:single (default-cli) @ assembly-plugin-sample ---
[INFO] Reading assembly descriptor: src/main/assembly/package.xml
Downloading from terracotta-releases: http://www.terracotta.org/download/reflector/releases/com/glowa-net/samples/assembly-plugin-artifact/1.0-SNAPSHOT/maven-metadata.xml
Downloading from codehaus.snapshots: http://snapshots.repository.codehaus.org/com/glowa-net/samples/assembly-plugin-artifact/1.0-SNAPSHOT/maven-metadata.xml
Downloading from apache.snapshots: https://repository.apache.org/snapshots/com/glowa-net/samples/assembly-plugin-artifact/1.0-SNAPSHOT/maven-metadata.xml
Downloading from terracotta-snapshots: http://www.terracotta.org/download/reflector/snapshots/com/glowa-net/samples/assembly-plugin-artifact/1.0-SNAPSHOT/maven-metadata.xml
Downloading from sonatype-nexus-snapshots: https://oss.sonatype.org/content/repositories/snapshots/com/glowa-net/samples/assembly-plugin-artifact/1.0-SNAPSHOT/maven-metadata.xml
Downloading from ow2-snapshot: http://repository.ow2.org/nexus/content/repositories/snapshots/com/glowa-net/samples/assembly-plugin-artifact/1.0-SNAPSHOT/maven-metadata.xml
Downloading from apache-snapshots: http://people.apache.org/repo/m2-snapshot-repository/com/glowa-net/samples/assembly-plugin-artifact/1.0-SNAPSHOT/maven-metadata.xml
Downloading from codehaus-snapshots: http://snapshots.repository.codehaus.org/com/glowa-net/samples/assembly-plugin-artifact/1.0-SNAPSHOT/maven-metadata.xml
Downloading from jvnet-nexus-snapshots: https://maven.java.net/content/repositories/snapshots/com/glowa-net/samples/assembly-plugin-artifact/1.0-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata com.glowa-net.samples:assembly-plugin-artifact:1.0-SNAPSHOT/maven-metadata.xml from/to terracotta-releases (http://www.terracotta.org/download/reflector/releases): Authorization failed for http://www.terracotta.org/download/reflector/releases/com/glowa-net/samples/assembly-plugin-artifact/1.0-SNAPSHOT/maven-metadata.xml 403 Forbidden
[WARNING] Could not transfer metadata com.glowa-net.samples:assembly-plugin-artifact:1.0-SNAPSHOT/maven-metadata.xml from/to codehaus.snapshots (http://snapshots.repository.codehaus.org): Transfer failed for http://snapshots.repository.codehaus.org/com/glowa-net/samples/assembly-plugin-artifact/1.0-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata com.glowa-net.samples:assembly-plugin-artifact:1.0-SNAPSHOT/maven-metadata.xml from/to codehaus-snapshots (http://snapshots.repository.codehaus.org): Transfer failed for http://snapshots.repository.codehaus.org/com/glowa-net/samples/assembly-plugin-artifact/1.0-SNAPSHOT/maven-metadata.xml
[INFO] Copying files to C:\projects\projects_testing\assembly-plugin-sample\target\assembly-plugin-sample-1.0-SNAPSHOT-dis
[WARNING] Assembly file: C:\projects\projects_testing\assembly-plugin-sample\target\assembly-plugin-sample-1.0-SNAPSHOT-dis is not a regular file (it may be a directory). It cannot be attached to the project build for installation or deployment.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS

This has an impact on the build cycle and build time.

E.g.:
I have 30 artifacts of my own, the logfile above shows 3 additionally defined repo-servers.
So, the "single"-goal executes 90 requests which are all failing, before all my artifacts are loaded from my own repo-server (30 artifacts x 3 additional repo-server) .

The problem occurs first with R3.0.0 and seemed to me NOT a configuration problem (s. comment from Karl Heinz Marbaise), because the problem does not occur with R2.6:

  • official maven-repo (fails)
  • maven-repo-B (success)

Logfile excerpt

[INFO] --- maven-assembly-plugin:2.6:single (default-cli) @ assembly-plugin-sample ---
[INFO] Reading assembly descriptor: src/main/assembly/package.xml
[INFO] Copying files to C:\projects\projects_testing\assembly-plugin-sample\target\assembly-plugin-sample-1.0-SNAPSHOT-dis
[WARNING] Assembly file: C:\projects\projects_testing\assembly-plugin-sample\target\assembly-plugin-sample-1.0-SNAPSHOT-dis is not a regular file (it may be a directory). It cannot be attached to the project build for installation or deployment.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS

Example

I've added an example as attachment and the corrosponding logfiles when executing with R2.6 and R3.0.0 of the plugin.

 


Affects: 3.0.0, 3.1.0, 3.1.1, 3.3.0

Attachments:

Issue Links:

Metadata

Metadata

Assignees

No one assigned

    Labels

    StalebugSomething isn't workingwaiting-for-feedbackWaiting for 90 days until issues or pull request will be closed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions