Skip to content

Commit

Permalink
improve code (See #74)
Browse files Browse the repository at this point in the history
  • Loading branch information
tchemit committed Jun 11, 2017
1 parent ee5591f commit d730f38
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -758,16 +758,15 @@ private File resolveThirdPartyDescriptor( MavenProject project, ArtifactReposito
{
getLogger().debug( "Unable to locate third party files descriptor : " + e );

Artifact artifact = (e.getArtifact() != null) ?
e.getArtifact() :
artifactFactory.createArtifactWithClassifier(
project.getGroupId(), project.getArtifactId(), project.getVersion(),
DESCRIPTOR_TYPE, DESCRIPTOR_CLASSIFIER);
Artifact artifact = e.getArtifact() == null
? artifactFactory.createArtifactWithClassifier(
project.getGroupId(), project.getArtifactId(), project.getVersion(),
DESCRIPTOR_TYPE, DESCRIPTOR_CLASSIFIER)
: e.getArtifact();

// we can afford to write an empty descriptor here as we don't expect it to turn up later in the remote
// repository, because the parent was already released (and snapshots are updated automatically if changed)
result = new File(localRepository.getBasedir(), localRepository.pathOf(artifact));
FileUtil.createNewFile( result );
}

return result;
Expand Down

0 comments on commit d730f38

Please sign in to comment.