-
1. Re: Dependency resolver and proxy
alrubinger Oct 2, 2012 4:09 PM (in response to mmatloka)Can I see the code you're using to trigger this?
-
2. Re: Dependency resolver and proxy
mmatloka Oct 23, 2012 12:14 PM (in response to alrubinger)I've used the following resolver:
private static final MavenDependencyResolver RESOLVER = DependencyResolvers.use(
MavenDependencyResolver.class ).loadMetadataFromPom( "pom.xml" );
Deployment
return ShrinkWrap.create( WebArchive.class )
.addAsLibraries( RESOLVER.artifacts( MY_SOME_OTHER_SHARED_ARTIFACT, FEST_ARTIFACT ).resolveAsFiles() )
.addAsWebInfResource( EmptyAsset.INSTANCE, BEANS_XML );
With this resolver, I'm resolving only 2 artifacts - FEST (which however according to fest documentation may be simply added as package "org.fest" ) and other module (MY_SOME_OTHER_SHARED_ARTIFACT) of project I'm trying to test using arquillian (multimodule maven project).
All arquillian and shrinkwrap components versions are from arquillian bom 1.0.2.Final.
-
3. Re: Dependency resolver and proxy
alrubinger Oct 29, 2012 11:55 AM (in response to mmatloka)Karel, could you look into this? Reference: SHRINKWRAP-294
-
4. Re: Dependency resolver and proxy
kpiwko Jan 13, 2013 10:48 AM (in response to alrubinger)I did some debugging on current codebase. I'm convinced that this has nothing to do with SHRINKWRAP-294.
However, there are two facts I have discovered that comes to play:
1/ Offline propagation flag was not done correctly
2/ Since Maven 3, artifacts are being tracked for repositories where they come from (https://cwiki.apache.org/confluence/display/MAVEN/Maven+3.x+Compatibility+Notes#Maven3.xCompatibilityNotes-ResolutionfromLocalRepository ).
As we are using EnhancedLocalRepositoryManager, Shrinkres behaves the same as Maven 3.
I have fixed 1/ in SHRINKRES-104. As for 2/, the solution is difficult. You can either remove all _maven.repositories from your local repository (https://github.com/shrinkwrap/resolver/blob/master/impl-maven/src/test/java/org/jboss/shrinkwrap/resolver/impl/maven/integration/LocalRepositoryTestCase.java#L65) or, if you are sure that all artifact are available in local repository, you can switch to offline mode (https://github.com/shrinkwrap/resolver/blob/master/impl-maven/src/test/java/org/jboss/shrinkwrap/resolver/impl/maven/integration/LocalRepositoryTestCase.java#L89). Otherwise, there is a high chance it will fail
(https://github.com/shrinkwrap/resolver/blob/master/impl-maven/src/test/java/org/jboss/shrinkwrap/resolver/impl/maven/integration/LocalRepositoryTestCase.java#L108). I don't want the implementation to behave differently than Maven 3 by default, so I was thinking of ignoreArtifactTracking(boolean) method that user could use to programmatically ignore tracking repos as third solution.
Your thoughs?
Karel