maven-2

Where is the “Maven->Update project configuration” menu item?

…衆ロ難τιáo~ 提交于 2019-12-19 19:43:31
问题 I am having a Missing Maven dependencies in Eclipse project exactly as described in this question, and I would love to use the solution found, but when I right-click my project in Project Explorer I can't find any such menu item: If I right-click the project's pom.xml , all I see in the Maven's menu is: Any idea what I should be doing to enable that Update project configuration menu option? 回答1: Righ click on the project: >Configure>Convert to Maven project And then you can Update project

Writing a Maven Plugin/Mojo: how do you make a goal force the execution of other goals?

风流意气都作罢 提交于 2019-12-19 18:25:18
问题 Note: this thread is about writing a custom Mojo, not using a plugin. I maintain a testing plugin for Maven. Unfortunately, for almost a year now, I've let this particular unknown linger and I'd really like to know how to deal with it so that its users can have a simpler configuration. Let's say we have two goals in our plugin: prepare (phase: generate-sources) do (phase: compile) I want to configure the do Mojo to require prepare to have been executed in the earlier phase of the build.

How to specify JVM argument for Maven built executable JAR

旧巷老猫 提交于 2019-12-19 17:14:24
问题 When using Maven to build an executable JAR, how do I specify the JVM arguments that are used when the JAR is executed? I can specify the main class using <mainClass> . I suspect there's a similar attribute for JVM arguments. Specially I need to specify the maximum memory (example -Xmx500m). Here's my assembly plugin: <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <archive>

Execute build.xml with Maven

蓝咒 提交于 2019-12-19 12:51:46
问题 Is it possible to execute build.xml script with Maven? This script checksout all my projects and subprojects and I've just got used to using maven, didn't really use much of an ant before and I know ant can be used with Maven. So my question is: how? 回答1: I'm really not a big fan of this approach (either use Ant, or Maven, but not a bastard mix) but you can use an external build.xml with the Maven AntRun Plugin: <project> ... <build> <plugins> ... <plugin> <groupId>org.apache.maven.plugins<

Quickly debug Flex/Java web application from Eclipse?

时间秒杀一切 提交于 2019-12-19 11:53:07
问题 I have a Flex/Java web application that uses Maven as a build tool. Currently, if I want to debug the entire application I use Maven to create the WAR file and use the cargo plugin to deploy the WAR file and start up the app server. I then launch an Eclipse (with Flash Builder 4) Flex "Web Application" debug configuration and start debugging. It all works very well, but I am looking for a way to make this faster. I'd like to be able to edit my Flex code and immediately launch my Flash Builder

Reliably finding annotations on class loaded with URLClassLoader

风流意气都作罢 提交于 2019-12-19 11:40:09
问题 I have a code generator that uses URLClassLoader to load classes on a specified path, scan them for annotations, and then using Reflection on the fields/methods, generate DTOs. It works great, in the test app. When I put it into the Maven MOJO, I suddenly lose the ability to see the javax.persistence.Entity annotations on the classes. It loads them, it can see all the fields, but the Entity annotation is no longer visible. I am assuming this is something to do with Classpath issues - is it?

Jetty runs correctly via maven, but incorrectly as a jar

谁说胖子不能爱 提交于 2019-12-19 11:23:10
问题 (If my title is misleading/incorrect please suggest something more descriptive, that the best I could think of) I've created my own web app using spring roo and have yet to edit any of the code. I am building and running the web app with maven and jetty. When I execute the following everything works fine. mvn jetty:run However when I package and then run the jar directly, I come across some strange problems. mvn package java -jar target/dependency/jetty-runner.jar target/*.war (Same thing

How to start application in command line with Maven

夙愿已清 提交于 2019-12-19 10:42:50
问题 I want to run Android application in command line after execution android:deploy maven goal Does Maven have some command which can run application after install ? 回答1: Thanks mschonaker I found the complete solution for Maven First you need to add plugin in your POM <plugin> <artifactId>exec-maven-plugin</artifactId> <groupId>org.codehaus.mojo</groupId> <configuration> <executable>${basedir}/scripts/run_app.sh</executable> </configuration> </plugin> add script in ${basedir}/scripts/ dir with

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

為{幸葍}努か 提交于 2019-12-19 08:57:17
问题 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>

maven eclipse checkstyle plugin

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-19 08:13:19
问题 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