Izpack custom actions JAR cannot be found

Viewed 13

I need to create an installer using gradle and izpack through gradle-izpack-plugin, but every time I run gradle build, it points out that the custom action .jar that are defined in izpack-install.xml are not being found , even though I put them in the correct folder. I have the same project written in Ant, and it works normally, but even trying to run the Ant project through gradle, it shows the same error, the same way it happens when I use the gradle-izpack-plugin. Am I doing something wrong or is there any additional configuration to be done in gradle?

build.gradle

(I can only post the tasks because its from my work)

izPackCreateInstaller.dependsOn('customActions')
izpack{
    baseDir = file("target")
    installFile = file('IzPack-install.xml')
    outputFile = file(project.jarName)
    compression = 'deflate'
    compressionLevel = 9
}

task customActions(type: Copy, dependsOn: ['jar']){
    duplicatesStrategy=DuplicatesStrategy.EXCLUDE
    into 'bin'
        into('/customActions'){
            from 'build/libs'
            rename('installer.jar', 'MyTestInstallerListener.jar')
        }
        into('/customActions'){
            from 'build/libs'
            rename('installer.jar', 'MyTestUninstallerListener.jar')
        }
    
}

The error :

[org.gradle.api.internal.project.ant.AntLoggingAdapter] Couldn't load Resource bin/customActions/MyTestInstallerListener.jar
[org.gradle.api.internal.project.ant.AntLoggingAdapter] Couldn't load Resource bin/customActions/MyTestUninstallerListener.jar

directory structure

I already check and the customActions task is running before izPackCreateInstaller task

0 Answers
Related