I have a project 'simpledate' which needs two different version of a jar. One for standard java
applications (a jar file with just the compiled classes inside), and one for Google Web Toolkit
(gwt) which has the compiled classes, the sources and a SimpleDate.gwt.xml file.
So my artifacts are:
- simpledate.jar
- simpledate-gwt.jar
Now if I have some other regular java project which depends on simpledate, it should only pull the
simpledate.jar dependency. If I have a gwt project which needs simpledate, it should ONLY pull the
simpledate-gwt.jar.
I managed to get an ivy.xml file which (at least I think) is what I want:
------------ ivy.xml ----------------------
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:m="http://ant.apache.org/ivy/maven">
...
<configurations>
<conf name="archives" visibility="public" description="..."/>
<conf name="compile" visibility="private" description="..."/>
<conf name="default" visibility="public" description="..."
extends="archives,runtime"/>
<conf name="gwt" visibility="public"/>
<conf name="runtime" visibility="private" description="..."
extends="compile"/>
...
</configurations>
<publications>
<artifact name="simpledate" type="jar" ext="jar" conf="archives"/>
<artifact name="simpledate" type="javadoc" ext="jar" conf="archives"/>
<artifact name="simpledate" type="sources" ext="jar" conf="archives"/>
<artifact name="simpledate-gwt" type="jar" ext="jar" conf="gwt"/>
</publications>
...
</ivy-module>
-------------------------------------------
!!! Problem is the artifact simpledate-gwt.jar is not uploaded !!!
The relevant parts of my build.gradle looks like this:
------------ build.gradle -----------------
configurations {
gwt
}
jar {
exclude '**/*.gwt.xml'
}
task jargwt(type: Jar) {
from sourceSets.main.allJava
baseName = "$project.name-gwt"
}
artifacts {
gwt jargwt
}
-------------------------------------------
If I add 'archives jargwt' in the artifacts section:
artifacts {
gwt jargwt
archives jargwt
}
the file is uploaded and the dependency management in a gwt project works ok. But a regular java
project which should only get the simpledate.jar gets both dependencies.
How can I tell the uploadArchives task to also upload the artifacts of the gwt
configuration?
Cheers,
RĂ¼diger.
P.S. I use gradle 1.0-M3
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email