Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to define custom manifest entries #13

Closed
lievendoclo opened this issue Sep 16, 2015 · 12 comments
Closed

Not able to define custom manifest entries #13

lievendoclo opened this issue Sep 16, 2015 · 12 comments
Labels

Comments

@lievendoclo
Copy link

At the moment, you can't define any custom manifest entries

@lievendoclo
Copy link
Author

PR made
#14

@lievendoclo
Copy link
Author

This enables the plugin to support for example capsule-desktop or other caplets if they need custom manifest entries

@danthegoodman
Copy link
Owner

Hmm. Can you add this to your capsule definition and see if it works? It should work in tandem with the capsuleManifest block.

task myCapsule(type: FatCapsule){
  // ...
  manifest {
    attributes(GUI: 'true')
  }
}

@lievendoclo
Copy link
Author

I tried this but you get a StackOverflowException when you do this.

@danthegoodman
Copy link
Owner

Yikes. Can you run gradle with --stacktrace and post the stacktrace?

@lievendoclo
Copy link
Author

org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'valkyrie-rcp'.
    at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:93)
    at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl$1.run(DefaultScriptPluginFactory.java:148)
    at org.gradle.configuration.ProjectScriptTarget.addConfiguration(ProjectScriptTarget.java:72)
    at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:153)
    at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:38)
    at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:25)
    at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:34)
    at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:55)
    at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:491)
    at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:89)
    at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:42)
    at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)
    at org.gradle.initialization.DefaultGradleLauncher$2.run(DefaultGradleLauncher.java:126)
    at org.gradle.internal.Factories$1.create(Factories.java:22)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:123)
    at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:33)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:100)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:94)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:94)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:94)
    at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:77)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:47)
    at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51)
    at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28)
    at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
    at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:170)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
    at org.gradle.launcher.Main.doAction(Main.java:33)
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
    at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
    at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Caused by: java.lang.StackOverflowError
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at us.kirchmeier.capsule.task.Capsule.super$8$manifest(Capsule.groovy)

@danthegoodman
Copy link
Owner

Thank you. I've tried it on the gradle test setup in the project and it seems to be working. What version of gradle are you using, and if you don't mind, can you paste your capsule definition here?

@lievendoclo
Copy link
Author

I'm using 2.7 and I was trying to implement Capsule in Valkyrie RCP (https://github.com/lievendoclo/Valkyrie-RCP)

project("valkyrie-rcp-samples:valkyrie-rcp-simple-sample") {
    apply plugin: 'us.kirchmeier.capsule'

    dependencies {
        compile project(":valkyrie-rcp-core")
        compile project(":valkyrie-rcp-integrations:valkyrie-rcp-jideoss")
        compile "com.jgoodies:jgoodies-looks:${dependencyVersions.jgoodies.looks}"
    }

    task(runSample, dependsOn: 'classes', type: JavaExec) {
        main = 'org.valkyriercp.sample.simple.SimpleSampleRunner'
        classpath = sourceSets.main.runtimeClasspath
    }

    task mavenCapsule(type: MavenCapsule){
        applicationClass 'org.valkyriercp.sample.simple.SimpleSampleRunner'
        manifest {
            attributes(GUI: 'true')
        }
        capsuleManifest {
        }
    }
}

@danthegoodman
Copy link
Owner

Dang. I'm not having any luck reproducing the error. I'll have to take a deeper look at it later. In the mean time, you can create a subclass of the CapsuleManifest, override the methods to add in the functionality from your pull request, and call

capsuleManifest = new MyCapsuleManifest()

This should get your project up and running until I have a fix.

@lievendoclo
Copy link
Author

The issue can be reproduced with multi module projects. Making a single submodule and using the plugin in there will trigger the issue.

buildscript {
    repositories {
        jcenter()
        maven {
            url "https://plugins.gradle.org/m2/"
        }
    }
    dependencies {
        classpath 'us.kirchmeier:gradle-capsule-plugin:1.0.0'
    }
}

configure(subprojects) {
  apply plugin: 'java'

  repositories {
       jcenter()
  }
}

task wrapper(type: Wrapper) {
    gradleVersion = '2.7'
}

project("module") {
    apply plugin: 'us.kirchmeier.capsule'

    task(capsule, type: MavenCapsule) {
        applicationClass 'sample.TestApp'
        manifest {
          attributes(GUI:'true')
        }
    }
}

@lievendoclo
Copy link
Author

@danthegoodman I actually was able to fix it in my PR by explicitly overriding the manifest method and copying all the code from the Jar task in there. By doing this, it's now possible to use the manifest closure in sub-projects.
As far as I can tell, there's an issue when you override the Jar task and try to use the manifest closure in combination with subtasks. I wasn't able to pinpoint the exact cause, I'm suspecting Groovy is doing something strange here.

@danthegoodman
Copy link
Owner

@lievendoclo I was applying your changes and went to add a test. In doing so, I temporarily upgraded my gradle-wrappper.properties file to the latest version and the issue was magically fixed. ✨

After some thorough testing, it looks like the issue stemmed from the compiled groovy classes from one of the earlier groovy-gradle versions conflicting with the groovy-gradle runtime in the later versions.

Upgrading to Gradle 2.7 forces the plugin to be run in gradle 2.4+. Instead of trying to work around a bug I don't fully understand, I'd rather upgrade the libraries and avoid the issue altogether.

Thank you for your help in tracking this issue down. If people end up asking for gradle <2.3 support, I'll end up using your PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants