[JBoss JIRA] (SHRINKRES-184) Shrinkwrap maven local repo resolution not working since ARQ 1.1.4.Final
by Karel Piwko (JIRA)
[ https://issues.jboss.org/browse/SHRINKRES-184?page=com.atlassian.jira.plu... ]
Karel Piwko updated SHRINKRES-184:
----------------------------------
Fix Version/s: 2.2.0-cr-1
> Shrinkwrap maven local repo resolution not working since ARQ 1.1.4.Final
> ------------------------------------------------------------------------
>
> Key: SHRINKRES-184
> URL: https://issues.jboss.org/browse/SHRINKRES-184
> Project: ShrinkWrap Resolvers
> Issue Type: Bug
> Environment: Maven 3.2.1
> Java 7 64 - bit
> Windows 7 64 bit
> Reporter: Sueleyman Vurucu
> Fix For: 2.2.0-cr-1
>
>
> I update ARQ from 1.1.3.Final to 1.1.4.Final.
> After I try to excecute my testsuite I had a Exception that some of the artifacts could not be resolved. After Debugging I see that shrinkwrap looks for that artifacts on our local nexus server. Unfortunately we dont deploy our development artifact on nexus.
> The MavenResolverSystem is configured like shown below:
> // ARQ 1.1.3.Final
> private static MavenResolverSystem getMavenDependencyResolver() {
> MavenResolverSystem mavenResolverSystem = Maven.configureResolver().fromFile(pathToSettingsXML);
> mavenResolverSystem.offline();
> return mavenResolverSystem;
> }
> // ARQ 1.1.4.Final
> private static ConfigurableMavenResolverSystem getMavenDependencyResolver() {
> ConfigurableMavenResolverSystem mavenResolverSystem = Resolvers.configure(ConfigurableMavenResolverSystem.class);
> mavenResolverSystem.withClassPathResolution(true);
> mavenResolverSystem.fromFile(pathToSettingsXML);
> mavenResolverSystem.workOffline();
> return mavenResolverSystem;
> }
> As you can see I say to MavenResolverSystem that it should work offline.
> After deep debugging I see that the resolversystem try to find all the artifacts on our nexus.
> //ARQ 1.1.3.Final
> DefaultRepositorySystem:367
> com.siemag.base:wms-base-controller:ejb:3.0.0-SNAPSHOT <(compile)
> //ARQ 1.1.4.Final
> In the class DefaultRepositorySystem:367
> com.siemag.base:wms-base-controller:ejb:3.0.0-SNAPSHOT < [nexus (http://172.16.55.1:8081/nexus/content/groups/public, releases)]
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
9 years, 7 months
[JBoss JIRA] (SHRINKRES-180) transitive dependencies updated from provided to compile
by Karel Piwko (JIRA)
[ https://issues.jboss.org/browse/SHRINKRES-180?page=com.atlassian.jira.plu... ]
Karel Piwko updated SHRINKRES-180:
----------------------------------
Fix Version/s: 2.2.0-cr-1
(was: 2.2.0-beta-1)
> transitive dependencies updated from provided to compile
> --------------------------------------------------------
>
> Key: SHRINKRES-180
> URL: https://issues.jboss.org/browse/SHRINKRES-180
> Project: ShrinkWrap Resolvers
> Issue Type: Bug
> Affects Versions: 2.2.0-alpha-2
> Reporter: Markus Schulz
> Fix For: 2.2.0-cr-1
>
> Attachments: deptree.txt, MavenResolverTest.java, transitivetest-pom.xml
>
>
> i have a pom with something like:
> <dependency>
> <groupId>org.hibernate</groupId>
> <artifactId>hibernate-search</artifactId>
> <version>4.2.0.Final</version>
> </dependency>
> <dependency>
> <groupId>org.hibernate</groupId>
> <artifactId>hibernate-core</artifactId>
> <scope>provided</scope>
> </dependency>
> hibernate-search internally dependes on hibernate-core (scope compile). But in don't want to get hbernate-core in my deployment, therefore it's forced to provided.
> But:
> File[] testLibs = Maven.configureResolver()
> .workOffline()
> .loadPomFromClassLoaderResource("transitivetest-pom.xml")
> .importRuntimeDependencies()
> .resolve()
> .withTransitivity()
> .asFile();
> still contains hibernate-core.jar
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
9 years, 7 months
[JBoss JIRA] (SHRINKRES-195) activeProfiles element from settings.xml seems to be ignored, property override not working
by Karel Piwko (JIRA)
[ https://issues.jboss.org/browse/SHRINKRES-195?page=com.atlassian.jira.plu... ]
Karel Piwko commented on SHRINKRES-195:
---------------------------------------
Trying to reproduce the issue, it seems that profile from settings.xml is indeed activated, however properties are not propagated back to Model and hence to ParsedPomFile.
> activeProfiles element from settings.xml seems to be ignored, property override not working
> -------------------------------------------------------------------------------------------
>
> Key: SHRINKRES-195
> URL: https://issues.jboss.org/browse/SHRINKRES-195
> Project: ShrinkWrap Resolvers
> Issue Type: Bug
> Components: impl-maven
> Affects Versions: 2.0.2
> Environment: Win7 x64
> JDK7u51
> Reporter: Falko M.
> Priority: Minor
>
> See:
> http://maven.apache.org/settings.html#Active_Profiles
> On the command line (mvn), the element is evaluated as expected and the specified profiles are activated but when I load the very same pom.xml via {{Maven.resolver().offline().loadPomFromFile(...)}}, the respective profiles are ignored, as it seems.
> I came accross this issue when I wanted to override a property from pom.xml in settings.xml and {{ParsedPomFile.getProperties()}} kept returning the non-overriden value.
> Notes:
> - the following in settings.xml *does work*:
> {noformat}
> <activation>
> <activeByDefault>true</activeByDefault>
> </activation>
> {noformat}
> - a new property defined in a settings.xml profile also doesn't show up in {{ParsedPomFile.getProperties()}} which seems to prove that the profile is not actived
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
9 years, 7 months
[JBoss JIRA] (SHRINKRES-190) implements equals and hashCode methods in MavenResolvedArtifactImpl / MavenArtifactInfoImpl
by Karel Piwko (JIRA)
[ https://issues.jboss.org/browse/SHRINKRES-190?page=com.atlassian.jira.plu... ]
Karel Piwko resolved SHRINKRES-190.
-----------------------------------
Assignee: Karel Piwko
Resolution: Done
Pushed in https://github.com/shrinkwrap/resolver/commit/6ffc061f4637040ac142559c2c9...
Btw, in next version, there is also support for asList(MavenCoordinate.class);
Alternatively, with JDK8 API this will be a simple lambda :-)
> implements equals and hashCode methods in MavenResolvedArtifactImpl / MavenArtifactInfoImpl
> -------------------------------------------------------------------------------------------
>
> Key: SHRINKRES-190
> URL: https://issues.jboss.org/browse/SHRINKRES-190
> Project: ShrinkWrap Resolvers
> Issue Type: Feature Request
> Affects Versions: 2.1.1
> Reporter: Mathieu Lachance
> Assignee: Karel Piwko
> Fix For: 2.2.0-alpha-3
>
>
> I'm currently to find an effective way to filter out many dependencies at once that I could provide within a "dummy" pom.xml.
> I'd like to do the following:
> {code:java}
> public static List<MavenResolvedArtifact> resolveAllTestNonTransitiveDependencies() {
> return Arrays.asList(
> Maven.resolver()
> .loadPomFromFile("pom.xml")
> .importTestDependencies().resolve()
> .withoutTransitivity()
> .asResolvedArtifact());
> }
>
> public static List<MavenResolvedArtifact> resolveAllArquillianDependencies() {
> return Arrays.asList(
> Maven.resolver()
> .loadPomFromFile("src/test/resources/arquillian.pom.xml")
> .importTestDependencies().resolve()
> .withoutTransitivity()
> .asResolvedArtifact());
> }
>
> public static List<MavenResolvedArtifact> resolveAllTestNonTransitiveNonArquillianDependencies() {
> List<MavenResolvedArtifact> testDependencies = resolveAllTestNonTransitiveDependencies();
>
> List<MavenResolvedArtifact> arquillianDependencies = resolveAllArquillianDependencies();
>
> List<MavenResolvedArtifact> filteredTestDependencies = new ArrayList<MavenResolvedArtifact>();
> for (MavenResolvedArtifact testDependency : testDependencies) {
> if (!arquillianDependencies.contains(testDependency)) {
> filteredTestDependencies.add(testDependency);
> }
> }
> return filteredTestDependencies;
> }
> {code}
> The problem is that MavenResolvedArtifactImpl does not implements equals and hashCode needed for using Collection::contains method.
> I think it would be safe to delegate MavenResolvedArtifactImpl / MavenArtifactInfoImpl equals and hashCode methods to the one defined in MavenCoordinateImpl
> Thanks,
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
9 years, 7 months