maven-plugin

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

人盡茶涼 提交于 2020-01-13 19:02:27
问题 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

converting an eclipse formatter file to a checkstyle file

 ̄綄美尐妖づ 提交于 2020-01-13 08:31:12
问题 I have an eclipse formatting file (which contains some configurations) and i want to make the same thing (these configurations) for a checkstyle file to use after with maven build. 回答1: Unfortunately, there is no way to convert a formatter file to a checkstyle ruleset at the moment. You have to do it the other way around as explained here. Otherwise you have to adjust every setting in your formatter manually for checkstyle. 回答2: The Eclipse-Checkstyle plugin provides an export feature to

Set maven property from plugin

怎甘沉沦 提交于 2020-01-13 07:46:08
问题 I've read some questions here about how to set a property (most of them talked about the version number for an application) from a maven plugin. It seems there's no easy way of doing this and the best solution I found is to have a filter.properties file which is updated from the plugin and used by the main pom file to filter the desired resources. I tried another solution after I read this from the Maven documentation (Maven filter plugin): Variables can be included in your resources. These

Couldn't run build using Maven because of an error in pom.xml

China☆狼群 提交于 2020-01-12 14:40:08
问题 I am trying to build a new Maven project in Eclipse. In my pom.xml, I got an error which says Multiple annotations found at this line: - Missing artifact maven-plugins:maven-findbugs-plugin:plugin:1.3.1 - Missing artifact maven-plugins:maven-cobertura-plugin:plugin:1.3 Here is my dependency code for "cobertura" in pom.xml: <dependency> <groupId>maven-plugins</groupId> <artifactId>maven-cobertura-plugin</artifactId> <version>1.3</version> <type>plugin</type> </dependency> I tried adding

exec-maven-plugin says cannot run specified program, even though it is on the PATH

故事扮演 提交于 2020-01-11 04:39:06
问题 Edit 20140716 : Solution found tl;dr = exec-maven-plugin does not recognise .cmd files, but only .bat files, as executable scripts. Rename grunt.cmd --> grunt.bat , bower.cmd --> bower.bat , etc. as a workaround. Having done npm install -g grunt-cli on my system, grunt is most certainly on the PATH When I run maven install however, this doesn't seem to register. [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (build-spa-bower) on project foobar: Command execution

m2e lifecycle-mapping not found

谁说我不能喝 提交于 2020-01-08 19:42:24
问题 I am trying to use the solution described here to solve the annoying "Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:build-helper-maven-plugin:1.7:add-source (execution: default, phase: generate-sources)" when I place the following plugin on my pom.xml: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> <execution> <phase>generate-sources</phase> <goals><goal>add-source</goal></goals> <configuration>

m2e lifecycle-mapping not found

不羁的心 提交于 2020-01-08 19:40:35
问题 I am trying to use the solution described here to solve the annoying "Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:build-helper-maven-plugin:1.7:add-source (execution: default, phase: generate-sources)" when I place the following plugin on my pom.xml: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> <execution> <phase>generate-sources</phase> <goals><goal>add-source</goal></goals> <configuration>

Intellij IDEA Maven Plugin - Manage Dependencies

試著忘記壹切 提交于 2020-01-07 03:03:09
问题 I'm new to IntelliJ and Maven and tried a bit around. I imported some libraries via the Module & Project Structure Settings in the "Project Structure" window (see screenshot below), because I thought that I have to add my dependencies here. I also thought that this creates the pom.xml with dependency list automatically, but it didn't! I had to add my dependencies via following steps: Open the pom.xml file > Menu "Code" > "Generate" > Popup "Dependency" or by Alt + Insert Project Structure

Maven - custom packaging extension?

試著忘記壹切 提交于 2020-01-06 21:10:56
问题 Is it possible to create a maven plugin, which would package my project using a custom file extension? I know that there's a bunch of pre-defined ones like jar, ear, war etc. but I want my own. I also know how to create my own packaging type (using the components.xml), but I still have to tell it what extension it should use. Do I have to implement my own archiver or something? (basically it will be something like a war but with a different name) 回答1: Well just as I said in the comment above

Write custom maven command set using eclipse plugin

会有一股神秘感。 提交于 2020-01-06 14:40:33
问题 from command line I can write mvn install -Pauto-deploy Is it possible to store this command in my eclipse maven plugin. I want to execute this command by click. I see only standart things in maven menu: build clean install test I want see at this list my_autodeploy_command I am sure it is possible but I don't know how. Can you show how? where can I write mvn install -Pauto-deploy ? Somewhere here? UPDDATE for taringamberini 回答1: The dialog is the correct one. Install, the lifecycle phase to