Greg Domjan created MDEP-492: -------------------------------- Summary: Maven3 - GAC Dependency resolution appears to be happening too late Key: MDEP-492 URL: https://issues.apache.org/jira/browse/MDEP-492 Project: Maven Dependency Plugin Issue Type: Bug Reporter: Greg Domjan
This is an NPANDAY issue - project is no longer listed for raising new issues. Using other plugins that require dependency resolution in phases compile or earlier - such as {code:xml} <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.10</version> <executions> <execution> <id>unpack-dependencies</id> <phase>compile</phase> <!-- any phase compile or earlier --> <goals> <goal>unpack-dependencies</goal> </goals> {code} in combination with items from the GAC such as {code:xml} <dependency> <groupId>WindowsBase</groupId> <artifactId>WindowsBase</artifactId> <version>3.0.0.0</version> <type>gac_msil</type> <classifier>31bf3856ad364e35</classifier> <scope>provided</scope> </dependency> {code} Leads to failure to resolve these dependencies {noformat} \apache-maven-3.2\bin\mvn compile [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building example 0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [WARNING] The POM for WindowsBase:WindowsBase:dll:31bf3856ad364e35:3.0.0.0 is missing, no dependency information available [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.927 s [INFO] Finished at: 2015-06-15T15:39:12-06:00 [INFO] Final Memory: 8M/489M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project example: Could not resolve dependencies for project net.example:example:dotnet-library:0.1-SNAPSHOT: Failure to find WindowsBase:WindowsBase:dll:31bf3856ad364e35:3.0.0.0 in ... was cached in the local repository, resolution will not be reattempted until the update interval of ... has elapsed or updates are forced -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException {noformat} A workaround seems to be to reference the dependency as a system item {code:xml} <dependency> <groupId>WindowsBase</groupId> <artifactId>WindowsBase</artifactId> <version>3.0.0.0</version> <type>gac_msil</type> <classifier>31bf3856ad364e35</classifier> <scope>system</scope> <systemPath>${env.SYSTEMROOT}\Assembly\GAC_MSIL\WindowsBase\3.0.0.0__31bf3856ad364e35\WindowsBase.dll</systemPath> </dependency> {code} Or avoid goals that will cause dependency resolution scope of compile - <goal>unpack-dependencies</goal> change to ?? <goal>unpack</goal> -- This message was sent by Atlassian JIRA (v6.3.4#6332)