Maven install excluding specific modules - maven

I am installing this project with several modules. The goal is to install all modules EXCEPT the nd4j-cuda module. If I run this:
mvn clean install -pl ':nd4j-cuda-8.0'
then maven attempts to install the module, no errors are thrown detecting it. However, since I actually do NOT want to install it, I tried
mvn clean install -pl '!:nd4j-cuda-8.0'
but I get the error message
Could not find the selected project in the reactor: !:nd4j-cuda-8.0
What am I doing wrong here?

I try with groupId:
mvn clean -pl '!org.nd4j:nd4j-cuda-8.0'
also
mvn clean -pl '!:nd4j-cuda-8.0'
give teh same result.
My maven version is: 3.3.3
With maven version 3.0.5 I have the same error as you, so please use newer version of maven.

Related

Spring change application.properties location using mvn clean install

Im a bit confused about this.
Im creating a script that build my project, but I need to specify the location of the application properties while using mvn clean install.
There exists something like mvn clean install -propLocation=/some_path/application.properties?

<Maven> How is the command "mvn dependency:resolve" different from "mvn clean install"?

I would like to ask about the use of the command "mvn dependency:resolve". When I executed the command in project folder, it seems it download jars and build the application. I wonder if it has the same functions as "mvn clean install". Thanks.
Install will compile, test & package your Java project and even install/copy your built .jar/.war file into your local Maven repository.
But dependency:resolve compile your application and print resolved dependencies.

Differences between maven archetype commands and maven command mvn package?

Could somebody tells me, what are the differences between the command mvn archetype:generate and the commands mvn clean package or mvn clean install.
Thanks a lot!
Maik
archetype:generate generates a brand new project from a template
clean package clean and package the project
clean install clean, package the project and install it into the local repo. (i.e. ~/.m2/repository)
For more info, see the documentation

Error building hadoop 1.0.1 - missing pom.xml

I followed the instructions given here to download and build hadoop 1.0.1 from this repository. I have installed JDK, Maven, cmake, autoconf etc. When I run th efollowing command from the hadoop top level directory
mvn -e package -Pdist -Pdoc -Psrc -Dtar -DskipTests
mvn reports an error saying that no pom.xml is found. There is no pom.xml file in the folder or any subfolders.
As far as I investigate the Hadoop Common tags, only version 0.23.x and 2.0.x is a Maven project. The rest is an Ant and/or Ivy project. Please note If there is no pom.xml it is not a Maven project.
If you would like to build the version 1.0.1, please use Apache Ant or Apache Ivy instead.

windows script for building multimodule maven project

I'm trying to create a .bat file for automatic building of a multimodule maven project, the script is :
mvn clean install
cd ./webapp
mvn jetty:run-war
However, the first line seem to close the console window, so I never get to the last line. Thank you in advance.
call mvn clean install
cd ./webapp
call mvn jetty:run-war

Resources