Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8509287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:23:37+00:00 2026-06-11T03:23:37+00:00

I have a custom task to do a Websphere EJBDeploy. I have defined the

  • 0

I have a custom task to do a Websphere EJBDeploy. I have defined the inputs and ouputs, and get successful incremental compilation, but I can’t get the automatically generated clean task to work properly.

According to docs, for a custom task named “ejbDeploy” with a defined output, a cleanEjbDeploy task should be automatically generated.

Pattern: clean<TaskName>: Cleans the output files of a task.

So here’s my custom task:

task ejbDeploy(dependsOn: 'jar'){
    srcFile = file(jar.archivePath)
    destDir = new File("build/ejbDeploy")

    inputs.file srcFile
    outputs.dir destDir

    def cp = project.files(
        project.sourceSets.main.output.classesDir,
        project.sourceSets.main.resources,
        project.configurations.runtime
        ).getAsPath()

    doLast{
        destDir.mkdirs()

        exec{
            executable = wasEjbDeploy
            workingDir = destDir
            args = [
                jar.archivePath,
                ".",
                jar.archiveName,
                "-cp",
                cp
            ]
        }   
    }
}

Anyone have any ideas as to why the clean rule isn’t working?

[Edit]

Here’s the full (anonymized) file contents (this has changed since initial question post):

version = '1.0-SNAPSHOT'
group = 'com.company'

buildscript {
    repositories {
        mavenLocal()
        mavenCentral()
    }
    dependencies {
        classpath group: 'name.benjaminAbbitt', name: 'WASEjbDeploy', version: '1.0-SNAPSHOT'
    }
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'base'

repositories {
    mavenCentral()
    mavenLocal()
}

dependencies {
    compile 'javax.mail:mail:1.4.5'
    compile 'log4j:log4j:1.2.16'
    compile files(fileTree(dir: 'lib', includes: ['*.jar']) )
}

task ejbDeploy(type:name.benjaminAbbitt.WASEjbDeploy, dependsOn: 'jar'){
    wasEjbDeployPath = wasEjbDeploy
}

Here’s the relevant chunk of “$gradle tasks”

build - Assembles and tests this project.
buildDependents - Assembles and tests this project and all projects that depend
on it.
buildNeeded - Assembles and tests this project and all projects it depends on.
classes - Assembles the main classes.
clean - Deletes the build directory.
jar - Assembles a jar archive containing the main classes.
testClasses - Assembles the test classes.

Documentation tasks
-------------------
javadoc - Generates Javadoc API documentation for the main source code.

Help tasks
----------
dependencies - Displays the dependencies of project ':project'.
help - Displays a help message
projects - Displays the sub-projects of project ':project'.
properties - Displays the properties of project ':project'.
tasks - Displays the tasks runnable from project ':project' (some of the
displayed tasks may belong to subprojects).

IDE tasks
---------
cleanEclipse - Cleans all Eclipse files.
eclipse - Generates all Eclipse files.

Verification tasks
------------------
check - Runs all checks.
test - Runs the unit tests.

Other tasks
-----------
ejbDeploy

Rules
-----
Pattern: build<ConfigurationName>: Assembles the artifacts of a configuration.
Pattern: upload<ConfigurationName>: Assembles and uploads the artifacts belongin
g to a configuration.
Pattern: clean<TaskName>: Cleans the output files of a task.

To see all tasks and more detail, run with --all.

BUILD SUCCESSFUL

Total time: 3.321 secs
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T03:23:38+00:00Added an answer on June 11, 2026 at 3:23 am

    The clean rule is provided by the base plugin. Since many other plugins (e.g. java) already apply the base plugin, you typically don’t have to apply the base plugin yourself. But in case:

    apply plugin: "base"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created the following custom task for Cruise Control .net, but I can't
I have a custom MSBuild task that peeks inside an assembly to get some
I have some custom classes/modules defined under /app/lib . I have a Rake task,
I have this custom JSP tag that implements tree table(every task can have sub-tasks):
I have defined a custom Capistrano task that's supposed to run locally (on my
I have a custom MSBuild task, which processes a set of files and returns
I have a custom MSBuild task for xUnit.net. When the task is running, if
I'm using nant to build our product and have written a custom task to
I have developed an SSIS custom task component. It uses a connection manager of
I have a custom build of a Unix OS. My task: Adding an IPSec

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.