I am using Maven 2.2.1 and to build my project I used this command
mvn clean install -Dmaven.test.skip=true
However, the build failed saying it couldn’t find one of the artifact. However, when I used:
mvn clean install -DskipTests
everything worked fine.
So far I have been thinking that these 2 commands are equivalent. However, this link seems to suggest that -Dmaven.test.skip=true
also skips compiling the test cases.
However, that still didn’t explain to me why one command is working and another is not. Will be thankful if anyone please explain this to me.
Related Posts:
- Maven 3 and JUnit 4 compilation problem: package org.junit does not exist
- How to force maven update?
- Connecting to Git team provider failed
- Deploying Maven project throws java.util.zip.ZipException: invalid LOC header (bad signature)
- how to run the command mvn eclipse:eclipse
- A fatal error has been detected by the Java Runtime Environment. EXCEPTION_ACCESS_VIOLATION
- mvn command is not recognized as an internal or external command
- Getting “Skipping JaCoCo execution due to missing execution data file” upon executing JaCoCo
- Maven Could not resolve dependencies, artifacts could not be resolved
- Eclipse/Maven error: “No compiler is provided in this environment”
- How is “mvn clean install” different from “mvn install”?
- The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path
- The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path
- ‘react-scripts’ is not recognized as an internal or external command
- SLF4J: Class path contains multiple SLF4J bindings
- Lombok and Maven
- mvn command not found in OSX Mavrerick
- Maven Install on Mac OS X
- Why Maven project is tied to J2SE-1.5 by default?
- org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- Unable to create requested service [org.hibernate .engine.jdbc.env.spi.JdbcEnvironment]-MySQL
- org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- web.xml is missing and
is set to true - org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- mvn command not found in OSX Mavrerick
- unused import statement for used ones in IntelliJ IDEA
- Maven: Non-resolvable parent POM
- java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
- Maven: Failed to read artifact descriptor
- What exactly is a Maven Snapshot and why do we need it?
- Cannot change version of project facet Dynamic Web Module to 3.0?
- Spring Maven clean error – The requested profile “pom.xml” could not be activated because it does not exist
- web.xml is missing and
is set to true – web.xml is there and can’t edit deployment assembly - Maven error : Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher
- How to solve “Plugin execution not covered by lifecycle configuration” for Spring Data Maven Builds
- Error: JAVA_HOME is not defined correctly executing maven
- JAVA_HOME should point to a JDK not a JRE
- No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
- web.xml is missing and
is set to true - “webxml attribute is required” error in Maven
- How are “mvn clean package” and “mvn clean install” different?
- java.lang.VerifyError: Inconsistent stackmap frames at branch target 421
- How to resolve Unable to load authentication plugin ‘caching_sha2_password’ issue
- “The import org.springframework cannot be resolved.”
- “Source folder is not a Java project” error in eclipse
- Configure active profile in SpringBoot via Maven
- Maven build Compilation error : Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project Maven
- Maven: Command to update repository after adding dependency to POM
- Maven dependency update on commandline
- Could not transfer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.7.1 from/to central (http://repo1.maven.org/maven2)
- How do I enable index downloads in Eclipse for Maven dependency search?