maven-2

404 Not Found Error in a simple Jetty/Maven Hello World webapp

点点圈 提交于 2019-12-22 04:09:37
问题 I have followed the instructions to create a "Standard WebApp with Jetty and Maven" precisely as described on the eclipse wiki: http://wiki.eclipse.org/Jetty/Tutorial/Jetty_and_Maven_HelloWorld#Developing_a_Standard_WebApp_with_Jetty_and_Maven However when I run the webapp (mvn jetty:run) and go to localhost:8080/hello-world/hello I end up at a "HTTP ERROR 404 Problem accessing /hello-world/hello. Reason: Not Found". I have read through documentation, looked at the wiki page's history, poked

Maven: how to pass parameters between Mojos?

坚强是说给别人听的谎言 提交于 2019-12-22 04:08:02
问题 How do I program one Mojo to set another Mojo's configuration? For example: Mojo A requires configuration parameter A.foo to be defined. A user can either specify A.foo manually or run plugin B which will calculate the value for him/her. 回答1: Answering my own question: It's possible to access a plugin's configuration or project-wide properties at runtime using a MavenProject instance: /** * The maven project. * * @parameter expression="${project}" * @readonly */ private MavenProject project;

include source code while exporting a jar using maven

百般思念 提交于 2019-12-22 04:04:46
问题 I want to export a jar file using maven which can have the source included in it. I tried using 'maven-source-plugin', but it creates a separate jar file with source. Is there any way that I can export a jar file using maven like a normal eclipse export with source? 回答1: You can do it with resource section, see example: <build> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.java</include> <include>**/*.gwt.xml</include> </includes> </resource> </resources

Maven site deploy using ftp

北城余情 提交于 2019-12-22 04:03:10
问题 I am using Maven2 and would like to deploy my generated site to a web server using ftp. i tried to use: <distributionManagement> <site> <id>website</id> <url>ftp://host/pub/</url> </site> </distributionManagement> the problem is that get an error that ftp is not supported. could it be that this basic feature doesn't work. Thanks, Ronen. 回答1: As I misinterpreted your intention the first time. Here the right solution: Deploy site via ftp-server <project> [...] <distributionManagement>

How to debug android application built with maven

安稳与你 提交于 2019-12-22 03:52:24
问题 I'm currently trying to debug android application on my device from eclipse. Device has been added I can see it both in console and in eclipse. Console (Windows) : adb devices List of devices attached 0019cca27f2e6e device And the eclipse : I can run the app without any issues on both device/simulator. I just do clean install and android:deploy followed by android:run and works like a charm. But I can't figure out yet how to debug it. But when I actually run the app on the device(Samsung

Setting Maven Java compiler debug to false does not remove line number table?

折月煮酒 提交于 2019-12-22 01:27:51
问题 Perhaps this is my lack of understanding, but I would have assumed that doing this in a Maven Java project would disable all debug info from going into the Class file: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <debug>false</debug> </configuration> </plugin> However, I just tested it and while the local variable table is gone, and the source file reference is gone, the line number table is still present. I did a javap -l

Where is Cargo generating context XML for Jetty 6.x?

若如初见. 提交于 2019-12-22 00:49:30
问题 I am trying to implement the solution mentioned in How to specify jetty-env.xml file for Maven Cargo plugin for Jetty? However I am facing something even more fundamental: My Cargo is simply not generating any context xml. <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <version>1.2.1</version> <configuration> <!-- Container configuration --> <container> <containerId>jetty6x</containerId> <type>embedded</type> </container> <!-- Configuration to use

Virus scanning in build process

萝らか妹 提交于 2019-12-21 22:36:24
问题 I would like to incorporate scanning for viruses into a Java/Maven/Hudson build process. Unfortunately, i could not find any resources on dedicated tools for this kind of build step. My build environment is Linux-based. My question is: How can antivirus scanning be incorporated into a Maven and Hudson based build process? What are the best-practices? Should the scanning step be separate of the normal build, e.g. a pre-build step or even a separate build job? Should the scanning occur at a

New at Maven: Using the shade plugin and 3rd party jars

 ̄綄美尐妖づ 提交于 2019-12-21 21:44:06
问题 This should be pretty simple, but I can't the around to it. I need to create an uberjar using 3rd party jars. I've already followed these instructions: Including a non-Mavenized dependency so it works with maven-shade-plugin and added them to the local repository. But now what? Every Maven tutorial/example is kinda shady (pun intended) and I just don't know how to edit the .pom file properly in order to make it work. Besides, I'm confused about the shade "plugin" overall. I mean, I followed

How to get Jenkins to --fail-fast on Maven 2 builds?

别等时光非礼了梦想. 提交于 2019-12-21 20:33:11
问题 I am trying to build a multi-module Maven project using Jenkins. When I build the same project on the command-line using the same environment (variables/settings.xml/user) as Jenkins does, test failures cause the build to fail immediately: Failed tests: testSomething(com.package_name.TestSomethingOrTheOther) Tests run: .., Failures: 1, Errors: 0, Skipped: 0 [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ----------------------------