maven-2

Set up Eclipse to work with Java EE

非 Y 不嫁゛ 提交于 2019-12-01 05:52:54
问题 First note that I'm new to EE and particulary to Eclipse (I'm seriosly working with Eclipse for the second time in my life :) ). Then I have opened Eclipse project that was created by somebody else. It is using Java EE (some EJB, Persistence API...). Cannot run this project, there are compile errors - I cannot get it to use EE libraries - it look like this: No Anotations are known to it and there is no quick fix. Also the project contains Maven dependencies (I have managed to install Maven

Java Repository of Eclipse with Maven : Missing artifact:compile

无人久伴 提交于 2019-12-01 05:36:01
问题 I am trying to intigrate jersey-server and the grizzly-servlet-webserver into my Maven Webapp to try a hellworld with JAX-RS . Unfortunately the Jersey and Grizzly dependencies are trouble and not working. I tried deleting the .m2 folder because I thought it might be corrupted which did not help. I added other dependencies like jsoup which works fine. In the log it actually downloads jersey-server from the repository so its not a networking issue. Can anybody help me? I am really stuck! My

Upload file via Ant FTP task in Maven

我与影子孤独终老i 提交于 2019-12-01 05:30:51
I'm trying to upload a file using an Ant task. If I use Ant directly the file is uploaded, but if I call the ant task via Maven (using the maven-antrun-plugin ) I get the following error: An Ant BuildException has occured: The following error occurred while executing this line: /home/me/proj/build.xml:15: Problem: failed to create task or type ftp Cause: the class org.apache.tools.ant.taskdefs.optional.net.FTP was not found. This looks like one of Ant's optional components. Action: Check that the appropriate optional JAR exists in -ANT_HOME/lib ant-commonsnet.jar is clearly available to Ant: $

Cryptic jetty-maven-plugin error message 'ERROR: PWC6117: File “null” not found'

风流意气都作罢 提交于 2019-12-01 05:18:38
问题 I have a Maven Webapp producing a WAR file. I've just upgraded my Jetty plugin to the 7.4.2.v20110526 (from 6.x). I have the following set up: <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>7.4.2.v20110526</version> <executions> <execution> <id>jetty-run</id> <phase>package</phase> <goals> <goal>run</goal> </goals> <configuration> <connectors> <connector implementation="${connector}"> <port>80</port> <maxIdleTime>60000</maxIdleTime> <

How to skip lifecycle phase in multi maven module

↘锁芯ラ 提交于 2019-12-01 05:13:45
I have a maven multi module project which call two sub modules. please note that this child module do not use the parent markup tag. Now I need to have the deploy phase executed only on one child module but not the other one. Could someone provide any advice on the best way of doing this ? Thanks Raghuram As mentioned in this FAQ for maven deploy plugin , as well as in this SO discussion, you should add the following in the pom of the module you do not want to deploy. <plugin> <artifactId>maven-deploy-plugin</artifactId> <version>X.Y</version> <configuration> <skip>true</skip> </configuration>

Maven profiles - dev vs production

拜拜、爱过 提交于 2019-12-01 04:37:12
问题 I was curious about how to set up development vs production maven profiles. Should I only put the snapshots repo in the dev profile, and the other artifacts (local repo, for releases etc), in the production profile? What are the major things which different profiles of these types? 回答1: The major difference is, obviously, settings among Prod, Test, and Dev profiles. Things like Database connectivity Properties like resource settings, thread-pool configuration, log file location and it's size

Maven: Multiple class with the same path implemented in different jar

99封情书 提交于 2019-12-01 04:27:13
I'm running into trouble with having multiple class with the same path (i.e. same name, same package!!!). For some reason, gwt-dev comes with its own version of org.apache.xerces.jaxp.DocumentBuilderFactoryImpl and javax.xml.parsers.DocumentBuilderFactory . At the same time, spring also depends on these classes but from different jar. I don't know what should be, but look like xalan & xml-api are the two dependencies that spring depends on (these dependency are optional) Funny thing is that eclipse can run the same code (it's a unit test) without problem, but surefire cannot. So I guess the

How do I disable maven build when using Maven 2.0 integration for eclipse?

梦想的初衷 提交于 2019-12-01 04:19:14
问题 How do I stop the "Maven 2.0 integration" plugin from running maven build, while keeping "build automatically" checked? I'm pretty sure it used to be some check box to disable maven build before, but after upgrading Ubuntu; eclipse seems to have been updated in the process, and now I cannot find any way to turn off the maven build. The maven build takes literally minutes (about 5 minutes or so), while just running java build used to finish in seconds. Is it no longer possible to disable it or

Maven offline - problem with mvn-plugins

六眼飞鱼酱① 提交于 2019-12-01 04:09:51
问题 I'm using maven in my project and I need to run the build in a non-internet-access machine. When I test my project build everything is working, but when I run the build in a future moment , the maven try to update the mvn-plugins and this sh t* is broking my build. My config file: settings.xml from mvn. <profile> <id>blaProfile</id> <repositories> <repository> <id>blaRepo</id> <url>file://${bla.3rdParty.home}/maven/.m2/repository</url> <layout>default</layout> </repository> </repositories>

How to bind a plugin goal to another plugin goal

≯℡__Kan透↙ 提交于 2019-12-01 04:03:34
In my current project we use some plugins needed by other plugins parameters like properties-maven-plugin or buildnumber-plugin. <?xml version="1.0"?> <project> <modelVersion>4.0.0</modelVersion> <groupId>mygroup</groupId> <artifactId>myartifact</artifactId> <packaging>pom</packaging> <version>v0</version> <name>myProject</name> <properties> <env>dev</env> </properties> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>properties-maven-plugin</artifactId> <version>1.0-alpha-2</version> <configuration> <files> <file>${basedir}/configurations/${env}.properties</file> <