Maven plugin doesn't work without java plugin


(Scott Palmer) #1

I have a project that produces a zip as the artifact.
If I do this:

apply plugin: 'java'
apply plugin: 'maven'

Then I get an ‘install’ tasks and things work fine.

If I do this:

apply plugin: 'base'
apply plugin: 'maven'

Then the maven plugin fails to create an ‘install’ task. In both cases I have no Java code to compile and the artifact is produced by a Zip task and declared as an artifact:

task buildMyZip(type: Zip) {
    // config here
}

artifacts {
    sdkBase buildMyZip
    archives buildMyZip
}

Since the project has no Java code and nothing to do with Java, it seems that I shouldn’t be applying the java plugin, but is my only option to make it work to jsue the java plugin or the (still incubating!) maven-publish plugin?