Roger Studner wrote:
First.. just a simple "is this really how a dependencies() section looks:
repositories {
mavenCentral()
}
dependencies {
groovy 'org.codehaus.groovy:groovy:1.6.5'
compile group:'org.springframework', name:'spring', version:'2.5.6'
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.5.2'
compile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.5.2'
compile group: 'org.hibernate', name: 'ejb3-persistence', version:
'1.0.2.GA'
compile group: 'org.hibernate', name: 'hibernate-annotations',
version: '3.4.0.GA'
compile group: 'org.hibernate', name: 'hibernate', version: '3.2.1.ga'
compile group: 'org.hibernate', name: 'hibernate-entitymanager',
version: '3.4.0.GA'
compile group: 'org.hibernate', name:
'hibernate-commons-annotations', version: '3.3.0.ga'
compile group: 'dom4j', name: 'dom4j', version: '1.6.1'
compile group: 'org.apache.poi', name:'poi', version:'3.5-FINAL'
compile group: 'org.apache.poi', name:'poi-contrib',
version:'3.5-FINAL'
compile group: 'org.apache.poi', name:'poi-scratchpad',
version:'3.5-FINAL'
compile group: 'log4j', name:'log4j', version:'1.2.15'
compile group: 'commons-logging', name: 'commons-logging', version:
'1.1.1'
testCompile group:'junit', name:'junit', version:'3.8.2'
testCompile group: 'junit', name: 'junit', version: '4.7'
testCompile group:'org.springframework', name:'spring',
version:'2.5.6'
testCompile group:'org.springframework', name:'spring-test',
version:'2.5.6'
testCompile group: 'org.slf4j', name: 'slf4j-api', version: '1.5.2'
testCompile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.5.2'
testCompile group: 'org.hibernate', name: 'ejb3-persistence',
version: '1.0.2.GA'
testCompile group: 'org.hibernate', name: 'hibernate-annotations',
version: '3.4.0.GA'
testCompile group: 'org.hibernate', name: 'hibernate', version:
'3.2.1.ga'
testCompile group: 'org.hibernate', name: 'hibernate-entitymanager',
version: '3.4.0.GA'
testCompile group: 'org.hibernate', name:
'hibernate-commons-annotations', version: '3.3.0.ga'
testCompile group: 'dom4j', name: 'dom4j', version: '1.6.1'
testCompile group: 'org.apache.poi', name:'poi', version:'3.5-FINAL'
testCompile group: 'org.apache.poi', name:'poi-contrib',
version:'3.5-FINAL'
testCompile group: 'org.apache.poi', name:'poi-scratchpad',
version:'3.5-FINAL'
testCompile group: 'log4j', name:'log4j', version:'1.2.15'
testCompile group: 'commons-logging', name: 'commons-logging',
version: '1.1.1'
}
Basically, I took all the things in compile, and just duplicated them...
Since most of the tests are integration (thus use spring/hibernate/poi
etc).
testCompile extends compile, so you don't need to duplicate anything that is
already in compile. Just add things needed only for tests (like Junit).
You may find the String notation for dependencies to be a little more compact
for you:
compile 'dom4j:dom4j:1.6.1'
Just wanting to make sure i'm not starting my adventures with Gradle
like a fool hah.
Second...
I keep getting told I'm missing a dependency:
* What went wrong:
Execution failed for task ':test'.
Cause: Could not resolve all dependencies for configuration 'testRuntime':
- download failed: javax.jms#jms;1.1!jms.jar
- download failed: com.sun.jdmk#jmxtools;1.2.1!jmxtools.jar
- download failed: com.sun.jmx#jmxri;1.2.1!jmxri.jar
(first, odd I need javax.jms.. Imean, since I use no JMS, of any kind,
anywhere).
So, I go to mvnrepository.com, and I lookup the dependency.. and I add
it.. something like
compile group:'javax.jms', name:'jms", version:"1.1"
and I do the same for testCompile.
I got the group/name/version from mvnrepository.com
Then, I get this error:
:: problems summary ::
:::: WARNINGS
[NOT FOUND ] javax.jms#jms;1.1!jms.jar (470ms)
==== MavenRepo: tried
http://repo1.maven.org/maven2/javax/jms/jms/1.1/jms-1.1.jar
::::::::::::::::::::::::::::::::::::::::::::::
:: FAILED DOWNLOADS ::
:: ^ see resolution messages for details ^ ::
::::::::::::::::::::::::::::::::::::::::::::::
:: javax.jms#jms;1.1!jms.jar
::::::::::::::::::::::::::::::::::::::::::::::
I freely admit, I used ivy "some" and maven basically not at all. So
possibly all these dependency quirks, sadly, are just "part of the
problem" with trying to use a tool to resolve dependencies.
Anyone have any insight/tips to the above?
>
> Thanks,
> Roger
>
You are picking up a transitive dependency. Run a dependency report to see
where it is coming from.
gradle -q --dependencies
See
http://gradle.org/0.8/docs/userguide/tutorial_gradle_command_line.html#para:commandline_dependency_report
Once you have found a transitive dependency you don't need, you can exclude it.
See
http://gradle.org/0.8/docs/userguide/dependency_management.html#sub:exclude_transitive_dependencies
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
--
Steve Appling
Automated Logic Research Team
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email