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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:08:18+00:00 2026-05-16T17:08:18+00:00

I have a maven project where I am using the assembly plugin. I typically

  • 0

I have a maven project where I am using the assembly plugin.
I typically create my artifacts by running:
mvn clean verify assembly:assembly
(I have integration tests which I want run separately to unit tests).

When this runs, the assembly plugin is running the unit tests itself.
This causes them to be run twice.

Is there a way I can tell the assembly plugin not to run the tests?
I am tempted to run this in two steps:
1. mvn clean verify
2. if previous command successful, run mvn assembly:assembly -DskipTests=true

However, this is a little clumsy and would rather the single command.

Thanks,
Steven

  • 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-16T17:08:19+00:00Added an answer on May 16, 2026 at 5:08 pm

    When this runs, the assembly plugin is running the unit tests itself. This causes them to be run twice.

    The assembly:assembly goal Invokes the execution of the lifecycle phase package prior to executing itself and running it on the command line will thus invoke any phase prior to package. And this includes the test phase.

    Is there a way I can tell the assembly plugin not to run the tests?

    No. My suggestion would be to create the assembly as part of the build lifecycle instead of invoking the plugin on the command line i.e. to bind it on a particular phase. For example:

    <project>
     ...
     <build>
        <plugins>
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <version>2.2-beta-5</version>
            <executions>
              <execution>
                <id>create-my-assembly</id>
                <phase>package</phase><!-- change this if not appropriate -->
                <goals>
                  <goal>single</goal>
                </goals>
                <configuration>
                  ...
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </project>
    

    And if you don’t want the assembly to be created if your integration tests fail, then bind it on a later phase (e.g. post-integration-test or verify).

    And if you don’t want the assembly to be systematically created, put the above configuration in a profile.

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

Sidebar

Related Questions

I have a maven project that I run using jetty: $ mvn run:jetty Where
I have a Maven project (in Eclipse using the m2eclipse plugin) that contains code
I have a Maven Java project, imported using m2eclipse . The target/ directory is
I have this task for the project with 4 nested subprojects using Maven: For
I have a small command line utility project that I'm using Maven to manage.
I have a maven project and I'd like to create a distribution of it
I have a large Java Web Application project using Maven and I need to
How can I create a simple maven project using m2e ? I just need
I have a java/maven project that uses tango icons, so I'm using the following
We have created a jar(Spring project) which we are including using Maven in another

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.