maven-plugin

How to solve Maven Invoker API warning: Maven will be executed in interactive mode, but no input stream has been configured

点点圈 提交于 2021-02-08 16:34:34
问题 I have a plugin which invokes Maven runs using MavenInvokerAPI. Everything is working fine, but I do have this warning in my Maven console output. [WARN] Maven will be executed in interactive mode, but no input stream has been configured for this MavenInvoker instance. I do not need interaction in my build process, and based on Javadoc of setInputStream() , I set my inputStream to null , but again I have this warning: /** * Sets the input stream used to provide input for the invoked Maven

what is this maven certification error indicates?

大憨熊 提交于 2021-02-08 08:27:19
问题 [ERROR] Non-resolvable parent POM for com.example:dynamoWork:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.0.RELEASE from/to artie (https://repo.maven.apache.org/maven2/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target and 'parent.relativePath' points at no local POM @ line 14, column 10 ->

Maven Build Profile Activation

人走茶凉 提交于 2021-02-07 21:52:49
问题 I know there are some related topics but still I can't understand how to do it. I'm learning maven and currently in process of creating build profiles. I want maven to auto detect the currently installed java version on my machine. Let's say I'm working in our office which uses (jdk7) or home (jdk8) , I want the <source> and <target> elements in maven-compiler-plugin pom.xml to auto detect the java -version regardless of environment (office / home). I've read about activation but can't

How to set both VM Params and Program args using exec-maven-plugin?

你。 提交于 2021-02-07 18:13:33
问题 I am using exec-maven-plugin to run java app. I need to pass both JVM params and program arguments. I am setting JVM params like this: <artifactId>exec-maven-plugin</artifactId> <version>1.6.0</version> <executions> <execution> <id>MyId</id> <goals> <goal>java</goal> </goals> <configuration> <mainClass>MyClass</mainClass> <arguments> <argument>-XX:+UseG1GC</argument> <argument>-Xms2G</argument> <argument>-Xmx2G</argument> </arguments> </configuration> </execution> ... and run the program: mvn

How to set both VM Params and Program args using exec-maven-plugin?

落花浮王杯 提交于 2021-02-07 18:08:56
问题 I am using exec-maven-plugin to run java app. I need to pass both JVM params and program arguments. I am setting JVM params like this: <artifactId>exec-maven-plugin</artifactId> <version>1.6.0</version> <executions> <execution> <id>MyId</id> <goals> <goal>java</goal> </goals> <configuration> <mainClass>MyClass</mainClass> <arguments> <argument>-XX:+UseG1GC</argument> <argument>-Xms2G</argument> <argument>-Xmx2G</argument> </arguments> </configuration> </execution> ... and run the program: mvn

Invocation of MavenCli fails within a Maven plugin

心已入冬 提交于 2021-02-07 08:47:38
问题 I've created small util to wrap MavenCli , which generates a new Maven project, using the quickstart archetype. When executing the Util as a unit test, it is working quite well (just generating an empty Maven project). Now I want to integrate this small wrapper into a Maven plugin. But when I execute the mojo (within a third Maven project), the invocation of MavenCli fails with exception: [ERROR] Error executing Maven. [ERROR] java.util.NoSuchElementException role: org.apache.maven.eventspy

Invocation of MavenCli fails within a Maven plugin

最后都变了- 提交于 2021-02-07 08:47:11
问题 I've created small util to wrap MavenCli , which generates a new Maven project, using the quickstart archetype. When executing the Util as a unit test, it is working quite well (just generating an empty Maven project). Now I want to integrate this small wrapper into a Maven plugin. But when I execute the mojo (within a third Maven project), the invocation of MavenCli fails with exception: [ERROR] Error executing Maven. [ERROR] java.util.NoSuchElementException role: org.apache.maven.eventspy

Append or merge default maven plugin configuration

百般思念 提交于 2021-02-07 06:53:15
问题 Is it possible to not override but merge or append to default plugin configuration in Apache Maven just like it's possible with parent POM configuration elements? 回答1: I'm note sure if i understand your questions correctly: If you like for example to change the configuration of an already defined plugin you should be aware that you need to use the correct execution id which can be looked at during a default build which is printed out in the log output (something like this): [INFO] --- maven

how do I tell maven 3.6.3 to get latest version of artifact from custom repository

妖精的绣舞 提交于 2021-01-29 19:45:05
问题 I need to download the latest version of artifact from custom repository rather than maven repository.(Download a latest single artifact from the custom repository) I followed the how do i tell maven to get latest version of artifact from custom nexus repository. How do I tell Maven to use the latest version of a dependency? https://www.baeldung.com/maven-dependency-latest-version <dependencies> <dependency> <groupId>com.LDBS</groupId> <artifactId>LDBS</artifactId> <version>1.0.0-SNAPSHOT<

How to make jar file with all dependencies a.k.a. Fat jar with IntelliJ

て烟熏妆下的殇ゞ 提交于 2021-01-29 08:49:30
问题 I'm trying to make jar file with all dependencies in my project. I'm using IntelliJ. I tried two ways. In maven window of upper-right part of IntelliJ, I clicked "clean" and "package" with below pom.xml. But it doesn't contain any dependencies. I'm using IntelliJ in window, so I can't follow below link which is CLI. I'm using GUI maven window in upper right part of IntelliJ. How can I create an executable JAR with dependencies using Maven? I clicked Build-Build artifact - build following