Using classifier in an ear

Hello, Thanks for the new 1.3 release. Congratulations!

I have one project and want to create 2 different ear files with the classifier property.

  1. Why I can’t use
task earApplication(type: Ear) {
classifier = 'application'

This results in an exception: Could not find property ‘Ear’ on root project

  1. This is working fine:
task earApplication(type: Jar) {
classifier = 'application'

But generates a jar file. Why I can’t use the type Ear?

Thanks for your help. Heiko

Probably because the ‘org.gradle.plugins.ear’ package is intentionally or unintentionally omitted from the list of default imports for a build script.

Hi and thanks for your answer. This was a good hint. I changed my code to the following:

task earApplication(type: org.gradle.plugins.ear.Ear) {
classifier = 'application'

Using the full name including the package name works fine.

Thanks, Heiko