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

  • SEARCH
  • Home
  • 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 625755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:20:39+00:00 2026-05-13T19:20:39+00:00

Updated to (hopefully) clarify : If a goal is defined to run during a

  • 0

Updated to (hopefully) clarify: If a goal is defined to run during a given phase, is it possible to run the individual goal without running thru all phases. In other words would it be possible to run the antrun:run goal (which is defined as part of the install phase below) without getting dependencies, generate-resources, compiling, testing, package, etc?

I’m using the antrun plugin to create a zip file during the package phase and to delete and copy some files during the install phase. I understand how to run single maven plugin goals, for example: mvn antrun:run. However, is there a way to run a specific execution’s goal? Something like mvn antrun:run:execution-id, or mvn phase:antrun:run?

Basically, I’d be nice if I can tell maven to do nothing else but run the ant tasks defined below inside the deploy phase, for example. It’s kind of tedious having to wait for maven to go thru all the phases just to check if the ant tasks in the deploy phase are working correctly.

<executions>
  <!-- create zip file -->
  <execution>
    <id>create-zip</id>
    <phase>package</phase>
    <configuration>
      <tasks>
    ...create zip...
      </tasks>
    </configuration>
    <goals>
      <goal>run</goal>
    </goals>
      </execution>
  <!-- do some other stuff  -->
  <execution>
    <id>copy-files</id>
    <phase>install</phase>
    <configuration>
      <tasks>
    ...delete some files, copy some files ...
      </tasks>
    </configuration>
    <goals>
      <goal>run</goal>
    </goals>
      </execution>
    </executions>
  • 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-05-13T19:20:39+00:00Added an answer on May 13, 2026 at 7:20 pm

    In other words would it be possible to run the antrun:run goal (which is defined as part of the install phase below) without getting dependencies, generate-resources, compiling, testing, package, etc?

    No it’s not. While you can configure a plugin (with a <configuration> section under the <plugin> element) and call in on the command line, you can’t invoke a specific executionid (and consequently the <configuration> specific to an <execution>).

    The only solution in your case would be to declare the antrun plugin in a profile, let’s say my-profile, to duplicate the following part of the configuration to configure the plugin in this profile:

    <plugin>
      <artifactId>maven-antrun-plugin</artifactId>
      <version>1.3</version>
      <configuration>
        <tasks>
          ... delete some files, copy some files ...
        </tasks>
      </configuration>
    </plugin>
    

    and to call with the right active profile:

    mvn antrun:run -Pmy-profile
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a running question that I have updated to hopefully be a little
UPDATED: Added one more question (Question #4). Hi all, I'm building myself a custom
I have a table with data that needs to be updated at run-time by
I've downloaded and run the latest nodejs .msi for Windows (7), updated PATH (
UPDATE: I have updated my HTML. Now it works in all browsers except IE7.
Hopefully a easy(-ish) one, but I'm just wondering if it's possible to update an
Hopefully, this question isn't too generic: Conventionally, MDSD is defined as the conversion of
i would like to know which files would be updated (and hopefully the changes
Hopefully this is a simple question for a jQuery newbee. Is it possible to
Ok, I realize that's not a very clear title, so hopefully this can clarify

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.