You can use the parameter -f
(or --file
) and specify the path to your pom file, e.g. mvn -f /path/to/pom.xml
This runs maven “as if” it were in /path/to
for the working directory.
More Related Contents:
- Best practices for copying files with Maven
- Hosting a Maven repository on github
- Jenkins CI Pipeline Scripts not permitted to use method groovy.lang.GroovyObject
- How do you clear Apache Maven’s cache?
- Maven and adding JARs to system scope
- Why am I getting “Received fatal alert: protocol_version” or “peer not authenticated” from Maven Central?
- Maven WAR dependency
- How to disable maven blocking external HTTP repositories?
- Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test
- Selenium-TestNG-Maven – Getting “java.lang.NoClassDefFoundError: org/openqa/selenium/firefox/FirefoxDriver”
- Error when deploying an artifact in Nexus
- Adding external JAR to Maven project in NetBeans
- What is the difference between M2_HOME and MAVEN_HOME
- Unpack inner zips in zip with Maven
- Maven command to determine which settings.xml file Maven is using
- Maven: The packaging for this project did not assign a file to the build artifact
- Maven – Depend on assembled zip
- How to get a command-line property to overwrite a maven property
- “webxml attribute is required” error in Maven
- maven command line how to point to a specific settings.xml for a single command?
- Is effective-pom a merge between super pom and application POM
- Maven Snapshot Repository vs Release Repository
- Maven multi-module project – copying all “package” JARS from submodules into parent/target/
- Generate test-jar along with jar file in test package
- Where should I put unit tests when migrating a Java 8 project to Jigsaw
- ClassNotFoundException with com.mysql.cj.jdbc.Driver, MySQL Connector and IntelliJ IDEA [duplicate]
- How to override the `project.build.finalName` Maven property from the command line?
- Make maven’s surefire show stacktrace in console
- Maven best practice for creating ad hoc zip artifact
- How to exclude maven dependencies?