Questions tagged [maven-exec-plugin]

37 questions
296
votes
2 answers

run main class of Maven project

I've created a simple console Java application that is built with Maven. Is there a way that the main class (which doesn't require any arguments) can be run from the command-line using a maven command like: mvn run-app com.example.MainClass
Dónal
  • 185,044
  • 174
  • 569
  • 824
6
votes
3 answers

How to stop Maven Execution

I have a mock server which I need to start in Jenkins before running my Automation tests and then stop the mock server after my tests have run. This mock server is a maven project and is using exec-maven-plugin. I am able to start this server by…
God_Father
  • 491
  • 3
  • 8
  • 17
5
votes
1 answer

mvn exec:java to run a java file in an external JAR file

In the pom.xml there is a usage of maven-dependency-plugin to download a specific external JAR file to a separate location (in /tmp/externalTestJars/testjar.jar). And I want to use exec-maven-plugin to run a java class in the testjar.jar file…
prime
  • 14,464
  • 14
  • 99
  • 131
4
votes
1 answer

Maven Exec Plugin with Preview Features

It's easy to compile your Java sources with --enable-preview: org.apache.maven.plugins maven-compiler-plugin 3.8.1
4
votes
0 answers

Gracefully stop a java program started by maven-exec plugin

This is in line with the question: Gracefully stopping a java process started by maven-antrun-plugin Except that this concerns the maven-exec-plugin I tried the soultion mentioned in the question above, which makes ude of the…
gkns
  • 697
  • 2
  • 12
  • 32
3
votes
1 answer

Running "python -m unittest" failing with maven exec-maven-plugin

I'm trying to set up my maven build so that mvn test runs my python tests in addition to my Java tests. I'm trying to use the exec-maven-plugin to do this. My pom.xml has: org.codehaus.mojo
joeltine
  • 1,610
  • 17
  • 23
3
votes
2 answers

How to continue and not fail build on error in Exec Maven Plugin execution?

How can the maven build be made to continue despite an error in one of the execution added by the Maven exec plugin? https://www.mojohaus.org/exec-maven-plugin/usage.html
rob2universe
  • 7,059
  • 39
  • 54
3
votes
1 answer

Is there a way to read a text from a text.file and set it to maven property in pom.xml maven?

Is there a way to read a text from a text.file and set it to maven property in pom.xml maven? I am trying with the below code. But, I will need to read the text from tmp.txt and assign it to the maven property "token".
3
votes
1 answer

Maven list/array property command line override

Is there a way to pass Maven list/array property (e.g. maven-exec-plugin arguments optional parameter) using system properties approach? I know that the arguments optional parameter can be overridden by exec.args environment variable and…
Alexander Ites
  • 155
  • 2
  • 9
2
votes
1 answer

Invalid configuration value detected for fs.azure.account.key with com.crealytics:spark-excel

I have setup my Databricks notebook to use Service Principal to access ADLS using below confguration. service_credential =…
Deepak
  • 548
  • 3
  • 15
2
votes
1 answer

Java - HttpClient not releasing threads

I am using Java 11's built in HTTP client and facing a strange issue with the client not releasing threads. I have the following code: public static void main(String[] args) throws InterruptedException, IOException, URISyntaxException { …
user3690467
  • 3,049
  • 6
  • 27
  • 54
2
votes
1 answer

How to use maven-exec-plugin for npm clean?

I am using exec-maven-plugin. I have extensions for npm install and npm clean. Below is my plugin section in the pom file. It contains extension for npm install , tsc run and npm clean. org.codehaus.mojo
Shanmukh
  • 181
  • 3
  • 17
2
votes
1 answer

Multiple commands with Maven Exec plugin

I am struggeling a bit with the Maven Exec plugin. I want to execute two seperate mvn commands using the plugin so I only need to execute mvn exec:exec in order to execute all commands. The following two commands work well seperately:
Sebastian Dine
  • 815
  • 8
  • 23
1
vote
0 answers

Spread config files to child poms (maven)

I have a parent pom which is inherited by multiple other poms superpom |--pokemon |--|--app |--|--infrastructure |--yu-gi-oh |--|--app |--|--infrastructure I have multiple config files like: a cve-suppress.xml file for the good old dependency…
Wumba
  • 99
  • 1
  • 12
1
vote
0 answers

Class not found with mvn exec:java during runtime

I am trying to use the command mvn exec:java unsuccessfully. I configure my pom.xml with the mainClass parameter and add the different dependencies. I use version 3.0.0 of exec-maven-plugin. It runs but I get an execption…
Jonathan
  • 11
  • 1
1
2 3