mirror of https://github.com/apache/maven.git
[MNG-4779] NullPointerException thrown during dependency resolution when dependency with range occurs more than once in the dirty tree
[MNG-4781] Can't deploy to Nexus staging repository git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@990771 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8c13978af5
commit
1cbef71e7b
|
@ -19,7 +19,6 @@ package org.apache.maven.repository.internal;
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
|
@ -366,18 +365,13 @@ public class DefaultArtifactDescriptorReader
|
|||
Map<String, String> props = null;
|
||||
if ( system )
|
||||
{
|
||||
props = Collections.singletonMap( ArtifactProperties.LACKS_DESCRIPTOR, Boolean.TRUE.toString() );
|
||||
props = Collections.singletonMap( ArtifactProperties.LOCAL_PATH, dependency.getSystemPath() );
|
||||
}
|
||||
|
||||
Artifact artifact =
|
||||
new DefaultArtifact( dependency.getGroupId(), dependency.getArtifactId(), dependency.getClassifier(), null,
|
||||
dependency.getVersion(), props, stereotype );
|
||||
|
||||
if ( system )
|
||||
{
|
||||
artifact = artifact.setFile( new File( dependency.getSystemPath() ) );
|
||||
}
|
||||
|
||||
List<Exclusion> exclusions = new ArrayList<Exclusion>( dependency.getExclusions().size() );
|
||||
for ( org.apache.maven.model.Exclusion exclusion : dependency.getExclusions() )
|
||||
{
|
||||
|
|
|
@ -142,7 +142,8 @@ public class RepositoryUtils
|
|||
Map<String, String> props = null;
|
||||
if ( org.apache.maven.artifact.Artifact.SCOPE_SYSTEM.equals( artifact.getScope() ) )
|
||||
{
|
||||
props = Collections.singletonMap( ArtifactProperties.LACKS_DESCRIPTOR, Boolean.TRUE.toString() );
|
||||
String localPath = ( artifact.getFile() != null ) ? artifact.getFile().getPath() : "";
|
||||
props = Collections.singletonMap( ArtifactProperties.LOCAL_PATH, localPath );
|
||||
}
|
||||
|
||||
Artifact result =
|
||||
|
@ -270,18 +271,13 @@ public class RepositoryUtils
|
|||
Map<String, String> props = null;
|
||||
if ( system )
|
||||
{
|
||||
props = Collections.singletonMap( ArtifactProperties.LACKS_DESCRIPTOR, Boolean.TRUE.toString() );
|
||||
props = Collections.singletonMap( ArtifactProperties.LOCAL_PATH, dependency.getSystemPath() );
|
||||
}
|
||||
|
||||
Artifact artifact =
|
||||
new DefaultArtifact( dependency.getGroupId(), dependency.getArtifactId(), dependency.getClassifier(), null,
|
||||
dependency.getVersion(), props, stereotype );
|
||||
|
||||
if ( system )
|
||||
{
|
||||
artifact = artifact.setFile( new File( dependency.getSystemPath() ) );
|
||||
}
|
||||
|
||||
List<Exclusion> exclusions = new ArrayList<Exclusion>( dependency.getExclusions().size() );
|
||||
for ( org.apache.maven.model.Exclusion exclusion : dependency.getExclusions() )
|
||||
{
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -50,7 +50,7 @@
|
|||
<cipherVersion>1.4</cipherVersion>
|
||||
<modelloVersion>1.4</modelloVersion>
|
||||
<jxpathVersion>1.3</jxpathVersion>
|
||||
<aetherVersion>1.1.1</aetherVersion>
|
||||
<aetherVersion>1.2</aetherVersion>
|
||||
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
|
||||
</properties>
|
||||
|
||||
|
|
Loading…
Reference in New Issue