maven-3

How does mvn dependency:analyze work?

只谈情不闲聊 提交于 2021-01-28 08:19:45
问题 Can someone let me know how does mvn dependency:analyze work ? An output of mvn dependency:analyze in one of my project shows [WARNING] Used undeclared dependencies found: [WARNING] org.apache.commons:commons-lang3:jar:3.4:compile [WARNING] com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile ... [WARNING] Unused declared dependencies found: [WARNING] org.springframework.boot:spring-boot-starter-test:jar:1.5.4.RELEASE:test [WARNING] org.springframework.restdocs:spring-restdocs

Cannot execute Groovy Maven Plugin as a goal

天大地大妈咪最大 提交于 2021-01-27 07:46:38
问题 I am using Apache Maven 3.3.9 with the Groovy Maven plugin. Here is the relevant section of the pom.xml (the inlined Groovy script is just fictional): <plugin> <groupId>org.codehaus.gmaven</groupId> <artifactId>groovy-maven-plugin</artifactId> <version>2.0</version> <executions> <execution> <id>myGroovyPlugin</id> <phase>prepare-package</phase> <goals> <goal>execute</goal> </goals> <configuration> <source> log.info('Test message: {}', 'Hello, World!') </source> </configuration> </execution> <

Is there a way in maven to assure that a property is set

冷暖自知 提交于 2021-01-27 04:48:25
问题 I just tracked down a difficult maven issue that was caused by a bad property value. The property is a path to an alternate JVM that is used a run-time by a test. I would like to make maven fail early by detecting if the path is valid or not. What might be a way to accomplish this? I plan to dig into antrun to see if there is a way to make it run first so that it can check, but that seems like overkill. Question : How can I do this cleanly and simply? 回答1: Yes, you can use the maven-enforcer

Release a snapshot to nexus using maven 3.0.5

梦想的初衷 提交于 2021-01-26 20:39:52
问题 I am unable to release a snapshot version of an artifact which I build using maven to nexus. The version of my artifact states 1.0.0-SNAPSHOT. I can execute mvn clean install without an issue. But when I try to deploy using mvn deploy , I get the following error : Return code is: 400, ReasonPhrase: Repository version policy: RELEASE does not allow version: 1.0.0-20161019.214318-1. -> [Help 1] According to what I was able to find out was that maven3 adds the timestamp instead of the SNAPSHOT

How to exclude test dependencies from a shaded maven jar?

删除回忆录丶 提交于 2021-01-22 06:34:27
问题 I'm using the maven-shade-plugin and I'd like to exclude not only my test code, but my test dependencies in the shaded jar. I realize I can specifically exclude certain artifacts (like junit), but that's a good bit of work and prone to some error most likely. I'm setting minimizeJar to true, but I still see my Junit and Mockito dependencies showing up. Is there just no way to exclude all test scoped dependencies via configuration? 回答1: Make sure your test dependencies in the test scope:

How to exclude test dependencies from a shaded maven jar?

蹲街弑〆低调 提交于 2021-01-22 06:33:24
问题 I'm using the maven-shade-plugin and I'd like to exclude not only my test code, but my test dependencies in the shaded jar. I realize I can specifically exclude certain artifacts (like junit), but that's a good bit of work and prone to some error most likely. I'm setting minimizeJar to true, but I still see my Junit and Mockito dependencies showing up. Is there just no way to exclude all test scoped dependencies via configuration? 回答1: Make sure your test dependencies in the test scope:

Is maven shade-plugin culprit for my jar to not work in server

主宰稳场 提交于 2021-01-07 06:31:12
问题 I have developed a java application and made it a jar file. I bundled all the dependencies using mvn clean package maven-shaded-plugin. My problem is that although the application works fine in my local machine, it does not work in the server environment. Whenever I run it, I get a NullPointerException which means the variable is not being initialized, which implies the underlying dependency is not working properly. The original question I posted is in here: JMS connection not connecting to

ERROR :Non-resolvable parent POM: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom

二次信任 提交于 2020-12-15 05:14:29
问题 I am getting the below exception in pom.xml when trying to run application, I saw some posts regarding the error, I followed them but no use, I understood the artifact(parent) is referred locally and is not present, but I don't know how to resolve this, could somebody please help me, The error is Project build error: Non-resolvable parent POM for com.example:demo:0.0.1-SNAPSHOT: Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:1.5.18.BUILD-SNAPSHOT from https://repo

Access Podman REST API from TestContainer

血红的双手。 提交于 2020-12-12 06:17:22
问题 I develop a Java application using Maven 3 and Podman 1.8.0. I understand that Podman provide a Docker compatible REST API. Java integration test use TestContainer framework. TestContainer is not able to connect to Podman REST API. I have the same problem with the python application use to test Podman. Is it a problem with user account? Does Podman 1.8 release support REST API yet? Thx. 来源: https://stackoverflow.com/questions/60476215/access-podman-rest-api-from-testcontainer

Access Podman REST API from TestContainer

百般思念 提交于 2020-12-12 06:12:28
问题 I develop a Java application using Maven 3 and Podman 1.8.0. I understand that Podman provide a Docker compatible REST API. Java integration test use TestContainer framework. TestContainer is not able to connect to Podman REST API. I have the same problem with the python application use to test Podman. Is it a problem with user account? Does Podman 1.8 release support REST API yet? Thx. 来源: https://stackoverflow.com/questions/60476215/access-podman-rest-api-from-testcontainer