Re: [gradle-user] Client module for custom ant tasks
It compiled and I could run the build, but I just started trying to actually run the wsejbdeploy ant task and I get an error: No signature of method: org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.antpath() is applicable for argument types: (java.lang.String) values: {wsanttasks} on the line: taskdef(name: wsejbdeploy, classname: com.ibm.websphere.ant.tasks.WsEjbDeploy, classpath: project.dependencies.antpath(wsanttasks)) where the logic is defined for using the custom ant task wsejbdeploy. This happens in the following code block: project.ant{ taskdef(name: wsejbdeploy, classname: com.ibm.websphere.ant.tasks.WsEjbDeploy, classpath: project.dependencies.antpath(wsanttasks)) wsejbdeploy(inputJar: ${project.buildDir.path}/${project.name}-${project.version}.jar, classpath: path{ fileset(dir: project.rootDir.path+/${project.modulesDirPath}){include(name:**/*.jar)} fileset(dir: project.globalWasDir+'/lib'){include(name:**/*.jar)} fileset(dir: project.globalWasDir+'/java'){include(name:**/*.jar)} fileset(dir: project.globalWasDir+'/bin'){include(name:**.*)} fileset(dir: project.rootDir.path){include(name:**/*.jar)} }, wasHome: project.globalWasDir, outputJar: ${project.rootDir.path}/${project.name}/${project.ejbTemp}/${project.name}-${project.version}.jar, quiet:'false', trace:'true', failonerror:'true', jvmMaxMemory: '1024M') } which worked in previous gradle versions. Any idea would be much appreciated. JerodLass wrote: filed: http://jira.codehaus.org/browse/GRADLE-527 I have now built my first ear with gradle 0.6.1! Still a lot to do in updating all gradle files in all projects, but I can now use gradle again. Are there any big breaking changes in the DSL in upcoming releases? I'm trying to decide if I should skip over 0.6 on the CI engine since the people who own the projects I building have less patience than I do for changes in builds. Thanks for the help! Jerod Also, what's the status of an IntelliJ plugin? hdockter wrote: On Jun 17, 2009, at 4:52 PM, JerodLass wrote: Thanks, that worked. I don't have a good answer as to why I do that, but it's for using the ant task WsEjbDeploy. I declare the module and then, later, I refer to the configuration when I execute the task and it finds the jar. It's something I have been using for several gradle releases. I'm getting a funny error now. It applies all of the plugins, which is good, but now on the line: project.libs.archiveTasks.each {bundle - I get an error: Execution failed for task ':projectModule:libs'. Cause: Could not find property 'archiveTasks' on task ':projectModule:libs'. I still see this in the userguide in example 24.59. This is a bug in the UG. Could you file a Jira? Is there a new way to do something with all archives? Yes. For example: task showJars { tasks.withType(Jar).each { println it } } - Hans -- Hans Dockter Gradle Project Manager http://www.gradle.org - To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email -- View this message in context: http://www.nabble.com/Client-module-for-custom-ant-tasks-tp23983465p24152726.html Sent from the gradle-user mailing list archive at Nabble.com. - To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Re: [gradle-user] Client module for custom ant tasks
If you have the classpath you want to reference in a configuration called wsanttasks, then try changing: taskdef(name: wsejbdeploy, classname:com.ibm.websphere.ant.tasks.WsEjbDeploy, classpath:project.dependencies.antpath(wsanttasks)) to taskdef(name: wsejbdeploy, classname:com.ibm.websphere.ant.tasks.WsEjbDeploy, classpath:configurations.wsanttasks.asPath JerodLass wrote: It compiled and I could run the build, but I just started trying to actually run the wsejbdeploy ant task and I get an error: No signature of method: org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.antpath() is applicable for argument types: (java.lang.String) values: {wsanttasks} on the line: taskdef(name: wsejbdeploy, classname: com.ibm.websphere.ant.tasks.WsEjbDeploy, classpath: project.dependencies.antpath(wsanttasks)) where the logic is defined for using the custom ant task wsejbdeploy. This happens in the following code block: project.ant{ taskdef(name: wsejbdeploy, classname: com.ibm.websphere.ant.tasks.WsEjbDeploy, classpath: project.dependencies.antpath(wsanttasks)) wsejbdeploy(inputJar: ${project.buildDir.path}/${project.name}-${project.version}.jar, classpath: path{ fileset(dir: project.rootDir.path+/${project.modulesDirPath}){include(name:**/*.jar)} fileset(dir: project.globalWasDir+'/lib'){include(name:**/*.jar)} fileset(dir: project.globalWasDir+'/java'){include(name:**/*.jar)} fileset(dir: project.globalWasDir+'/bin'){include(name:**.*)} fileset(dir: project.rootDir.path){include(name:**/*.jar)} }, wasHome: project.globalWasDir, outputJar: ${project.rootDir.path}/${project.name}/${project.ejbTemp}/${project.name}-${project.version}.jar, quiet:'false', trace:'true', failonerror:'true', jvmMaxMemory: '1024M') } which worked in previous gradle versions. Any idea would be much appreciated. JerodLass wrote: filed: http://jira.codehaus.org/browse/GRADLE-527 I have now built my first ear with gradle 0.6.1! Still a lot to do in updating all gradle files in all projects, but I can now use gradle again. Are there any big breaking changes in the DSL in upcoming releases? I'm trying to decide if I should skip over 0.6 on the CI engine since the people who own the projects I building have less patience than I do for changes in builds. Thanks for the help! Jerod Also, what's the status of an IntelliJ plugin? hdockter wrote: On Jun 17, 2009, at 4:52 PM, JerodLass wrote: Thanks, that worked. I don't have a good answer as to why I do that, but it's for using the ant task WsEjbDeploy. I declare the module and then, later, I refer to the configuration when I execute the task and it finds the jar. It's something I have been using for several gradle releases. I'm getting a funny error now. It applies all of the plugins, which is good, but now on the line: project.libs.archiveTasks.each {bundle - I get an error: Execution failed for task ':projectModule:libs'. Cause: Could not find property 'archiveTasks' on task ':projectModule:libs'. I still see this in the userguide in example 24.59. This is a bug in the UG. Could you file a Jira? Is there a new way to do something with all archives? Yes. For example: task showJars { tasks.withType(Jar).each { println it } } - Hans -- Hans Dockter Gradle Project Manager http://www.gradle.org - To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email -- Steve Appling Automated Logic Research Team - To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Re: [gradle-user] Client module for custom ant tasks
On Jun 22, 2009, at 8:28 PM, JerodLass wrote: It compiled and I could run the build, but I just started trying to actually run the wsejbdeploy ant task and I get an error: No signature of method: org .gradle .api .internal .artifacts.dsl.dependencies.DefaultDependencyHandler.antpath() is applicable for argument types: (java.lang.String) values: {wsanttasks} on the line: taskdef(name: wsejbdeploy, classname: com.ibm.websphere.ant.tasks.WsEjbDeploy, classpath: project.dependencies.antpath(wsanttasks)) where the logic is defined for using the custom ant task wsejbdeploy. This happens in the following code block: project.ant{ taskdef(name: wsejbdeploy, classname: com.ibm.websphere.ant.tasks.WsEjbDeploy, classpath: project.dependencies.antpath(wsanttasks)) Use: project.configurations.wsanttasks.asPath - Hans -- Hans Dockter Gradle Project Manager http://www.gradle.org - To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Re: [gradle-user] Client module for custom ant tasks
filed: http://jira.codehaus.org/browse/GRADLE-527 I have now built my first ear with gradle 0.6.1! Still a lot to do in updating all gradle files in all projects, but I can now use gradle again. Are there any big breaking changes in the DSL in upcoming releases? I'm trying to decide if I should skip over 0.6 on the CI engine since the people who own the projects I building have less patience than I do for changes in builds. Thanks for the help! Jerod hdockter wrote: On Jun 17, 2009, at 4:52 PM, JerodLass wrote: Thanks, that worked. I don't have a good answer as to why I do that, but it's for using the ant task WsEjbDeploy. I declare the module and then, later, I refer to the configuration when I execute the task and it finds the jar. It's something I have been using for several gradle releases. I'm getting a funny error now. It applies all of the plugins, which is good, but now on the line: project.libs.archiveTasks.each {bundle - I get an error: Execution failed for task ':projectModule:libs'. Cause: Could not find property 'archiveTasks' on task ':projectModule:libs'. I still see this in the userguide in example 24.59. This is a bug in the UG. Could you file a Jira? Is there a new way to do something with all archives? Yes. For example: task showJars { tasks.withType(Jar).each { println it } } - Hans -- Hans Dockter Gradle Project Manager http://www.gradle.org - To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email -- View this message in context: http://www.nabble.com/Client-module-for-custom-ant-tasks-tp23983465p24095322.html Sent from the gradle-user mailing list archive at Nabble.com. - To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Re: [gradle-user] Client module for custom ant tasks
Any idea why project.configurations{ wsanttasks } project.dependencies{ wsanttasks module(com.ibm.websphere:runtime:6.1.0) } throws a nullpointerexception on the module line when I declare it in a plugin? hdockter wrote: On Jun 16, 2009, at 2:58 PM, JerodLass wrote: snip Thanks again, and keep an eye on me if you will because I will probably run into more problems with the DSL update. For example, I changed my testCompile dependencies to compileTests dependencies because of the breaking changes document, but it caused problems. Is the configuration still called testCompile while the task is compileTests? Yes See UG: http://gradle.org/0.6.1/docs/userguide/java_plugin.html and http://gradle.org/0.6.1/docs/userguide/ dependency_management.html#sec:how_to_declare_your_dependencies (Table 21.1) - Hans -- Hans Dockter Gradle Project Manager http://www.gradle.org - To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email -- View this message in context: http://www.nabble.com/Client-module-for-custom-ant-tasks-tp23983465p24073899.html Sent from the gradle-user mailing list archive at Nabble.com. - To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Re: [gradle-user] Client module for custom ant tasks
On Jun 17, 2009, at 3:38 PM, JerodLass wrote: Any idea why project.configurations{ wsanttasks } project.dependencies{ wsanttasks module(com.ibm.websphere:runtime:6.1.0) } throws a nullpointerexception on the module line when I declare it in a plugin? It would also throw a NPE when you do it like this in the build script. If you do: wsanttasks module(com.ibm.websphere:runtime:6.1.0) {} everything works. What is your reason for using a module if there are no dependencies? Why not saying for example: wsanttasks com.ibm.websphere:runtime:6@jar Anyway, Gradle should not throw an NPE, so we will fix this. - Hans -- Hans Dockter Gradle Project Manager http://www.gradle.org - To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Re: [gradle-user] Client module for custom ant tasks
Thanks, that worked. I don't have a good answer as to why I do that, but it's for using the ant task WsEjbDeploy. I declare the module and then, later, I refer to the configuration when I execute the task and it finds the jar. It's something I have been using for several gradle releases. I'm getting a funny error now. It applies all of the plugins, which is good, but now on the line: project.libs.archiveTasks.each {bundle - I get an error: Execution failed for task ':projectModule:libs'. Cause: Could not find property 'archiveTasks' on task ':projectModule:libs'. I still see this in the userguide in example 24.59. Is there a new way to do something with all archives? hdockter wrote: On Jun 17, 2009, at 3:38 PM, JerodLass wrote: Any idea why project.configurations{ wsanttasks } project.dependencies{ wsanttasks module(com.ibm.websphere:runtime:6.1.0) } throws a nullpointerexception on the module line when I declare it in a plugin? It would also throw a NPE when you do it like this in the build script. If you do: wsanttasks module(com.ibm.websphere:runtime:6.1.0) {} everything works. What is your reason for using a module if there are no dependencies? Why not saying for example: wsanttasks com.ibm.websphere:runtime:6@jar Anyway, Gradle should not throw an NPE, so we will fix this. - Hans -- Hans Dockter Gradle Project Manager http://www.gradle.org - To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email -- View this message in context: http://www.nabble.com/Client-module-for-custom-ant-tasks-tp23983465p24075403.html Sent from the gradle-user mailing list archive at Nabble.com. - To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Re: [gradle-user] Client module for custom ant tasks
I am now getting a nullpointerexception from the line wsanttasks module(com.ibm.websphere:runtime:6.1.0) even though wsanttasks is declared as you described just before it. Does it make a difference that this is happening inside a plugin class? Also, what's the best way to get some meaningful output from gradle as it runs the plugin logic? I had to dig just to find the line number. Thanks again, and keep an eye on me if you will because I will probably run into more problems with the DSL update. For example, I changed my testCompile dependencies to compileTests dependencies because of the breaking changes document, but it caused problems. Is the configuration still called testCompile while the task is compileTests? Thank you Jerod JerodLass wrote: I also tried adding the clientModule from the configurations closure, but I still can't seem to get it. Anybody know how to translate the included gradle 0.6 code to 0.6? JerodLass wrote: More gradle 0.6 questions... I currently use a custom ant task for deploying ejbs (it's very clunky), and I was wondering how the following code will need to be different in gradle 0.6: project.dependencies{ addConfiguration('wsanttasks') clientModule(['wsanttasks'], com.ibm.websphere:runtime:6.1.0) } This should work: configurations { wsanttasks } depedencies { wsanttasks module(com.ibm.websphere:runtime:6.1.0) } Section 21.2.3 in the user guide has another example: http://www.gradle.org/0.6/docs/userguide/dependency_management.html I have tried splitting the addConfiguration off to a configurations closure according to the 0.6 breaking changes spec, but then I get complaints about the clientModule line: A problem occurred evaluating project ':projectEJB'. Cause: No signature of method: org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.clientModule() is applicable for argument types: (java.util.ArrayList, java.lang.String) values: {[wsanttasks], com.ibm.websphere:runtime:6.1.0} How can I get the jar as a dependency in 0.6? Thank you for any help Jerod -- View this message in context: http://www.nabble.com/Client-module-for-custom-ant-tasks-tp23983465p24053806.html Sent from the gradle-user mailing list archive at Nabble.com. - To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Re: [gradle-user] Client module for custom ant tasks
On Jun 16, 2009, at 2:58 PM, JerodLass wrote: snip Thanks again, and keep an eye on me if you will because I will probably run into more problems with the DSL update. For example, I changed my testCompile dependencies to compileTests dependencies because of the breaking changes document, but it caused problems. Is the configuration still called testCompile while the task is compileTests? Yes See UG: http://gradle.org/0.6.1/docs/userguide/java_plugin.html and http://gradle.org/0.6.1/docs/userguide/ dependency_management.html#sec:how_to_declare_your_dependencies (Table 21.1) - Hans -- Hans Dockter Gradle Project Manager http://www.gradle.org - To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Re: [gradle-user] Client module for custom ant tasks
I also tried adding the clientModule from the configurations closure, but I still can't seem to get it. Anybody know how to translate the included gradle 0.6 code to 0.6? JerodLass wrote: More gradle 0.6 questions... I currently use a custom ant task for deploying ejbs (it's very clunky), and I was wondering how the following code will need to be different in gradle 0.6: project.dependencies{ addConfiguration('wsanttasks') clientModule(['wsanttasks'], com.ibm.websphere:runtime:6.1.0) } I have tried splitting the addConfiguration off to a configurations closure according to the 0.6 breaking changes spec, but then I get complaints about the clientModule line: A problem occurred evaluating project ':projectEJB'. Cause: No signature of method: org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.clientModule() is applicable for argument types: (java.util.ArrayList, java.lang.String) values: {[wsanttasks], com.ibm.websphere:runtime:6.1.0} How can I get the jar as a dependency in 0.6? Thank you for any help Jerod -- View this message in context: http://www.nabble.com/Client-module-for-custom-ant-tasks-tp23983465p24037094.html Sent from the gradle-user mailing list archive at Nabble.com. - To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Re: [gradle-user] Client module for custom ant tasks
JerodLass wrote: I also tried adding the clientModule from the configurations closure, but I still can't seem to get it. Anybody know how to translate the included gradle 0.6 code to 0.6? JerodLass wrote: More gradle 0.6 questions... I currently use a custom ant task for deploying ejbs (it's very clunky), and I was wondering how the following code will need to be different in gradle 0.6: project.dependencies{ addConfiguration('wsanttasks') clientModule(['wsanttasks'], com.ibm.websphere:runtime:6.1.0) } This should work: configurations { wsanttasks } depedencies { wsanttasks module(com.ibm.websphere:runtime:6.1.0) } Section 21.2.3 in the user guide has another example: http://www.gradle.org/0.6/docs/userguide/dependency_management.html I have tried splitting the addConfiguration off to a configurations closure according to the 0.6 breaking changes spec, but then I get complaints about the clientModule line: A problem occurred evaluating project ':projectEJB'. Cause: No signature of method: org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.clientModule() is applicable for argument types: (java.util.ArrayList, java.lang.String) values: {[wsanttasks], com.ibm.websphere:runtime:6.1.0} How can I get the jar as a dependency in 0.6? Thank you for any help Jerod