maven-3

How do you create a checksum in Maven then output it to a text file?

。_饼干妹妹 提交于 2020-01-02 06:18:14
问题 Still learning how to use Maven , and I was wondering if there is a way to do a checksum on the generated WAR file. The Maven goal is package , and what I'm trying to achieve is to get a checksum value (of the packaged WAR file) put into a text file alongside the packaged file. Thanks in advance! 回答1: Got it working with the below pom code and changing my Maven goal to verify <dependency> ... <!-- CheckSum --> <dependency> <groupId>net.ju-n.maven.plugins</groupId> <artifactId>checksum-maven

dependencyManagement in parent ignored

自作多情 提交于 2020-01-01 19:03:32
问题 I have a project, P1, that creates a jar. That project has a parent POM, P1-PARENT. P1-Parent includes the following: <dependencyManagement> <!-- Kafka uses Zookeeper 3.3.4, but Curator requires 3.4.5. To resolve we specify 3.4.5 so all projects using either Kafka or Curator will get the later version which is compatible with both projects. --> <dependency> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</artifactId> <version>3.4.5</version> </dependency> <dependency> <groupId

How do I enable Ebean Enhancement in Maven?

风流意气都作罢 提交于 2020-01-01 11:50:44
问题 I've been using Avaje.org ebean ORM layer for a while, but I don't understand how to enable the byte-code enhancement functionality described in the "Ebean v2.6.0 User Guide" with Maven. I found a configuration example on the Avaje.org homepage, but it doesn't work. Neither does the demo Maven boilerplate on GitHub. Help! 回答1: EBeans now has its own Maven Plugin, but I can't find any documentation online, so here is an example of how to use it: <plugin> <groupId>org.avaje.ebeanorm</groupId>

How to exclude {test} scoped dependencies from build?

偶尔善良 提交于 2020-01-01 10:29:49
问题 I have Java project build with maven that has some dependencies. One of such dependencies is another project (I have Eclipse workspace in mind) and it is only in test scope. <dependency> <groupId>my.group.id</groupId> <artifactId>artifactid</artifactId> <version>1.0</version> <scope>test</scope> </dependency> I build my projects using following command inside project root dir mvn clean package -Dmaven.test.skip=true what I expected to happen it that maven would build project leaving test

How to exclude {test} scoped dependencies from build?

坚强是说给别人听的谎言 提交于 2020-01-01 10:29:10
问题 I have Java project build with maven that has some dependencies. One of such dependencies is another project (I have Eclipse workspace in mind) and it is only in test scope. <dependency> <groupId>my.group.id</groupId> <artifactId>artifactid</artifactId> <version>1.0</version> <scope>test</scope> </dependency> I build my projects using following command inside project root dir mvn clean package -Dmaven.test.skip=true what I expected to happen it that maven would build project leaving test

Maven lifecycle within jenkins pipeline - how to best separate responsibilities?

◇◆丶佛笑我妖孽 提交于 2020-01-01 05:11:27
问题 When working with jenkins 2 (declarative) pipelines and maven I always have a problem with how to organize things within the pipeline to make it resusable and flexible. On the one side I would like to seperate the pipepline into logical stages like: pipeline { stages { stage('Clean') {} stage('Build') {} stage('Test') {} stage('Sanity check') {} stage('Documentation') {} stage('Deploy - Test') {} stage('Selenium tests') {} stage('Deploy - Production') {} stage('Deliver') {} } } On the other

Can a maven mojo relying on Aether be compatible with Maven 3.0.x and 3.1.x?

心已入冬 提交于 2020-01-01 04:56:08
问题 The 3.1.0 release of Maven relies on Eclipse Aether (org.eclipse.aether) instead of Sonatype Aether (org.sonatype.aether). This seems to break compatibility for plugins relying on Sonatype aether : try running such plugins and you'll run into : java.lang.NoClassDefFoundError: org/sonatype/aether/* Caused by: java.lang.ClassNotFoundException: org.sonatype.aether.* As documented in https://cwiki.apache.org/confluence/display/MAVEN/AetherClassNotFound Now, is it possible to make a mojo relying

maven-metadata.xml is not updated when deploying to nexus

断了今生、忘了曾经 提交于 2020-01-01 04:51:04
问题 i am using Apache Maven 3.0 Nexus Open Source Edition, Version: 1.8.0.1 this is part of my pom.xml <plugin> <artifactId>maven-deploy-plugin</artifactId> <version>2.5</version> </plugin> <plugin> <artifactId>maven-release-plugin</artifactId> <version>2.1</version> </plugin> <distributionManagement> <repository> <id>nexus</id> <name>nexus</name> <url>http://myrepo/nexus/content/repositories/releases</url> </repository> </distributionManagement> it is a very simple project. when i do mvn release

Where is the JDK version to be used by Maven compiler specified?

我的未来我决定 提交于 2020-01-01 04:41:07
问题 When I do not define something as follows in my pom.xml file, where on my system is it defined for Maven which version of Java JDK to use while compiling (I have several versions installed on my system, JAVA_HOME points to one of them)? <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin> </plugins> </build> 回答1: Maven

Do not run a category of slow JUnit tests by default in Maven and every IDE (Eclipse, IntelliJ, …) without an explicit TestSuite

狂风中的少年 提交于 2019-12-31 10:52:46
问题 I have a set of really slow tests, which take a week to run. (They literally run some code non-stop for about a week). Naturally, no developer (or even the default build job) wants to run these tests. Only a specific, separate build job has the time to run them. So these tests needs to be disabled by default . JUnit's categories seemed perfect for this: I annotated those slow tests with @Category(SlowTests.class) . Problem is that they are still run because: I don't want to maintain TestSuite