maven-2

Strange Maven out of memory error

跟風遠走 提交于 2019-12-09 13:09:33
问题 I am currently trying to build my project using hudson to call maven. I keep getting the problem of out of memoery error. I set the xmx and xms in all environmental variable, hudson configuration and hudson project config. I set the xmx to 1500 mb which should be more than enough as the whole project is less than 1000mb. the machine used to build the project is a server where the maven repo for the team is stored. Anyone have come acrossed the same problem? Any idea of how it happen? 回答1: If

Creating a web-service client directly from the source

二次信任 提交于 2019-12-09 13:03:27
问题 I am trying to generate the WS client jar directly from the @Webservice class(es). Let's take this example : package com.example.maven.jaxws.helloservice; import javax.jws.WebService; @WebService public class Hello { public String sayHello(String param) { ; return "Hello " + param; } } I can generate a war file and use glassfish to serve this webservice, and from there I can use the glassfish WSDL URL to generate the client sources. What I am trying to do is to skip the glassfish part. From

Has anyone successfully run integration tests with Jboss embedded, Seam and Maven?

て烟熏妆下的殇ゞ 提交于 2019-12-09 12:42:54
问题 Have been trying to get integration testing working with my seam project and the Jboss embedded container but am not having much success. Have been doing a lot of reading and have been trying what is mentioned in this JIRA but am not having any luck. Amy currently just trying to get the 'testproject-master-JBSEAM-2371.zip' project working but am getting the following exception ERROR [org.jboss.embedded.DeploymentScanner] Failed to deploy org.jboss.deployers.spi.DeploymentException: No

How to specify jetty-env.xml file for Maven Cargo plugin for Jetty?

萝らか妹 提交于 2019-12-09 12:41:44
问题 I am migrating from Maven's jetty plugin to the Cargo plugin (cargo-maven2-plugin) because Cargo will happily run WARs from dependent Maven modules. Within out web-app we have taken great pains to externalize all configuration through JNDI. These JNDI definitions are web-app specific and therefore are placed in a jetty-env.xml file that is outside the WAR. Using the Jetty plugin, we specified this file as follows: <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>maven-jetty-plugin<

Including a non-Mavenized dependency so it works with maven-shade-plugin

本秂侑毒 提交于 2019-12-09 12:22:41
问题 I want to include GData Client, which doesn't use Maven, as a dependency into my Maven project. It ships as a bunch of JAR files. Additionaly, I use Maven Shade Plugin to build an executable JAR without any external dependencies (with the default configuration, no renaming/including/excluding/transforming of dependencies). How can I do that? (Just adding the JARs as resources wouldn't work, since the Shade plugin must extract them). 回答1: you want to check the maven docs on installing 3rd

What happened to the “Enable Nested Modules” option in m2-eclipse?

醉酒当歌 提交于 2019-12-09 12:14:18
问题 I contribute to and implement some open source projects that use a Maven2 build system organized into several sub-modules. I've also been an Eclipse user for several years. With these projects, I have historically leveraged the maven-eclipse plugin so that Eclipse can correctly recognise library dependencies in my project. It used to be the case that -- when I set up a new workspace or project -- I would have to right-click select "Enable Dependency Management" followed by right-click "Enable

Run a Ant task in Maven only if a property is set

倾然丶 夕夏残阳落幕 提交于 2019-12-09 11:56:34
问题 My pom.xml is running an Ant task to deploy a file using FTP. However, this deployment must be only done if the -Dftp=true argument is given in the Maven command (i.e. mvn clean install -Dftp=true ). Thus, I wrote the following code: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.2</version> <executions> <execution> <phase>package</phase> <goals> <goal>run</goal> </goals> <configuration> <tasks if="ftp"> <echo

Resolving a Maven dependency differently if the JVM in use is x86 or x64?

岁酱吖の 提交于 2019-12-09 11:42:44
问题 I have a Maven repository set up to host some dlls, but I need my Maven projects to download different dlls depending on whether the JVM in use is x86 or x64. So for example, on a computer running an x86 version of the JVM I need ABC.dll to be downloaded from the repository as a dependency, but on another computer running an x64 version of the JVM, I need it download XYZ.dll instead. How would I go about doing this? An example pom.xml file would be nice. 回答1: This will work on any VM. You can

Maven profile for single module

本小妞迷上赌 提交于 2019-12-09 11:31:01
问题 I have a multi module maven project, which builds successfully, I'd like to build just one of the modules I have. How would I do that with profiles ? I could do it from console in two ways, one way is go to the child module and mvn package or I could use reactor to build just one module. Can I do the same thing with profiles? By modifying POM? Thank you EDIT If is impossible from POM, can I do it from settings.xml ? 回答1: To implement this with profiles, you could use two profiles, one

Maven POM dependencies to ivy.xml file

不打扰是莪最后的温柔 提交于 2019-12-09 10:57:15
问题 Is there a maven plugin which i can use to convert the maven pom dependencies including transitive dependencies to an ivy.xml file? 回答1: Here's an Ant script <project name="convertPomToIvy" basedir="." default="all" xmlns:ivy="antlib:fr.jayasoft.ivy.ant" xmlns:ac="antlib:net.sf.antcontrib"> <path id="antlib.classpath"> <fileset dir="/path/to/ivy/libs" includes="*.jar"/> </path> <taskdef uri="antlib:fr.jayasoft.ivy.ant" resource="fr/jayasoft/ivy/ant/antlib.xml" classpathref="antlib.classpath"