mirror of https://github.com/apache/maven.git
Changing internal setBaseVersion(..) calls to setBaseVersionInternal(..) to prevent side effects with extending implementations that disallow setting versions directly (as in maven-project).
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@566205 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d632bc8a07
commit
8a889ceadf
|
@ -187,7 +187,7 @@ public class DefaultArtifact
|
||||||
public void setVersion( String version )
|
public void setVersion( String version )
|
||||||
{
|
{
|
||||||
this.version = version;
|
this.version = version;
|
||||||
this.setBaseVersion( version );
|
this.setBaseVersionInternal( version );
|
||||||
this.versionRange = null;
|
this.versionRange = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -361,12 +361,17 @@ public class DefaultArtifact
|
||||||
{
|
{
|
||||||
throw new NullPointerException( "version was null for " + groupId + ":" + artifactId );
|
throw new NullPointerException( "version was null for " + groupId + ":" + artifactId );
|
||||||
}
|
}
|
||||||
setBaseVersion( version );
|
setBaseVersionInternal( version );
|
||||||
}
|
}
|
||||||
return baseVersion;
|
return baseVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBaseVersion( String baseVersion )
|
public void setBaseVersion( String baseVersion )
|
||||||
|
{
|
||||||
|
setBaseVersionInternal( baseVersion );
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setBaseVersionInternal( String baseVersion )
|
||||||
{
|
{
|
||||||
Matcher m = VERSION_FILE_PATTERN.matcher( baseVersion );
|
Matcher m = VERSION_FILE_PATTERN.matcher( baseVersion );
|
||||||
if ( m.matches() )
|
if ( m.matches() )
|
||||||
|
@ -495,7 +500,7 @@ public class DefaultArtifact
|
||||||
public void selectVersion( String version )
|
public void selectVersion( String version )
|
||||||
{
|
{
|
||||||
this.version = version;
|
this.version = version;
|
||||||
setBaseVersion( version );
|
setBaseVersionInternal( version );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGroupId( String groupId )
|
public void setGroupId( String groupId )
|
||||||
|
|
Loading…
Reference in New Issue