Am 19.01.11 06:06, schrieb Sean Van Buggenum: > Thanks Adam and Rene for your help !. > > Adam, > > I tried the exact example you gave me, and it worked as is; > > First it downloaded the dependencies from the maven repository: > > Download > http://repo1.maven.org/maven2/org/apache/ant/ant-javamail/1.8.1/ant-javamail-1.8.1.po > Download > http://repo1.maven.org/maven2/org/apache/ant/ant-parent/1.8.1/ant-parent-1.8.1.pom > Download http://repo1.maven.org/maven2/org/apache/ant/ant/1.8.1/ant-1.8.1.pom > Download > http://repo1.maven.org/maven2/org/apache/ant/ant-launcher/1.8.1/ant-launcher-1.8.1.po > Download http://repo1.maven.org/maven2/javax/mail/mail/1.4/mail-1.4.pom > Download > http://repo1.maven.org/maven2/javax/activation/activation/1.1/activation-1.1.pom > Download > http://repo1.maven.org/maven2/org/apache/ant/ant-javamail/1.8.1/ant-javamail-1.8.1.ja > Download http://repo1.maven.org/maven2/org/apache/ant/ant/1.8.1/ant-1.8.1.jar > Download > http://repo1.maven.org/maven2/org/apache/ant/ant-launcher/1.8.1/ant-launcher-1.8.1.ja > Download http://repo1.maven.org/maven2/javax/mail/mail/1.4/mail-1.4.jar > Download > http://repo1.maven.org/maven2/javax/activation/activation/1.1/activation-1.1.jar > > and then correctly ran the ant.mail task. > > Great! That is a solution. > > I then tried a local repository, > thankfully that worked also!! > > > > dependencies { > mail 'org.apache.ant:ant-javamail', ':mail', ':activation' > } > > > > thanks very much for both your help. I will have to do much reading > now I have the time, in order to maintain the end script, and improve > it. > > For example, on webpage: > http://gradle.org/0.9.1/docs/javadoc/org/gradle/api/artifacts/dsl/DependencyHandler.html > it shows the dependency notation: > > configurationName "group:name:version:classifier" > > Not sure what the group and classifier arguments are ..... except they > seem to be very optional (as in, I didn't seem to need them). Indeed, in the case of having your third party libs in a flat directory they are optional. Often you want to show, that different artifacts belong together. In the example here, ant-javamail.jar belongs to the ant project. This is expressed by using the same group "org.apache.ant" as other ant related artifacts do.
The classifier keyword is used to identify different packages of the same artifact. If you have an artifact "org.apache.ant:ant-javamail:1.8.2" you can refer to the jar with sources of this artifact by using "source" as a classifier. Another good example for using classifiers are artifacts, that represent a whole packaged application. Gradle is shipped with the three different classifiers "bin", "all", "src". > Is this maven concepts then that I lack? I think so, but we definitely need more improvements in the Gradle user guide for that. There is no section that describes the whole concept about the artifact identication and what group, classifier, etc is for. Especially for users coming from ant, this can be a bit awkward. regards, René -- ------------------------------------ Rene Groeschke [email protected] http://www.breskeby.com http://twitter.com/breskeby ------------------------------------ --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
