Hi Jerod,

on first sight you code looks alright.

On Jun 25, 2008, at 6:25 PM, JerodLass wrote:


UPDATE: I have corrected the error in the previous message, or found a
workaround, but I still have this java error about noclassdeffound:
com/ibm/.../EJBDeploy, and I know this is in the classpath I specified as the task property. Either I need to also put it in a gradle's antbuilder classpath somehow or something else is going very wrong. Any help would be
great.  At this point, I'm also willing to explore another way of
creating/deploying an EJB if someone has an idea.  Thanks.

Jerod


JerodLass wrote:

UPDATE: I combined some code from the maven repo proxy thread and some
from the manual and came up with:

dependencies{
    addConfiguration('wsanttasks')
    clientModule(['wsanttasks'], ":wsanttasks::jar")
}

I guess in real life you have defined a resolver.

What is the output of?

dependencies {
   ...
}
println(dependencies.antpath("wsanttasks")

- Hans


ant {
            taskdef(name: "wsejbdeploy", classname:
"com.ibm.websphere.ant.tasks.WsEjbDeploy", classpath:
dependencies.antpath("wsanttasks"))
            wsejbdeploy(inputJar:
projectDir.name+"/build/codesAuthorityEJB-1.0.jar",
                wasHome:"C:\\Program Files\\IBM\\SDP70",
                outputJar:'ANTJBWS_STYLE.jar',
                workingDirectory: projectDir.name,
                quiet:'false',
                trace:'true',
                failonerror:'true')
}

My problem now is I am having trouble adding the jars to ant's classpath that this task needs. I have them all in a directory, but when I try to create a FileSet and add it to the classpath via the classpathref property
of the task, I get a:

Reference [EMAIL PROTECTED] not found

error. I'm not sure what this error means. How can I make sure the jars
in this directory are added to ant's classpath?

Jerod


JerodLass wrote:

I am looking for a way to create an EJB with gradle. The closest I think
I can come to doing this is by using IBM websphere's wsanttasks.jar,
which I believe might contain the task wsejbdeploy, and defining a task
in gradle.  If you can think of a better way, please let me know.
Otherwise, can you give me an overview of what needs to be done for me to
get to the point where I can run something like:
ant.wsejbdeploy(inputJar: new File(projectDir,
'build/'+archivesBaseName+'.jar'), wasDir: wasDirPath, outputJar: ....
etc ....)
within my build script?

So far, I have just found some variables I need, and I think I will have
something similar to this in a gradle task:

ant{
    taskdef(name: "wsejbdeploy", classname:
            "com.ibm.websphere.ant.tasks.WsEjbDeploy",
            classpath: dependencies.antpath('wsanttasks'))
            wsejbdeploy(inputJar: archivesBaseName+'.jar',
            wasHome: wasDirPath,
                        workingDirectory:projectRoot.path,
                        outputJar:archivesBaseName+'.jar',
                        classpathref: cpRef,
                        quiet:'false',
                        trace:'true',
                        failonerror:'true')
}

And, following the earlier maven repository thread's ant_nodeps proxy
example, a dependency:

wsanttasks ":wsanttasks::jar"

Note: this line causes an error. Any help would be greatly appreciated.

Jerod





--
View this message in context: http://www.nabble.com/custom-ant- tasks---ejb-deploy-tp18092263p18115890.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



--
Hans Dockter
Gradle Project lead
http://www.gradle.org





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to