Spring change application.properties location using mvn clean install - spring

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?

Related

<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.

BUILD FAILURE while installing DL4J

I'm trying tu buld projetct with DL4J .
I did the following steps from ths website : https://deeplearning4j.konduit.ai/getting-started/quickstart
When I do this command mvn clean install
I get the following error :
It looks like you modified something? Sorry if I'm not quite following what you did, but that error message indicates a missing pom.xml.
The specific steps you follow are:
Clone the repository
git clone https://github.com/eclipse/deeplearning4j-examples
cd in to the directory
cd deeplearning4j-examples/dl4j-examples
Run mvn clean install -DskipTests
mvn clean install -DskipTests
What I think could have happened here is you were in the root of the project. The deeplearning4j examples actually do not have a root pom.xml. We used to, but that took too long for people just getting started.
Of note here as well is another submodule in the project:
https://github.com/eclipse/deeplearning4j-examples/tree/master/mvn-project-template
This contains the default getting started project.
The dl4j-examples contain samples for different use cases. Please pay attention to that when looking at both.
Hopefully this helps!

Fast way to rebuild and reload opendaylight bundle

I am developing a bundle for opendaylight. Is there a quick way to just rebuild the bundle without the complete karaf environment?
Thanks in advance!
Max
You can rebuild the bundle, without anything else, by running Maven in the directory containing your bundle’s POM. If you’re on the command-line:
cd your-bundle-directory
mvn compile
(or mvn install etc. depending on what you want to do exactly).

Maven install excluding specific modules

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.

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