The way I have done this is
addFlatDirResolver('serverlib').addArtifactPattern(new
File('libs/[artifact].[ext]')
compile 'org.apache:apache-commons:unknown'
The "unknown" bit doesn't mean anything. Its the version for the jar. However
the artifact pattern does not include the revison/version part so the flat dir
resolver does not try to append "-unknown" to the jar file name.
I too would like to know if there isa better solution than this.
Cheers
Matt
----- Original Message ----
From: Russel Winder <[email protected]>
To: Gradle Users <[email protected]>
Sent: Thursday, 26 March, 2009 17:14:32
Subject: [gradle-user] Dependency version nubmers: Is this a block or am I
missing something
In Debian and Ubuntu the pool of jars do not often have numbers. So for
example:
|> ll /usr/share/groovy/lib
total 3384
drwxr-xr-x 2 root root 4096 2009-03-03 07:18 ./
drwxr-xr-x 5 root root 4096 2008-11-25 18:42 ../
lrwxrwxrwx 1 root root 18 2009-03-03 07:18 ant.jar -> ../../java/ant.jar
lrwxrwxrwx 1 root root 24 2009-03-03 07:18 ant-junit.jar ->
../../java/ant-junit.jar
lrwxrwxrwx 1 root root 27 2009-03-03 07:18 ant-launcher.jar ->
../../java/ant-launcher.jar
lrwxrwxrwx 1 root root 20 2009-03-03 07:18 antlr.jar ->
../../java/antlr.jar
lrwxrwxrwx 1 root root 28 2009-03-03 07:18 asm2-analysis.jar ->
../../java/asm2-analysis.jar
lrwxrwxrwx 1 root root 19 2009-03-03 07:18 asm2.jar -> ../../java/asm2.jar
lrwxrwxrwx 1 root root 24 2009-03-03 07:18 asm2-tree.jar ->
../../java/asm2-tree.jar
lrwxrwxrwx 1 root root 24 2009-03-03 07:18 asm2-util.jar ->
../../java/asm2-util.jar
lrwxrwxrwx 1 root root 18 2009-03-03 07:18 bsf.jar -> ../../java/bsf.jar
lrwxrwxrwx 1 root root 26 2009-03-03 07:18 commons-cli.jar ->
../../java/commons-cli.jar
lrwxrwxrwx 1 root root 30 2009-03-03 07:18 commons-logging.jar ->
../../java/commons-logging.jar
-rw-r--r-- 1 root root 3450305 2009-03-03 05:09 groovy-1.6.0.jar
lrwxrwxrwx 1 root root 20 2009-03-03 07:18 jline.jar ->
../../java/jline.jar
lrwxrwxrwx 1 root root 22 2009-03-03 07:18 jsp-api.jar ->
../../java/jsp-api.jar
lrwxrwxrwx 1 root root 21 2009-03-03 07:18 junit4.jar ->
../../java/junit4.jar
lrwxrwxrwx 1 root root 31 2009-03-03 07:18 mockobjects-core.jar ->
../../java/mockobjects-core.jar
lrwxrwxrwx 1 root root 21 2009-03-03 07:18 regexp.jar ->
../../java/regexp.jar
lrwxrwxrwx 1 root root 26 2009-03-03 07:18 servlet-api.jar ->
../../java/servlet-api.jar
lrwxrwxrwx 1 root root 22 2009-03-03 07:18 xstream.jar ->
../../java/xstream.jar
So how can a flat file resolver be used to work with the jars in this
directory. As far as I know at the moment Gradle insists that a version
number be given in a specification of a dependency.
--
Russel.
============================================================
Dr Russel Winder Partner
Concertant LLP t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road, f: +44 8700 516 084 voip:
sip:[email protected]
London SW11 1EN, UK. m: +44 7770 465 077 xmpp: [email protected]
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email