maven-plugin

maven Error resolving version for plugin maven-eclipse-plugin in Jenkins

五迷三道 提交于 2019-12-11 13:56:51
问题 I recently encoutered one error when i built my job on jenkins, the same build was success in few week, but yesterday the build fails with the following error : [ERROR] Error resolving version for plugin 'org.apache.maven.plugins:maven- eclipse-plugin' from the repositories [local (/cip/home/jenkins-V1/.m2/repository-Project), central (http://mrm.fr.company.com/Project-virtual), snapshots (http://mrm.fr.company.com/Project-virtual)]: Plugin not found in any plugin repository -> [Help 1]

How to change project name in .project created from mvn eclipse:eclipse?

守給你的承諾、 提交于 2019-12-11 13:20:54
问题 Here is the content of my pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <url>http://maven.apache.org</url> <name>SomeProject</name> <groupId>com.test.te</groupId> <artifactId>testjar</artifactId> <version>1.1.6</version> <packaging>jar</packaging> <dependencies> .... .... </dependencies> <build>

Running a jar file having multiple main classes using command line

孤街浪徒 提交于 2019-12-11 12:07:54
问题 Have added multiple main classes in jar using following code in pom.xml as follows <groupId>com.test</groupId> <artifactId>indexer</artifactId> <version>1.0.0-SNAPSHOT</version> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.4.1</version> <executions> <execution> <phase>package</phase> <id>build-first</id> <goals> <goal>shade</goal> </goals> <configuration> <transformers> <transformer implementation="org.apache.maven.plugins.shade

The maven-exec-plugin executes only first execution

时间秒杀一切 提交于 2019-12-11 11:02:47
问题 I need to execute several java classes during maven build phase, but plugin executes only class from first execution Pom: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.2.1</version> <executions> <execution> <id>first</id> <goals> <goal>java</goal> </goals> <phase>test-compile</phase> <configuration> <mainClass>com.myPackage.AssignTest</mainClass> </configuration> </execution> <execution> <id>second</id> <goals> <goal>java</goal> </goals>

Java Client to Connect to Stash Repository

房东的猫 提交于 2019-12-11 10:26:04
问题 I am trying to programatically connect to a STASH repository from a Java class. I have had a look and I cannot find any Java clients to do this. Has anyone come across any? The reason I want to connect to a STASH repository is that I am writing a Maven plugin that will go to a Git repository in STASH and return a list of commits and then Jiras for a given tag. Any help would be greatly appreciated. 回答1: (Consolidating two answers given in comments as a Community Wiki answer) First of all,

Why does the Maven goal “package” include the resources in the jar, but the goal “jar:jar” doesn't?

与世无争的帅哥 提交于 2019-12-11 09:48:49
问题 when I package my project with the Maven goal "package", the resources are included as well. They are originally located in the directory "src/main/resources". Because I want to create an executable jar and add the classpath to the manifest, I'm using maven-jar-plugin. I've configured it as the following likes: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.2</version> <configuration> <archive> <manifest> <addClasspath>true<

How to exclude jars from ear

别来无恙 提交于 2019-12-11 08:47:39
问题 I am bundling EAR from a WAR file. The JARS are placed both in WARFile/WEB-INF/lib folder as well as EARFile/lib folder with duplication. Do we need the JARS again in EARFile/lib folder inspite of having in WARFile/WEB-INF/lib? If we do not need in EAR/lib filder, How can we remove them? The EAR file size became double due to duplication JARs presence in both WAR and EAR. Please help me. Thanks 回答1: Good read here on "skinny" wars. Basically, you put the jars in the ear, but not the war files

issues with android-maven-plugin

可紊 提交于 2019-12-11 08:14:47
问题 (After really many hours trying it, I finally resign.) Alright: -1. I do mvn -X archetype:generate -DarchetypeArtifactId=android-release -DarchetypeGroupId=de.akquinet.android.archetypes -DarchetypeVersion=1.0.9 -DgroupId=org.me -DartifactId=myAndroidApp -Demulator=myEmu -Dplatform=10 -2. First issue: you must manually edit top-level pom.xml to add < properties> < platform.version> 2.3.3 < /platform.version> < /properties> despite it is a straightforward relationship between -Dplatform=10 and

Custom type converter for Mojo configuration?

戏子无情 提交于 2019-12-11 07:12:04
问题 I need to use custom type, e.g., LunarDate , in my Mojo object: class MyMojo extends AbstractMojo { /** @parameter */ LunarDate lunarDate; } And I want to configure the parameter in <configuration> section in pom.xml. <configuration> <lunarDate>丁丑年二月初四</lunarDate> </configuration> (The type LunarDate is just an example to illustrate the question) I've already had the type converters, but how to enable them? 回答1: DefaultBeanConfigurator is responsible for using DefaultConverterLookup , and it

Maven plugin builds but can't execute due to java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

有些话、适合烂在心里 提交于 2019-12-11 06:04:25
问题 I am using the maven-jspc-plugin in my pom.xml. When i try to execute the jsp-compile goal (which executes the plugin) I get: Caused by: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory at org.apache.juli.logging.Slf4jLog.<init>(Slf4jLog.java:29) at org.apache.juli.logging.LogFactory.getLog(LogFactory.java:54) at org.apache.juli.logging.LogFactory.getLog(LogFactory.java:35) at org.apache.sling.scripting.jsp.jasper.compiler.OriginalTldLocationsCache.<init>(OriginalTldLocationsCache.java