maven-2

Child not finding parent pom in flat structured multi module maven build

依然范特西╮ 提交于 2019-12-01 15:22:03
问题 I'm setting up a multi module project with a flat structure, i.e. parent and child are in the same base directory. Parent is defined as <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>company</groupId> <artifactId>parent</artifactId> <packaging>pom</packaging> <version>1-0-SNAPSHOT</version> <name

Execute build.xml with Maven

南楼画角 提交于 2019-12-01 15:11:52
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? 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</groupId> <artifactId>maven-antrun-plugin</artifactId> <configuration> <tasks> <taskdef resource="net/sf

Maven does not copy non-java files

南楼画角 提交于 2019-12-01 14:32:50
问题 I have a pom.xml file with the following: <sourceDirectory>${basedir}/src/main/test</sourceDirectory> <outputDirectory>${basedir}/src/main/bin </outputDirectory> Inside ${basedir}/src/main/test I have some folders which do not contain any .java files. When I start a compilation they are not copied to ${basedir}/src/main/bin directory. Only .java files are moved (after compilation of course) and stored on the right folder. Can someone help me to solve this problem without using any plugin ? I

Quickly debug Flex/Java web application from Eclipse?

拈花ヽ惹草 提交于 2019-12-01 14:32:09
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 debug configuration without going through Maven. Currently the output folder for my Flex client module

Maven confused about JRE been used

老子叫甜甜 提交于 2019-12-01 14:16:38
问题 I've created a project in eclipse and added maven dependencies. In Eclipse, it says that I am using JRE 1.5. Everything works fine in Eclipse, for instance, I can run my tests. When I try to run mvn clean install from the terminal, it gives me the following error. ...generics are not supported in -source 1.3 (use -source 5 or higher to enable generics)... Its seems that Maven thinks I'm using JRE 1.3 and cannot recognize generics or for-each loops. How can I: Validate my assumption that maven

Can maven run commandline instructions?

佐手、 提交于 2019-12-01 13:50:53
问题 Can we bind some native OS commands to the maven goals and/or phases? 回答1: Actually there is the Exec Maven Plugin for these cases. 回答2: See exec-maven-plugin for details 回答3: Not natively. However, by using the AntRun plugin, you can specify an Ant task (using Exec) that execute a OS command during the build. <project> ... <build> <plugins> <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <phase> <!-- a lifecycle phase --> </phase> <configuration> <tasks> <!--

send a mail from java5 and java6

孤人 提交于 2019-12-01 13:10:34
I know similar questions have been asked many times befor, but I think this one slitly different :) I'm writing a maven report plugin which will send emails to a list of users. I now have the problem, that the code seems to be working fine when I run it with java5, but failes with java6. Actualy the plugin is writen in Groovy and uses the commons-email utilities to send a html message: HtmlEmail email = new HtmlEmail(); email.setHostName(mailhost); email.setSmtpPort(mailport); email.setFrom(args.from); email.addTo(args.receiver); email.setSubject(args.subject); email.setHtmlMsg(args

Jetty runs correctly via maven, but incorrectly as a jar

谁都会走 提交于 2019-12-01 12:27:36
(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 with "mvn jetty:run-exploded") The main page loads as it should, but when I click one of the navigation

send a mail from java5 and java6

陌路散爱 提交于 2019-12-01 12:20:24
问题 I know similar questions have been asked many times befor, but I think this one slitly different :) I'm writing a maven report plugin which will send emails to a list of users. I now have the problem, that the code seems to be working fine when I run it with java5, but failes with java6. Actualy the plugin is writen in Groovy and uses the commons-email utilities to send a html message: HtmlEmail email = new HtmlEmail(); email.setHostName(mailhost); email.setSmtpPort(mailport); email.setFrom

Managing maven dependancies - New Versions and Non-Repo libraries

一世执手 提交于 2019-12-01 12:17:50
Warning : I have just picked up Maven, so things mentioned might be wrong or not best practice. I have a medium size open source project that I am migrating to Maven from the basic NetBeans project management. This is not a developer team sharing the same room, this is 1-5 people over the internet sharing a SVN repo. Reading over the how-tos on dependencies, it seems that the only way to get dependencies is to get them from an online repo or install them locally. This is not what I was looking for. I want to keep all dependencies in the SVN for many reasons including portability (anybody can