0

Currently I have a build that have tests which have dependencies. What I wish to do is the run my build which would skip tests and trying to download the test dependencies since the dependencies are not in my maven repository. I have tried -Dmaven.test.skip=true in which it would skip the test but still try to download the dependency.

The dependency in the pom is

     <dependency>
      <artifactid>somthing</artifactid>
      <scope>test</scope>
     </dependency>

My question is if it possible to do this without editing the pom file and only through the mvn command. Thanks

Brandon Fung
  • 27
  • 1
  • 7

1 Answers1

0

For the command you used the explanation is:

Add the parameter

-Dmaven.test.skip=true 

or

-DskipTests=true

in the command line, depending on whether you want to skip test compilation and execution or only execution.

For you need you could try this one...

Exclude maven dependency for tests

Community
  • 1
  • 1
ivoruJavaBoy
  • 1,307
  • 2
  • 19
  • 39