maven-plugin

How to use Aether (eclipse) in Maven Plugins using API 3.1.1?

橙三吉。 提交于 2019-12-06 04:07:10
I am developing a new Maven plugin using API v3.1.1 because I need to upgrade to Maven 3.1.1, and need the Aether way of dealing with artifact repositories, among other things retrieving the complete list of artifact versions. I am using Eclipse Aether (0.9.0.M4), NOT Sonatype Aether. I have already read through http://wiki.eclipse.org/Aether and tried the demos http://git.eclipse.org/c/aether/aether-demo.git/tree/ , but I have not been able to understand why the following within a subclass of AbstractMojo doesn't work. Both RepositorySystem repoSystem , RepositorySystemSession repoSession ,

Test Maven plugin with maven-plugin-testing-harness

蓝咒 提交于 2019-12-06 03:06:11
I want to develop a Maven plugin and also test it properly. I was reading the documentation on maven-plugin-testing-harness and trying things out for a few hours already. I'm constantly running into NoClassDefFoundError and NoSuchMethodError , I just can't figure out which dependencies I need. Here's my MCVE: https://github.com/highsource/hello-maven-plugin Right now I'm getting: java.lang.NoClassDefFoundError: org/apache/maven/plugin/descriptor/PluginDescriptorBuilder at org.apache.maven.plugin.testing.AbstractMojoTestCase.setUp(AbstractMojoTestCase.java:161) at junit.framework.TestCase

Which Eclipse wtp version should I use for maven?

[亡魂溺海] 提交于 2019-12-06 02:55:42
I receive this error when I try to run the maven goal - mvn eclipse:eclipse -Dwtpversion=3.3.1 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-eclipse-plugin:2.8 :eclipse (default-cli) on project conference-web: Unsupported WTP version: 3.3.1 . This plugin currently supports only the following versions: 1.0 1.5 2.0 R7 non e. -> [Help 1] [ERROR] Will using version 2.0 suffice ? But should'nt the goal run successfully ? <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <configuration> <wtpmanifest>true</wtpmanifest> <wtpapplicationxml>true<

How to use custom annotation processor with Maven 2?

一世执手 提交于 2019-12-06 01:46:08
问题 In our enterprise application we are seeking a dynamic way to collect data from our Java classes. We created a custom annotation interface ( @interface ) with a name property. We would like to collect the value of this property from all annotated classes. I managed to create an AnnotationProcessorFactory and an AnnotationProcessor for the custom annotation. Since we are using Maven 2, I added the following to the plugins in the pom.xml of the main project. <plugin> <groupId>org.codehaus.mojo<

How do I override a Maven Plugin's log4j Configuration?

对着背影说爱祢 提交于 2019-12-06 01:37:29
问题 I'm using the Cargo Maven plugin to deploy a WAR to a remote server, and I'm having problems. I'll probably create a second question for that problem, but this one is about overriding a Maven plugin's log4j configuration. Cargo uses JBoss' client libraries to ship stuff to JBoss servers (which I'm trying to do.) The JBoss library uses log4j. Cargo doesn't set up any sort of mapping layer that I know of. So, essentially, log messages are occurring in the dependent library of a Maven plugin. I

How to deploy only zip artifacts in maven

依然范特西╮ 提交于 2019-12-06 01:31:39
问题 I have done some zip packaging in maven using the below descriptor and pom file. But in maven by default it created both jar and zip in target folder. Now i want to deploy only zip contents where i am using deploy:deploy-file plugin. but it is not deploying instead it is showing error. Not sure what is wrong with tag and how it should be resolved. Pom file: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven

Automatic update of generated css files via m2e

江枫思渺然 提交于 2019-12-06 00:56:06
问题 I'm using the lesscss-maven-plugin to generate different css files to the target directory ( target\generated-sources ) and then use maven-war-plugin to add this directory as an webResouce. Those files will generate perfectly fine. However the m2e-plugin (version 1.0.0) won't copy those files in the according web-resources folder ( m2e-wtp\web-resources ), when they have changed . Only when I run a eclipse "maven/update project" changes will be updated. But I want the changes to take affect

Maven2 Multiproject Cobertura Reporting Problems During mvn site Build

自古美人都是妖i 提交于 2019-12-06 00:26:07
We've got a multiproject we're trying to run Cobertura test coverage reports on as part of our mvn site build. I can get Cobertura to run on the child projects, but it erroneously reports 0% coverage, even though the reports still highlight the lines of code that were hit by the unit tests. We are using mvn 2.0.8. I have tried running mvn clean site , mvn clean site:stage and mvn clean package site . I know the tests are running, they show up in the surefire reports (both the txt/xml and site reports). Am I missing something in the configuration? Does Cobertura not work right with

Selenium remoteWebDriver : connection to selenium-standalone-server fail (driver version unknown)

删除回忆录丶 提交于 2019-12-06 00:06:14
问题 I received an exception after trying to setup a connection to selenium-server-standalone by using remoteWebDriver in an application test written in Java. The issue is related the usage of remoteWebDriver starting selenium-server-standalone (with Xvfb) by using maven (because by running manually by a different session Xvfb and then selenium-server stand alone the application test is working). The environment is composed by RH Linux R4.1.x , Selenium 2.1, firefox 3.6. Both selenium-server

Writing a maven custom report plugin; how do I generate the html body or “middle” of my report?

守給你的承諾、 提交于 2019-12-05 22:06:01
I am attempting to create an custom maven report to generate when I run the mvn site goal in my project. I have followed the instructions here: http://docs.codehaus.org/display/MAVENUSER/Write+your+own+report+plugin Specifically I have created a mojo that implements the appropriate methods, and its "executeReport(...) method is called when I run mvn site. I have also implemented a class that extends AbstractMavenReportRenderer, and filled out the renderBody(...) method with some calls to the methods in the sink. My Mojo returns a new instance of that custom renderer in its "getRenderer()"