Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MDEPLOY-255] altDeploymentRepositoryURL w/a for altDeploymentRepository in mingw/c… #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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