IT: update archaic deps (#1903)

This PR is based on dependabot PRs but they require code changes as well.

Based on:
* https://github.com/apache/maven/pull/1895
* https://github.com/apache/maven/pull/1889
This commit is contained in:
Tamas Cservenak 2024-11-13 16:00:55 +01:00 committed by GitHub
parent 4b18bfb9a8
commit f36f8e1bd6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 43 additions and 19 deletions

View File

@ -12,7 +12,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<version>3.2.5</version>
<scope>provided</scope>
</dependency>
</dependencies>

View File

@ -39,19 +39,9 @@ under the License.
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-script-ant</artifactId>
<version>2.2.1</version>
<exclusions>
<exclusion>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
</exclusion>
<exclusion>
<groupId>ant</groupId>
<artifactId>ant-launcher</artifactId>
</exclusion>
</exclusions>
<version>3.15.1</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
@ -89,11 +79,14 @@ under the License.
resources that have a leading slash).
NOTE: We use a version that is different from the version used by the other modules to workaround MNG-1323
via MNG-3284.
cstamas: this above is untrue anymore, plugin and suite updated to 3.x as part of Maven 4 work.
-->
<version>2.4.2</version>
<version>3.15.1</version>
<configuration>
<!-- NOTE: We use a handwritten descriptor to decouple from MPLUGIN-136/MNG-3741 so dump the generated one -->
<outputDirectory>${project.build.directory}</outputDirectory>
<goalPrefix>maven-it-plugin-ant-based</goalPrefix>
<extractors>
<extractor>ant</extractor>
</extractors>
@ -102,7 +95,7 @@ under the License.
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-ant</artifactId>
<version>2.4.2</version>
<version>3.15.1</version>
</dependency>
</dependencies>
</plugin>

View File

@ -51,12 +51,12 @@ under the License.
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>2.0</version>
<version>3.5.3</version>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-file</artifactId>
<version>2.0</version>
<version>3.5.3</version>
</dependency>
</dependencies>
</project>

View File

@ -45,7 +45,7 @@ under the License.
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-provider-api</artifactId>
<version>1.0-beta-2</version>
<version>3.5.3</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>

View File

@ -43,6 +43,7 @@ import org.codehaus.plexus.component.annotations.Component;
*/
@Component(role = org.apache.maven.wagon.Wagon.class, hint = "http-coreit", instantiationStrategy = "per-lookup")
public class CoreItHttpWagon extends AbstractWagon {
@Override
public void get(String resourceName, File destination)
throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException {
InputData inputData = new InputData();
@ -67,11 +68,13 @@ public class CoreItHttpWagon extends AbstractWagon {
getTransfer(inputData.getResource(), destination, is);
}
@Override
public boolean getIfNewer(String resourceName, File destination, long timestamp)
throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException {
return false;
}
@Override
public void put(File source, String resourceName)
throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException {
OutputData outputData = new OutputData();
@ -94,6 +97,7 @@ public class CoreItHttpWagon extends AbstractWagon {
putTransfer(outputData.getResource(), source, os, true);
}
@Override
public void closeConnection() throws ConnectionException {
File f = new File("target/wagon-data");
try {
@ -149,7 +153,13 @@ public class CoreItHttpWagon extends AbstractWagon {
outputData.setOutputStream(new ByteArrayOutputStream());
}
@Override
public void openConnection() throws ConnectionException, AuthenticationException {
// ignore
}
@Override
protected void openConnectionInternal() throws ConnectionException, AuthenticationException {
// ignore
}
}

View File

@ -44,6 +44,7 @@ import org.codehaus.plexus.component.annotations.Component;
*/
@Component(role = org.apache.maven.wagon.Wagon.class, hint = "coreit", instantiationStrategy = "per-lookup")
public class CoreItWagon extends AbstractWagon {
@Override
public void get(String resourceName, File destination)
throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException {
InputData inputData = new InputData();
@ -68,11 +69,13 @@ public class CoreItWagon extends AbstractWagon {
getTransfer(inputData.getResource(), destination, is);
}
@Override
public boolean getIfNewer(String resourceName, File destination, long timestamp)
throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException {
return false;
}
@Override
public void put(File source, String resourceName)
throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException {
OutputData outputData = new OutputData();
@ -95,6 +98,7 @@ public class CoreItWagon extends AbstractWagon {
putTransfer(outputData.getResource(), source, os, true);
}
@Override
public void closeConnection() throws ConnectionException {
File f = new File("target/wagon-data");
try {
@ -155,9 +159,14 @@ public class CoreItWagon extends AbstractWagon {
outputData.setOutputStream(new ByteArrayOutputStream());
}
@Override
public void openConnection() throws ConnectionException, AuthenticationException {
// ignore
}
@Override
protected void openConnectionInternal() throws ConnectionException, AuthenticationException {
// ignore
}
private void put(Properties props, String key, String value) {

View File

@ -44,6 +44,7 @@ import org.codehaus.plexus.component.annotations.Component;
*/
@Component(role = org.apache.maven.wagon.Wagon.class, hint = "scpexe", instantiationStrategy = "per-lookup")
public class ScpExternalWagon extends AbstractWagon {
@Override
public void get(String resourceName, File destination)
throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException {
InputData inputData = new InputData();
@ -68,11 +69,13 @@ public class ScpExternalWagon extends AbstractWagon {
getTransfer(inputData.getResource(), destination, is);
}
@Override
public boolean getIfNewer(String resourceName, File destination, long timestamp)
throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException {
return false;
}
@Override
public void put(File source, String resourceName)
throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException {
OutputData outputData = new OutputData();
@ -97,6 +100,7 @@ public class ScpExternalWagon extends AbstractWagon {
putTransfer(outputData.getResource(), source, os, true);
}
@Override
public void closeConnection() throws ConnectionException {}
public void fillInputData(InputData inputData) throws TransferFailedException, ResourceDoesNotExistException {
@ -144,5 +148,13 @@ public class ScpExternalWagon extends AbstractWagon {
outputData.setOutputStream(new ByteArrayOutputStream());
}
public void openConnection() throws ConnectionException, AuthenticationException {}
@Override
public void openConnection() throws ConnectionException, AuthenticationException {
// ignore
}
@Override
protected void openConnectionInternal() throws ConnectionException, AuthenticationException {
// ignore
}
}