Skip to content

Commit e22c05c

Browse files
vtitovValentin Titov
authored and
Valentin Titov
committed
MDEPLOY-255 altDeploymentRepositoryURL w/a for altDeploymentRepository in mingw/cygwin on windows
1 parent 8f5aae8 commit e22c05c

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java

+24
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ public class DeployMojo
9898
@Parameter( property = "altDeploymentRepository" )
9999
private String altDeploymentRepository;
100100

101+
@Parameter( property = "altDeploymentRepositoryId" )
102+
private String altDeploymentRepositoryId;
103+
104+
@Parameter( property = "altDeploymentRepositoryURL" )
105+
private java.net.URL altDeploymentRepositoryURL;
106+
101107
/**
102108
* The alternative repository to use when the project has a snapshot version.
103109
*
@@ -148,6 +154,24 @@ public void execute()
148154
{
149155
failIfOffline();
150156

157+
if ( altDeploymentRepository == null
158+
&& altDeploymentRepositoryURL != null
159+
//&& altDeploymentRepositoryURL.toString().length() > 0
160+
&& altDeploymentRepositoryId != null
161+
//&& altDeploymentRepositoryId.length() > 0
162+
)
163+
{
164+
getLog().info( "altDeploymentRepositoryId is: " + altDeploymentRepositoryId );
165+
getLog().info( "altDeploymentRepositoryURL is: " + altDeploymentRepositoryURL );
166+
altDeploymentRepository =
167+
String.format( "%s::%s", altDeploymentRepositoryId, altDeploymentRepositoryURL );
168+
getLog().info( "combined altDeploymentRepository is: " + altDeploymentRepository );
169+
}
170+
else
171+
{
172+
getLog().info( "altDeploymentRepository is: " + altDeploymentRepository );
173+
}
174+
151175
// CHECKSTYLE_OFF: LineLength
152176
// @formatter:off
153177
ProjectDeployerRequest pdr = new ProjectDeployerRequest()

0 commit comments

Comments
 (0)