Reputation: 17228
Hi I want to make empty project (without source), which to use my jar helloWorldPlugin and to manipulate with the ivy descriptor so I made build.gradle in an empty project dir with content:
apply plugin: 'java'
apply plugin: 'ivy-publish'
publishing {
publications {
myPublication(IvyPublication) {
from components.java
}
repositories {
ivy {
url "$project.rootDir/build/publish"
}
}
}
When I execute
gradle publishmyPublicationPublicationToIvyRepository
I get xml descriptor
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0">
<info organisation="org.moo" module="ivypublish" revision="9.0-m1-SNAPSHOT" status="integration" publication="20130710180056"/>
<configurations>
<conf name="default" visibility="public" extends="runtime"/>
<conf name="runtime" visibility="public"/>
</configurations>
<publications>
<artifact name="ivypublish" type="jar" ext="jar" conf="runtime"/>
</publications>
<dependencies>
<dependency org="org.moo" name="helloWorldPlugin" rev="9.2-m1-SNAPSHOT" conf="runtime->default" revConstraint="latest.milestone"/>
</dependencies>
</ivy-module>
1.But I don't have all java plugins configurations like test, compile etc. why?
2.If I don't write from components.java in the xml file there is only tag and other tags like dependencies, conf are empty. WHy?
3.How to make Gradle to write all java plugin configurations in the ivy descriptor?
Upvotes: 0
Views: 1423
Reputation: 835
A little late here but I believe this may be missing a configurations section in the myPublication. e.g.
configurations {
unitTests { extend 'runtime' }
}
and then an associated artifact and task definition for the unit test configuration
Upvotes: 1