maven-plugin

maven-failsafe-plugin Failures and BUILD SUCCESS?

∥☆過路亽.° 提交于 2019-12-01 15:13:46
I want to use maven-failsafe-plugin to run some integration tests. If any test fails, I want Maven to fail the build and not BUILD SUCCESS. Tests run: 103, Failures: 1, Errors: 0, Skipped: 26 [INFO] BUILD SUCCESS* how can I configure it, that build not success is? My failsafe plugin is configured as: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <version>${failsafe.version}</version> <configuration> <systemProperties> <CI_INTEGRATION_OVERRIDE_PATH>${basedir}/..</CI_INTEGRATION_OVERRIDE_PATH> </systemProperties> <includes> <include>**

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

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

Configure Maven plugins to stick together

旧城冷巷雨未停 提交于 2019-12-01 10:47:56
I have parent pom which configures certain plugins <pluginManagement> </plugins> <plugin> <artifactId>gmaven-plugin</artifactId> ... </plugin> <plugin> <artifactId>maven-resources-plugin</artifactId> ... </plugin> <plugin> <artifactId>cargo-maven2-plugin</artifactId> ... </plugin> </plugins> </pluginManagement> And I have tree of poms which are represent integration tests A-\ a1 a2 B-\ b1 b2 C-\ D-\ d1 d2 In each a,b,d products I do <build> <plugins> <plugin> <artifactId>gmaven-plugin</artifactId> </plugin> <plugin> <artifactId>maven-resources-plugin</artifactId> </plugin> <plugin> <artifactId

Find dependencies of a Maven Dependency object

我的未来我决定 提交于 2019-12-01 10:39:52
I'm writing a Maven 3 plugin that needs to know the transitive dependencies of a given org.apache.maven.model.Dependency . How can I do that? So the following code should give you an impression how to do it. @Mojo( name = "test", requiresDependencyResolution = ResolutionScope.COMPILE, defaultPhase = LifecyclePhase.PACKAGE ...) public class TestMojo extends AbstractMojo { @Parameter( defaultValue = "${project}", readonly = true ) private MavenProject project; public void execute() throws MojoExecutionException, MojoFailureException { List<Dependency> dependencies = project.getDependencies();

How to expand variable into nested directory in maven-archetype

旧巷老猫 提交于 2019-12-01 08:52:06
Suppose I have set groupId to com.example , and artifactId to fancy.project , and now I want to create a archetype, such that when created, expands into the following structure: |--src |--main |--com |--example |-fancy |-project |-App.java That is, I wonder how to expand a variable into a nested directory. I understand that the dual-underscore-wrapped variables will be substituted in file/directory names, but I can only get the following with __groupId__ . |--src |--main |--com.example |-fancy.project |-App.java As input to the archetype you can specify the package option (which would then

Configure Maven plugins to stick together

£可爱£侵袭症+ 提交于 2019-12-01 08:06:02
问题 I have parent pom which configures certain plugins <pluginManagement> </plugins> <plugin> <artifactId>gmaven-plugin</artifactId> ... </plugin> <plugin> <artifactId>maven-resources-plugin</artifactId> ... </plugin> <plugin> <artifactId>cargo-maven2-plugin</artifactId> ... </plugin> </plugins> </pluginManagement> And I have tree of poms which are represent integration tests A-\ a1 a2 B-\ b1 b2 C-\ D-\ d1 d2 In each a,b,d products I do <build> <plugins> <plugin> <artifactId>gmaven-plugin<

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

Set up Eclipse to work with Java EE

非 Y 不嫁゛ 提交于 2019-12-01 05:52:54
问题 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

Maven include another pom for plugin configuration

﹥>﹥吖頭↗ 提交于 2019-12-01 05:27:06
is there a way to include another pom or information in a maven pom ? I have several poms which are basically not related or have different parent poms. Nevertheless for packaging it is required to have a Manifest identical to all projects. So currently I have in a pom: <plugin> <artifactId>maven-assembly-plugin> <!--- .... --> <archive> <manifestEntries> <build-date>....</build-date> <build-nr>.....</build-nr> etc etc I would like to avoid to paste this configuration to all severall poms. So how can I share the configuration of a plugin without inheritance ? Thanks One way to do this is using