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 992779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:19:13+00:00 2026-05-16T06:19:13+00:00

See plugin config from pom.xml below. I can do: mvn myplugin:myGoal Which runs myGoal

  • 0

See plugin config from pom.xml below.

I can do:

mvn myplugin:myGoal

Which runs myGoal (both executions I suppose) but I want to be able to choose either the first or the second executions independently.

I know I can add an id to the execution element, but how do I refer to that id on the command line. I’d like to get to something which does what this imagined command does:

mvn myplugin:myGoal --executionId=1

Is this possible, or am I going about this the wrong way?

        <plugin>
            <groupId>org.myplugin</groupId>
            <artifactId>myplugin-maven-plugin</artifactId>
            <version>1.1.1</version>
            <executions>
                <execution>
                    <id>process-cats</id>
                    <goals>
                        <goal>myGoal</goal>
                    </goals>
                    <configuration>
                        <myParam>cats</myParam>
                    </configuration>
                </execution>
                <execution>
                    <id>process-dogs</id>
                    <goals>
                        <goal>myGoal</goal>
                    </goals>
                    <configuration>
                        <myParam>dogs</myParam>
                    </configuration>
                </execution>
            </executions>
        </plugin>
  • 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-16T06:19:14+00:00Added an answer on May 16, 2026 at 6:19 am

    I can do mvn myplugin:myGoal
    Which runs myGoal (both executions I suppose)

    None of them (assuming they had unique id). Executions are bound to a phase, you need to run the given phase to trigger them.

    I know I can add an id to the execution element, but how do I refer to that id on the command line.

    Not supported. What is possible for plugins invoked on the CLI is to define a non global configuration in the POM using the special default-cli executionId, like this:

    <plugin>
      <artifactId>maven-assembly-plugin</artifactId>
      <executions>
        <execution>
          <id>default-cli</id>
          <configuration>
            <descriptorRefs>
              <descriptorRef>jar-with-dependencies</descriptorRef>
              <descriptorRef>project</descriptorRef>
            </descriptorRefs>
          </configuration>
        </execution>
      </executions>
    </plugin>
    

    Is this possible, or am I going about this the wrong way?

    No, not possible. Either pass the parameters on the command line or use profiles (with or without the above default execution).

    References

    • Default Plugin Execution IDs
    • http://jira.codehaus.org/browse/MNG-3203
    • http://jira.codehaus.org/browse/MNG-3401
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to use this page slider jquery plugin, you can see the demo
I created a simple netbeans plugin (see this tutorial ) and now i wanna
I'm using the jQuery multi-file upload plugin found here: http://www.fyneworks.com/jquery/multiple-file-upload/ I don't see in
How do I install a leiningen plugin? For example, leiningen-run? I see this thing
I am using the jQuery DataTable plug-in and can not see to find a
see this demo from jquery ui you have to hold down the Ctrl key
I have a Java (6) application which uses Hibernate (V3.3.2) to read data from
I'm getting this deprecation error on my rails 3.2 project which I upgraded from
I am having the following plugin: (function($) { $.fn.myPlugin = function(options) { var opt
I'd like to use the Maven Enforcer plugin to check to see if I

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.