Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@
import java.util.List;

import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.factory.ArtifactFactory;

Check warning on line 24 in src/main/java/org/apache/maven/shared/io/location/ArtifactLocatorStrategy.java

View workflow job for this annotation

GitHub Actions / Verify / ubuntu-latest jdk-17-zulu 3.10.0-rc-1

org.apache.maven.artifact.factory.ArtifactFactory in org.apache.maven.artifact.factory has been deprecated
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
import org.apache.maven.artifact.resolver.ArtifactResolutionException;
import org.apache.maven.artifact.resolver.ArtifactResolver;
import org.apache.maven.shared.io.logging.MessageHolder;
Expand All @@ -32,7 +31,7 @@
* The locator strategy.
*/
public class ArtifactLocatorStrategy implements LocatorStrategy {
private final ArtifactFactory factory;

Check warning on line 34 in src/main/java/org/apache/maven/shared/io/location/ArtifactLocatorStrategy.java

View workflow job for this annotation

GitHub Actions / Verify / ubuntu-latest jdk-17-zulu 3.10.0-rc-1

org.apache.maven.artifact.factory.ArtifactFactory in org.apache.maven.artifact.factory has been deprecated

private final ArtifactResolver resolver;

Expand All @@ -51,7 +50,7 @@
* @param remoteRepositories {@link ArtifactRepository}
*/
public ArtifactLocatorStrategy(
ArtifactFactory factory,

Check warning on line 53 in src/main/java/org/apache/maven/shared/io/location/ArtifactLocatorStrategy.java

View workflow job for this annotation

GitHub Actions / Verify / ubuntu-latest jdk-17-zulu 3.10.0-rc-1

org.apache.maven.artifact.factory.ArtifactFactory in org.apache.maven.artifact.factory has been deprecated
ArtifactResolver resolver,
ArtifactRepository localRepository,
List<ArtifactRepository> remoteRepositories) {
Expand All @@ -69,7 +68,7 @@
* @param defaultArtifactType default artifact type.
*/
public ArtifactLocatorStrategy(
ArtifactFactory factory,

Check warning on line 71 in src/main/java/org/apache/maven/shared/io/location/ArtifactLocatorStrategy.java

View workflow job for this annotation

GitHub Actions / Verify / ubuntu-latest jdk-17-zulu 3.10.0-rc-1

org.apache.maven.artifact.factory.ArtifactFactory in org.apache.maven.artifact.factory has been deprecated
ArtifactResolver resolver,
ArtifactRepository localRepository,
List<ArtifactRepository> remoteRepositories,
Expand All @@ -90,7 +89,7 @@
* @param defaultClassifier default classifier.
*/
public ArtifactLocatorStrategy(
ArtifactFactory factory,

Check warning on line 92 in src/main/java/org/apache/maven/shared/io/location/ArtifactLocatorStrategy.java

View workflow job for this annotation

GitHub Actions / Verify / ubuntu-latest jdk-17-zulu 3.10.0-rc-1

org.apache.maven.artifact.factory.ArtifactFactory in org.apache.maven.artifact.factory has been deprecated
ArtifactResolver resolver,
ArtifactRepository localRepository,
List<ArtifactRepository> remoteRepositories,
Expand Down Expand Up @@ -150,7 +149,7 @@
}

try {
resolver.resolve(artifact, remoteRepositories, localRepository);

Check failure on line 152 in src/main/java/org/apache/maven/shared/io/location/ArtifactLocatorStrategy.java

View workflow job for this annotation

GitHub Actions / Verify / ubuntu-latest jdk-17-zulu 3.10.0-rc-1

unreported exception org.apache.maven.artifact.resolver.ArtifactNotFoundException; must be caught or declared to be thrown

Check failure on line 152 in src/main/java/org/apache/maven/shared/io/location/ArtifactLocatorStrategy.java

View workflow job for this annotation

GitHub Actions / Verify / ubuntu-latest jdk-17-zulu 3.10.0-rc-1

unreported exception org.apache.maven.artifact.resolver.ArtifactNotFoundException; must be caught or declared to be thrown

if (artifact.getFile() != null) {
location = new ArtifactLocation(artifact, locationSpecification);
Expand All @@ -162,10 +161,6 @@
messageHolder.addMessage(
"Failed to resolve artifact: " + artifact.getId() + " for location: " + locationSpecification,
e);
} catch (ArtifactNotFoundException e) {
messageHolder.addMessage(
"Failed to resolve artifact: " + artifact.getId() + " for location: " + locationSpecification,
e);
}
} else {
messageHolder.addMessage("Invalid artifact specification: \'" + locationSpecification
Expand Down
Loading