You are viewing a plain text version of this content. The canonical link for it is here.
Posted to npanday-commits@incubator.apache.org by lc...@apache.org on 2012/05/04 10:58:52 UTC
svn commit: r1333873 -
/incubator/npanday/trunk/components/dotnet-core/src/main/java/npanday/resolver/resolvers/GacResolver.java
Author: lcorneliussen
Date: Fri May 4 10:58:51 2012
New Revision: 1333873
URL: http://svn.apache.org/viewvc?rev=1333873&view=rev
Log:
[NPANDAY-231] Remove RDF repository and model
o fail, when a gac-dependency couldn't be resolved
Modified:
incubator/npanday/trunk/components/dotnet-core/src/main/java/npanday/resolver/resolvers/GacResolver.java
Modified: incubator/npanday/trunk/components/dotnet-core/src/main/java/npanday/resolver/resolvers/GacResolver.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-core/src/main/java/npanday/resolver/resolvers/GacResolver.java?rev=1333873&r1=1333872&r2=1333873&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-core/src/main/java/npanday/resolver/resolvers/GacResolver.java (original)
+++ incubator/npanday/trunk/components/dotnet-core/src/main/java/npanday/resolver/resolvers/GacResolver.java Fri May 4 10:58:51 2012
@@ -23,6 +23,7 @@ import npanday.resolver.ArtifactResolvin
import npanday.ArtifactTypeHelper;
import npanday.PathUtil;
import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
import java.io.File;
import java.util.Set;
@@ -34,7 +35,9 @@ import java.util.Set;
public class GacResolver
implements ArtifactResolvingContributor
{
- public void contribute(Artifact artifact, Set<Artifact> additionalDependenciesCollector ){
+ public void contribute(Artifact artifact, Set<Artifact> additionalDependenciesCollector ) throws
+ ArtifactNotFoundException
+ {
File artifactFile = null;
String artifactType = artifact.getType();
@@ -51,9 +54,15 @@ public class GacResolver
}
}
- if (artifactFile != null && artifactFile.exists()) {
- artifact.setFile( artifactFile );
- artifact.setResolved( true );
+ if (artifactFile != null) {
+ if (artifactFile.exists()) {
+ artifact.setFile( artifactFile );
+ artifact.setResolved( true );
+ }
+ else{
+ throw new ArtifactNotFoundException("NPANDAY-158-001: Could not resolve gac-dependency " + artifact + ", tried " + artifactFile, artifact);
+ }
}
+
}
}