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

The Archive Base Latest Questions

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

Is it possible to invoke a maven-exec-plugin (or any other plugin’s) execution by its

  • 0

Is it possible to invoke a maven-exec-plugin (or any other plugin’s) execution by its id from the command line?

Let’s say my pom.xml file looks like this:

<project>
[...]
    <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>exec-maven-plugin</artifactId>
    <executions>
        <execution>
            <id>foo</id>
            <goals>
                <goal>exec</goal>
            </goals>
            <phase></phase>
            <configuration>
                <executable>echo</executable>
                <arguments>
                    <argument>foo</argument>
                </arguments>
            </configuration>
        </execution>
        <execution>
            <id>bar</id>
            <goals>
                <goal>exec</goal>
            </goals>
            <phase></phase>
            <configuration>
                <executable>echo</executable>
                <arguments>
                    <argument>bar</argument>
                </arguments>
                </configuration>
            </execution>
        </executions>
    </plugin>
[...]
</project>

Now is it possible to call

mvn exec:exec

with some added magic to run execution “foo”?

For the curious there is an alternative solution using profiles available here:
http://www.mail-archive.com/user@mojo.codehaus.org/msg00151.html

  • 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-13T15:27:39+00:00Added an answer on May 13, 2026 at 3:27 pm

    No, it’s not possible. Executions are for binding to the lifecycle (i.e. they are not designed to be invoked on the command line). So you’ll have to use the profile trick described in the link that you provided.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I have class B derived from class A Is it possible to invoke
Is it possible to get the Jenkins Promoted Builds plugin to invoke a second
Is it possible to invoke ripple emulator from a custom made web app (ASP.NET
Is it possible to invoke Java EE web services from iPhone? and how?
Is it possible to invoke a transactional method from within a Stateful EJB itself?
Possible Duplicates: Does the 'offsetof' macro from <stddef.h> invoke undefined behaviour? dereferencing the null
is it possible to invoke .jnlp file from java code? Example: Process p =
I guess it is not possible to invoke methods implemented in Scala traits from
Is it possible to invoke method A.F() from instance of B class except of
Is it possible to invoke a function when a cron process is killed from

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.