/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

package npanday.resolver.resolvers;

import npanday.resolver.ArtifactResolvingContributor;
import npanday.ArtifactTypeHelper;
import npanday.PathUtil;
import org.apache.maven.artifact.Artifact;

import java.io.File;
import java.util.Set;

/**
 * @author <a href="mailto:me@lcorneliussen.de>Lars Corneliussen, Faktum Software</a>
 *
 */
public class GacResolver
    implements ArtifactResolvingContributor
{
    public void contribute(Artifact artifact, Set<Artifact> additionalDependenciesCollector ){

        File artifactFile = null;
        String artifactType = artifact.getType();

        if ( ArtifactTypeHelper.isDotnetAnyGac( artifactType ))
        {
            if (!ArtifactTypeHelper.isDotnet4Gac(artifactType))
            {
                artifactFile = PathUtil.getGlobalAssemblyCacheFileFor( artifact, new File( "C:\\WINDOWS\\assembly\\" ) );
            }
            else
            {
                artifactFile = PathUtil.getGACFile4Artifact(artifact);
            }
        }

        if (artifactFile != null && artifactFile.exists()) {
            artifact.setFile( artifactFile );
            artifact.setResolved( true );
        }
    }
}

@@ -995,16 +995,85 @@
 rtifact;
+%0Aimport org.apache.maven.artifact.resolver.ArtifactNotFoundException;
 %0A%0Aimport
@@ -1371,16 +1371,62 @@
 lector )
+ throws%0A        ArtifactNotFoundException%0A    
 %7B%0A%0A     
@@ -1956,12 +1956,28 @@
 null
- && 
+) %7B%0A            if (
 arti
@@ -2001,32 +2001,36 @@
 ) %7B%0A            
+  
+  
 artifact.setFile
@@ -2051,32 +2051,36 @@
  );%0A            
+    
 artifact.setReso
@@ -2097,22 +2097,224 @@
  );%0A        
+ 
-%7D
+   %7D%0A            else%7B%0A               throw new ArtifactNotFoundException(%22NPANDAY-158-001: Could not resolve gac-dependency %22 + artifact + %22, tried %22 + artifactFile, artifact);%0A            %7D%0A        %7D%0A
 %0A    %7D%0A%7D%0A

Remove RDF repository and model