maven-2

How do I upgrade the version of a maven plugin?

房东的猫 提交于 2019-12-02 15:35:54
I am using the maven-ear-plugin version 2.3.1 - I know there is a new version available: http://maven.apache.org/plugins/maven-ear-plugin/ I can't work out how to upgrade to the latest version? andri The default plugin versions are inherited from the Super POM, and you can check them with mvn help:effective-pom . If you want to override the version provided there, add this to your POM: <project> <build> <plugins> <plugin> <artifactId>maven-ear-plugin</artifactId> <version>2.3.1</version> </plugin> </plugins> </build> </project> Replace the version with what you need. Pat Even though this has

Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor

試著忘記壹切 提交于 2019-12-02 15:00:21
[INFO] [war:war {execution: default-war}] [INFO] Packaging webapp [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor ---- Debugging information ---- message : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor cause-exception : com.thoughtworks.xstream.converters.reflection.ObjectAccessException

What is wrong with my Maven Config?

无人久伴 提交于 2019-12-02 14:41:29
问题 I want to checkout sonar, so I added the following snippet to my pom.xml the dependency part was taken from http://maven.apache.org/general.html#tools-jar-dependency <profile> <id>sonar</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <sonar.jdbc.url>jdbc:derby://localhost:1527/sonar;create=true</sonar.jdbc.url> <sonar.jdbc.driverClassName>org.apache.derby.jdbc.ClientDriver </sonar.jdbc.driverClassName> <sonar.jdbc.username>sonar</sonar.jdbc.username>

Is there a way to hide Maven 2 “target/” folder in Eclipse 3?

我怕爱的太早我们不能终老 提交于 2019-12-02 14:28:01
I'm using maven 2.0.9 with Eclipse 3.3.2. I'm used to launching a fresh build once per day by a mvn clean install . Then, if I refresh my Eclipse project, it will be "polluted" by files from Maven's target directory. That's very annoying while performing searches, getting resources by "open resource" and so on. Is there a way to avoid Eclipse looking in this folder? Right click on the folder you want to ignore, open the "Properties" dialog, chose the "Resource" tab and check the box that says "Derived" Reconfigure "clean" in Maven not to delete target directory: <plugin> <artifactId>maven

In a Maven project, how can I automatically update the version all child modules, plus the parent?

蹲街弑〆低调 提交于 2019-12-02 14:18:15
I have a multi-module project. parent POM (1.0-SNAPSHOT) |-- module1 (1.0-SNAPSHOT) |-- module2 (1.0-SNAPSHOT) `-- module3 (1.0-SNAPSHOT) When I execute mvn release:prepare it verify that parent POM has a SNAPSHOT version and all dependent modules don't have a SNAPSHOT version. How automatically update all child modules from SNAPSHOT to the next release version? I would like automatically increment version for all modules. Pascal Thivent The release plugin can handle that. Did you check Updating POM Versions ? But... I don't get something. Changing the version in the POMs from x-SNAPSHOT to a

Buiding Hadoop with Eclipse / Maven - Missing artifact jdk.tools:jdk.tools:jar:1.6

心不动则不痛 提交于 2019-12-02 14:02:45
I am trying to import cloudera's org.apache.hadoop:hadoop-client:2.0.0-cdh4.0.0 from cdh4 maven repo in a maven project in eclipse 3.81, m2e plugin, with oracle's jdk 1.7.0_05 on win7 using <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-client</artifactId> <version>2.0.0-cdh4.0.0</version> </dependency> however, I get the following error: The container 'Maven Dependencies' references non existing library 'C:\Users\MyUserId\.m2\repository\jdk\tools\jdk.tools\1.6\jdk.tools-1.6.jar' more specific, maven states that the following artifact is missing Missing artifact jdk.tools

How do I install Maven with Yum?

吃可爱长大的小学妹 提交于 2019-12-02 13:51:46
I'm trying not to learn much about either yum or maven. I've inherited this code and I don't want to spend more time than I have to in this environment. I've got yum. My installation "has" ("is attached too"? "knows about"?) two repos: the Amazon one and JPackage, which I understand is something of a standard. (Actually, each of those repositories consists of two sub-repositories, but I don't think that's causing the problem.) When I asked yum to install maven2, it declined, saying it had never heard of maven2. When I asked yum to install maven2 ignoring Amazon , it does so, but it installs

log4j can't initialize with my log4j.properties

為{幸葍}努か 提交于 2019-12-02 12:17:38
I have a simple log4j.property file and a simple program that use log4j. But when I run my jar I see only this log4j:WARN No appenders could be found for logger (package com.mycompany.hellolog4j). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Here is how I use logger: package com.mycompany.hellolog4j; import java.io.File; import java.io.IOException; import org.apache.log4j.*; public class SimpleLogging { public static void main(String args[]) throws IOException { Logger logger = Logger.getLogger

Converting Ant Web Application Project to Maven Project

走远了吗. 提交于 2019-12-02 11:18:39
Hi I have a running code project build using Ant now what i need is to convert it to maven , i browse for the solution and what i done is simply creating a new maven web project and added all my src files to src/main/java and all the xml files (e.g security.xml,tiles-config.xml,web.xml,properties files,jsp folder etc) to webapp/web-inf/ folder. Is that correct so far ?? The main question how to create a pom file , I mean as I used a lot of jar to support the code , how to mention that in my pom file ..Did I have to mention for each one of them ?? Please give an idea .. I developed a script to

Which dependency do I need for this import in Maven

落爺英雄遲暮 提交于 2019-12-02 09:58:22
I am trying to convert a Java project which uses Ant into a Maven project, but am having difficulties finding out which dependencies to include. How do I find out dependency settings for a particular import? Provided you currently have the jars on your build-path, at least in Eclipse, when you CTRL + click an imported class, and you have selected "link with editor" on the package explorer, the bytecode outline is opened and the file is selected within the jar it is located. Then, having the m2eclipse plugin, you right-click your pom -> Maven -> Add dependency, and type the name of the jar