maven-3

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

我与影子孤独终老i 提交于 2019-12-31 10:51:55
问题 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

Jar file failed to load in tomcat webapps

我的未来我决定 提交于 2019-12-31 08:46:14
问题 This is what the error i got when i try to deploy maven project to tomcat mvn tomcat7:deploy Error : INFO: validateJarFile(D:\Softwares\tomcat\apache-tomcat-7.0.50\webapps\myWebApp_ 1\WEB-INF\lib\javax.servlet-api-3.0.1.jar) - jar not loaded. See Servlet Spec 3. 0, section 10.7.2. Offending class: javax/servlet/Servlet.class But the javax.servlet-api-3.0.1.jar is there in WEB-INF\lib Thanks 回答1: INFO: validateJarFile(D:\Softwares\tomcat\apache-tomcat-7.0.50\webapps\myWebApp_ 1\WEB-INF\lib

How to stop CI builds in Jenkins from accidentally publishing to release repository?

泪湿孤枕 提交于 2019-12-31 02:43:07
问题 Sometimes, the developers accidentally check in a version in POM without "SNAPSHOT" in it. This builds the Maven project and publishes the artifacts to release repository. How can I avoid this situation? I only want to publish build artifacts to release repository and not a CI build. I thought about the following- but none of them is an easy one step solution Writing a pre-commit hook to check if version was checked in without SNAPSHOT by any one other than admin who is allowed to do a

Scene.getStylesheets().add() not working inside jar file

我只是一个虾纸丫 提交于 2019-12-30 22:54:21
问题 As long as I run my project directly from Eclipse, I have no problem with that: scene.getStylesheets().add(getClass().getResource("/stylesheet.css").toExternalForm()); But as soon as I run this code inside of a jar file, the resource is not found ( NullPointerException ). I tried moving the css file to my src folder and then only stylesheet.css as path instead of /stylesheet.css , but this leads to the same problem: Works fine using Eclipse, but not from the jar. Hint : I am using Zonskis

Impose build order for a multi-project in Maven

筅森魡賤 提交于 2019-12-30 02:56:30
问题 I have a multi project in maven like this: paren-project -> plugin-project -> testbed-project The plugin project generates a JAR, which is manually copied to a specific subdirectory of testbed (using whatever embedded script like groovy or ant). The important point: I don't want the plugin JAR to be in the classpath of testbed. But I cannot found the solution to force the plugin project to be build BEFORE the testbed project. If I set the plugin project as dependency of the testbed project,

Maven Settings for multiple repositories

主宰稳场 提交于 2019-12-29 14:16:53
问题 I have the following in settings.xml <mirrors> <mirror> <id>paid-jars</id> <name>jars with license</name> <url>http://url:8081/nexus/content/repositories/paidjars/</url> <mirrorOf>!central</mirrorOf> </mirror> <mirror> <id>Org-central</id> <name>mirror of central</name> <url>http://url:8081/nexus/content/repositories/central/</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors> In pom.xml I have two jars apache-commons.jar (which I assumes to be downloaded from central) licensed.jar (which

How do I run annotation processing via maven 3.3?

余生颓废 提交于 2019-12-29 08:53:05
问题 For years, we've been running the maven-processor-plugin as a separate goal (using proc:none on maven-compiler-plugin). We are finally upgrading from maven 3.0.5 to the latest 3.3.3, and I see that the maven-processor-plugin basically looks dead. As far I a can tell, it has not been migrated out of google code. We're using annotation processing primarily to generate dagger classes. I can't remember the reasons, but at the time (in dagger-1), we got the impression it is better to do this

Using maven using non standard directory layout

天大地大妈咪最大 提交于 2019-12-29 04:22:05
问题 I am trying to apply maven to an existing project which already has a directory structure in place. All I can find from previous question is the following. Maven directory structure However, my requirement is more detailed. Please see below for the directory structure: <root dir> | +--src-java | +--src-properties | +--WEB-INF I know we could have something like <build> <sourceDirectory>src-java</sourceDirectory> ... </build> But sourceDirectory is for JAVA source code only, if I'm not

Buildr, Gradle or wait for Maven 3? [closed]

*爱你&永不变心* 提交于 2019-12-29 02:32:30
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 years ago . I am really tired of struggling with Maven 2 all the time. Build tools should not be in the way. Recently I have been looking at Buildr and Gradle. Maven 3 seems to fix some of the struggles. So, what should I go for now? Buildr? Gradle? Or wait a year for Maven 3? 回答1: No

Error “The goal you specified requires a project to execute but there is no POM in this directory” after executing maven command

Deadly 提交于 2019-12-28 08:06:07
问题 I have a pom.xml in C:\Users\AArmijos\Desktop\Factura Electronica\MIyT\componentes-1.0.4\sources\pom.xml and I executed: mvn install:install-file -DgroupId=es.mityc.jumbo.adsi -DartifactId=xmlsec-1.4.2-ADSI -Dversion=1.0 -Dpackaging=jar -Dfile=C:\Users\AArmijos\Desktop\Factura Electronica\MIyT\componentes-1.0.4\core\xmlsec-1.4.2-ADSI-1.0.jar however it returned the error below: [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------