maven-2

Set up Eclipse to work with Java EE

别来无恙 提交于 2019-12-01 06:52:46
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 plugin for Eclipse) and all the classes from dependencies show warnings in the code. Like this: How do I

Maven annotation processing with maven-compiler-plugin

我们两清 提交于 2019-12-01 06:39:18
问题 I try to compile my code that contains annotations that generate source code. I use the maven-compiler-plugin and build-helper-maven-plugin . My POM is looking like that: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.2</version> <configuration> <source>1.6</source> <target>1.6</target> <generatedSourcesDirectory>${project.build.directory}/generated-sources/apt</generatedSourcesDirectory> </configuration> </plugin> <plugin>

Can I invoke QTP test suits automatically from Maven/Hudson?

情到浓时终转凉″ 提交于 2019-12-01 06:39:11
问题 We need to integrate QTP with Hudson to automatically invoke test suites against the code deployed in Hudson. The build process is based on Maven. Is there any plugin or something to achieve this? We heard about the Groovy plugin for Hudson; Can we execute it with a Groovy script? 回答1: Hudson does not run tests, it takes the output and generates a nice report. You should look at how to make Maven run the tests, and then have Hudson pick up the output to generate a report. 回答2: As Michael says

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

前提是你 提交于 2019-12-01 06:33:24
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> </connector> </connectors> <webAppConfig> <contextPath>/foo</contextPath> </webAppConfig> <webappDirectory>$

Maven: Set the settings.xml location in the pom.xml?

杀马特。学长 韩版系。学妹 提交于 2019-12-01 06:33:02
Is it possible to set the location of the settings.xml file inside the pom.xml file. I know you can do it from the command line typing mvn -s location/of/settings.xml , but I wanted to know if I can set that within the pom.xml so I don't have to keep typing through command line. No. And that's probably a horrible idea, from a security standpoint. It'd allow the creator of a pom to bypass all your settings.xml settings. If you do the mvn -s location/of/settings.xml you will at least know it happened. But if you just randomly build a project, who knows how malicious that project's creator was.

Maven: How to install a plugin in offline mode

泪湿孤枕 提交于 2019-12-01 06:27:50
I'm sitting behind a firewall and therefore maven can't connect to central repositories (error message is given below). However, I can connect to the internet via HTTP. How can I install a maven plugin (e. g. archetype) in offline mode (i. e. download some file in a browser and then install the plugin by executing some commands) ? Thanks in advance Dmitri P. S.: Here is the error message: E:\>mvn archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-clean -DarchetypeVersion=LATEST -DgroupI d=at.swdev -DartifactId=pcc -Dversion=1.0 -Dpackaging=war [INFO]

gwt-maven-plugin: How to set system properties for the gwt:run goal in the pom.xml?

一世执手 提交于 2019-12-01 06:15:48
I'm trying to set a system property on a GWT application running in hosted mode launched using mvn gwt:run . The property isn't getting set, by the looks of things. In my pom.xml the plugin configuration is: - <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>gwt-maven-plugin</artifactId> <version>2.2.0</version> <executions> <execution> <configuration> <module>com.foo</module> </configuration> <goals> <goal>compile</goal> <goal>test</goal> </goals> </execution> </executions> <configuration> <runTarget>index.html</runTarget> <hostedWebapp>${webappDirectory}</hostedWebapp>

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

妖精的绣舞 提交于 2019-12-01 06:05:51
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 have they just hidden it well? If it's not possible, will eclipse be able to compile my maven project

Maven offline - problem with mvn-plugins

妖精的绣舞 提交于 2019-12-01 05:57:19
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> <pluginRepositories> <pluginRepository> <id>blaRepo</id> <url>file://${bla.3rdParty.home}/maven/.m2

maven eclipse checkstyle plugin

我与影子孤独终老i 提交于 2019-12-01 05:53:13
I have custom checkstyle checks file (called checks.xml), and I'm trying to use that same file in both maven and eclipse. It all works well, except for the SuppressionFilter . In this checks.xml file, I have <module name="SuppressionFilter"> <property name="file" value="src/main/resources/checkstyle/checkstyle-suppressions.xml"/> </module> This works when I run through maven. However, when I run through eclipse, I need to change the config to be <module name="SuppressionFilter"> <property name="file" value="${basedir}/src/main/resources/checkstyle/checkstyle-suppressions.xml"/> </module> If I