[
https://issues.apache.org/jira/browse/MASSEMBLY-874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17016987#comment-17016987
]
Andrey Turbanov edited comment on MASSEMBLY-874 at 1/16/20 2:50 PM:
--------------------------------------------------------------------
As I can in debugger see artifacts are downloaded there -
https://github.com/apache/maven-assembly-plugin/blob/master/src/main/java/org/apache/maven/plugins/assembly/archive/task/AddDependencySetsTask.java#L158
Perhaps code should set more parameters in {{ProjectBuildingRequest}}.
Something like this:
{code}
Index:
src/main/java/org/apache/maven/plugins/assembly/archive/task/AddDependencySetsTask.java
<+>UTF-8
===================================================================
---
src/main/java/org/apache/maven/plugins/assembly/archive/task/AddDependencySetsTask.java
(revision 178d0d0e3af1557f0c1400de33cce9885e1d89ab)
+++
src/main/java/org/apache/maven/plugins/assembly/archive/task/AddDependencySetsTask.java
(date 1579186139177)
@@ -180,7 +180,9 @@
private ProjectBuildingRequest getProjectBuildingRequest(
AssemblerConfigurationSource configSource )
{
- return configSource.getMavenSession().getProjectBuildingRequest();
+ ProjectBuildingRequest pbr =
configSource.getMavenSession().getProjectBuildingRequest();
+ pbr.setRemoteRepositories( project.getRemoteArtifactRepositories() );
+ return pbr;
}
private boolean isUnpackWithOptions( DependencySet dependencySet )
{code}
was (Author: turbanoff):
As I can in debugger see artifacts are downloaded there -
https://github.com/apache/maven-assembly-plugin/blob/master/src/main/java/org/apache/maven/plugins/assembly/archive/task/AddDependencySetsTask.java#L158
Perhaps code should set more parameters in {{ProjectBuildingRequest}}
> maven-assembly plugin always downloads dependencies from net
> ------------------------------------------------------------
>
> Key: MASSEMBLY-874
> URL: https://issues.apache.org/jira/browse/MASSEMBLY-874
> Project: Maven Assembly Plugin
> Issue Type: Improvement
> Affects Versions: 3.1.0
> Environment: Multi-Module build
> Reporter: Roland Schäuble
> Assignee: Enrico Olivelli
> Priority: Major
> Attachments: make.log
>
>
> The maven-assembly-plugin always loads it own dependencies from the internet,
> although the required dependencies are available in the local m2 repositiory.
> The local repository is updated with the dependencies but during the next
> build, the files are downloaded from the internet again instead of getting
> them from the local repo.
> In the attached log, near the end, the unnecessary downloads begin with
> "Downloading from central:
> [https://repo.maven.apache.org/maven2/com/lowagie/itext/2.1.7.js5/itext-2.1.7.js5.pom."|https://repo.maven.apache.org/maven2/com/lowagie/itext/2.1.7.js5/itext-2.1.7.js5.pom.]
> The files are definitely available in my local repository under
> ~/.m2/repository/com/...
--
This message was sent by Atlassian Jira
(v8.3.4#803005)