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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:26:10+00:00 2026-05-13T09:26:10+00:00

I have a Maven POM file with a plugin that runs on the test

  • 0

I have a Maven POM file with a plugin that runs on the test phase. What command line arguments do I have to pass mvn in order to execute just that plugin rather than all of the plugins for that phase? I am also trying to execute a specific ant-run plugin, that looks like the following:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.3</version>
        <dependencies>
          <dependency>
            <groupId>com.googlecode.jslint4java</groupId>
            <artifactId>jslint4java-ant</artifactId>
            <version>1.3.3</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <id>jslint</id>
            <phase>test</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <ant antfile="${basedir}/jslint.xml">
                  <property name="root" location="${basedir}" />
                  <target name="jslint" />
                </ant>
              </tasks>
            </configuration>
          </execution>
        </executions>
    </plugin>

Thanks.

  • 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-13T09:26:10+00:00Added an answer on May 13, 2026 at 9:26 am

    Specify the fully-qualified goal in the form of:

    mvn groupID:artifactID:version:goal
    

    For example:

    mvn sample.plugin:maven-hello-plugin:1.0-SNAPSHOT:sayhi
    

    EDIT: I’m modifying my answer to cover the update of the initial question and a comment from the OP.

    I won’t cover all the details but, it the particular case of the antrun plugin, you could just run:

    mvn antrun:run
    

    But now that you’ve updated the question, I understand that things are a bit more complicated than what I thought initially and I don’t think that this will actually work. I mean, invoking mvn antrun:run won’t fail but it won’t pick up the configuration of the execution bound to the test phase.

    The only (ugly) solution I can think of would be to add another maven-antrun-plugin configuration in a specific profile, something like this:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.3</version>
        <dependencies>
          <dependency>
            <groupId>com.googlecode.jslint4java</groupId>
            <artifactId>jslint4java-ant</artifactId>
            <version>1.3.3</version>
          </dependency>
        </dependencies>
        <configuration>
          <tasks>
            <ant antfile="${basedir}/jslint.xml">
              <property name="root" location="${basedir}" />
              <target name="jslint" />
            </ant>
          </tasks>
        </configuration>
      </plugin>
    

    And to use this profile when calling antrun:run:

    mvn antrun:run -Pmyprofile-for-antrun
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have the following config in our POM file: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <skip>true</skip>
I have a pom file that looks similar to this <project xmlns=http://maven.apache.org/POM/4.0.0 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
I have configured my pom file to use maven-embedded-glassfish-plugin. In fact this is the
I have this plugin in my pom.file: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <id>package-jar-with-dependencies</id> <phase>package</phase>
I have a maven pom.xml file with multiple instances of a same goal defined
I'm looking for applications that have rich maven pom(s) and can show lot of
I have a Grails project with pom.xml that is treated as Maven project by
I have maven-plagin and need to run goal, that should automatically run before plugin.
I have a big Maven project that uses the PMD plugin for code quality
I want to put the hibernate3-maven-plugin in my parent pom and have execution skipped

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.