[GRADLE-3045] Gradle does not consider Maven profiles that are active when a property is not defined Created: 13/Mar/14 Updated: 18/Apr/14 Resolved: 18/Apr/14 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | None |
Fix Version/s: | 2.0-rc-1 |
Type: | Bug | ||
Reporter: | Gradle Forums | Assignee: | Benjamin Muschko |
Resolution: | Fixed | Votes: | 0 |
Description |
I'm trying to set-up Pax-Exam in gradle:
But the test step fails to start because of the following error:
Looking at pax-exam-spi-3.4.0.pom, the version tag is effectively not provided but a very similar project builds without problem with Maven: any hint? |
Comments |
Comment by Gradle Forums [ 13/Mar/14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
First step is to figure out how the version is provided. If it builds in Maven, the version has to be provided somehow. Also make sure to try with the latest Gradle version (and perhaps even with latest nightly), because I think there have been some related improvements lately. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Gradle Forums [ 13/Mar/14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I've tested with gradle 1.10 and with nightly build 1.12-20140124230013 but they still fail in dependency resolution. Here the Maven dependecy:tree And here the gradle one:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Gradle Forums [ 13/Mar/14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
it works with gradle 1.9 ```
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Gradle Forums [ 13/Mar/14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Same problem on gradle 1.11-rc1, any hint? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Gradle Forums [ 13/Mar/14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Same result with gradle-1.11: ``` ------------------------------------------------------------ Build time: 2014-02-11 11:34:39 UTC Groovy: 1.8.6 [luca@juniper lb-axon]# gradle :axon-osgi:test
``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Gradle Forums [ 13/Mar/14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Same problem with 1.12 nightly : ``` Build time: 2014-03-07 23:00:18 UTC Groovy: 1.8.6
``` Is there anyone looking at this issue? It was working on 1.9 so it looks like a gradle bug. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Gradle Forums [ 13/Mar/14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The problem is with guava version. It is specified in dependencyManagement of the parent pom under a profile. In Gradle 1.7 it used to fail guava resolution which I could easily fix by excluding guava from pax-exam-junit4 dependency and adding my own. In 1.10+ it fails to resolve pax-exam-spi. Exclusion of guava and even setting transitive to false does not work any more. As an experiment, I've added guava to pax-exam pom in my local Gradle cache. Works like a charm. Is there a better workaround except of deploying modified pax-exam in a local repo? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Adam Murdoch [ 06/Apr/14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This is due to the 'glassfish3' profile not being used by default in the parent pom: http://repo1.maven.org/maven2/org/ops4j/pax/exam/3.4.0/exam-3.4.0.pom |