Skip to content

Commit

Permalink
altDeploymentRepositoryURL w/a for altDeploymentRepository in mingw/c…
Browse files Browse the repository at this point in the history
…ygwin on windows
  • Loading branch information
vtitov authored and Valentin Titov committed Apr 3, 2019
1 parent 8f5aae8 commit f4f362d
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ public class DeployMojo
@Parameter( property = "altDeploymentRepository" )
private String altDeploymentRepository;

@Parameter( property = "altDeploymentRepositoryId" )
private String altDeploymentRepositoryId;

@Parameter( property = "altDeploymentRepositoryURL" )
private java.net.URL altDeploymentRepositoryURL;

/**
* The alternative repository to use when the project has a snapshot version.
*
Expand Down Expand Up @@ -148,6 +154,24 @@ public void execute()
{
failIfOffline();

if ( altDeploymentRepository == null
&& altDeploymentRepositoryURL != null
//&& altDeploymentRepositoryURL.toString().length() > 0
&& altDeploymentRepositoryId != null
//&& altDeploymentRepositoryId.length() > 0
)
{
getLog().info( "altDeploymentRepositoryId is: " + altDeploymentRepositoryId );
getLog().info( "altDeploymentRepositoryURL is: " + altDeploymentRepositoryURL );
altDeploymentRepository =
String.format( "%s::%s", altDeploymentRepositoryId, altDeploymentRepositoryURL );
getLog().info( "combined altDeploymentRepository is: " + altDeploymentRepository );
}
else
{
getLog().info( "altDeploymentRepository is: " + altDeploymentRepository );
}

// CHECKSTYLE_OFF: LineLength
// @formatter:off
ProjectDeployerRequest pdr = new ProjectDeployerRequest()
Expand Down

0 comments on commit f4f362d

Please sign in to comment.