mirror of https://github.com/apache/maven.git
o Fixed NPE
git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@965100 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
da5c998ec9
commit
b1e147f59d
|
@ -123,9 +123,15 @@ public class BuildPomMojo
|
|||
MavenProject project = builder.buildFromRepository( artifact, remoteRepositories, localRepository );
|
||||
|
||||
String key = artifact.getId() + ".";
|
||||
props.setProperty( key + "project.name", project.getName() );
|
||||
props.setProperty( key + "project.description", project.getDescription() );
|
||||
props.setProperty( key + "project.id", project.getId() );
|
||||
if ( project.getName() != null )
|
||||
{
|
||||
props.setProperty( key + "project.name", project.getName() );
|
||||
}
|
||||
if ( project.getDescription() != null )
|
||||
{
|
||||
props.setProperty( key + "project.description", project.getDescription() );
|
||||
}
|
||||
if ( project.getArtifact() != null )
|
||||
{
|
||||
props.setProperty( key + "artifact.id", project.getArtifact().getId() );
|
||||
|
|
Loading…
Reference in New Issue