diff --git a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/transform/AbstractVersionTransformation.java b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/transform/AbstractVersionTransformation.java index 7b6ab2a730..a7c791b1f1 100644 --- a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/transform/AbstractVersionTransformation.java +++ b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/transform/AbstractVersionTransformation.java @@ -73,7 +73,7 @@ public abstract class AbstractVersionTransformation ArtifactRepositoryPolicy policy = artifact.isSnapshot() ? repository.getSnapshots() : repository.getReleases(); - if ( !policy.isEnabled() ) + if ( policy == null || !policy.isEnabled() ) { getLogger().debug( "Skipping disabled repository " + repository.getId() ); } @@ -98,9 +98,8 @@ public abstract class AbstractVersionTransformation } catch ( ResourceDoesNotExistException e ) { - getLogger().debug( - "Artifact version metadata for: " + artifact.getId() - + " could not be found on repository: " + repository.getId(), e ); + getLogger().debug( "Artifact version metadata for: " + artifact.getId() + + " could not be found on repository: " + repository.getId(), e ); continue; }