maven-plugin

Custom Maven packaging, transitive dependencies aren't included

时光毁灭记忆、已成空白 提交于 2019-12-12 09:36:45
问题 I'm playing around with a custom Maven 3 packaging plugin for some non-java artifacts, and having an issue getting transitive dependencies to work. I've got three projects defined, model , model-impl , and cli , with dependencies like this: cli model-impl model My custom lifecycle plugins are being called in each project, and I can successfully build model and model-impl . For each of those projects, the expected artifacts are being stored in my local repository. cli however is failing

android maven plugin does not get ANDROID_HOME env variable in Eclipse

穿精又带淫゛_ 提交于 2019-12-12 08:25:29
问题 i'm working on an Android app project and it is a Maven project. when i try to run as "maven install" this is what i get: "Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.1.1:generate-sources (default-generate-sources) on project android-client: No Android SDK path could be found. You may configure it in the plugin configuration section in the pom file using ... or ... or on command-line using -Dandroid.sdk.path=... or by setting environment variable

Ignoring report generation for specific classes in cobertura maven plugin

谁都会走 提交于 2019-12-12 08:25:21
问题 I've been using Cobertura plugin for report generation and instrumentation (with surefire). Here is the issue I am facing: I am unable to make the plugin ignore report generation for specific classes in my project. PF below the related excerpt from pom.xml, I have added the ignore tag, but that just ignores instrumentation for the ignored classes. I want the report for specific projects to not be generated at all. Firstly, due to my limited knowledge of both Maven and Conberture, I want to

Organize imports with Maven2, Eclipse-style?

柔情痞子 提交于 2019-12-12 07:39:20
问题 I'm a lone Emacs user in a group that's hung up on Eclipse. Time and again, code diffs are made larger by imports that have been "organized" or "cleaned up" by Eclipse. I don't have a strong opinion on the subject of import style in Java, but I do want to minimize our diffs. What can I do? We use Maven2 for builds; is there a plugin that can help me? Can a piece of Eclipse be abstracted out & turned into a Maven plugin? I currently use ImportScrubber and have encountered a few other stand

Maven: Overview for the values of Maven properties

最后都变了- 提交于 2019-12-12 07:09:20
问题 I would like to find out the values of all Maven properties as they apply to some Maven project. mvn help:system lists OS environment variables and JVM system properties, but no Maven properties. mvn help:evaluate only works in an interactive mode, that means I have to type a single Maven property, (e.g. ${project.build.outputDirectory} ) to get the value of that property. I'm looking for a way get a full list of all Maven properties and their values. 回答1: As a workaround, add this to the

How to redeploy artifact with liberty-maven-plugin?

馋奶兔 提交于 2019-12-12 06:36:09
问题 I have IBM Liberty server running on my machine and want to redeploy my WAR using corresponding maven plugin. The documentation says that there are goals like deploy , undeploy , install-apps . Currently I am using <plugin> <groupId>com.ibm.websphere.wlp.maven.plugins</groupId> <artifactId>liberty-maven-plugin</artifactId> <version>1.1</version> <executions> <execution> <id>install-apps</id> <phase>install</phase> <goals> <goal>install-apps</goal> </goals> </execution> </executions>

Maven Release Plugin Issue - Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.3.2:prepare

百般思念 提交于 2019-12-12 05:06:01
问题 Struggling to maven:release this project. Looks like a version incompatibility issue, but I'm not sure how to rectify this issue. I'm using Maven version 3.1.1. Here's my pom.xml (sample) <build> <defaultGoal>install</defaultGoal> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.0.2</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins> </build> <reporting> <plugins>

MavenResourcesExecution How to Get as Variable Instead of Writing to A File?

╄→гoц情女王★ 提交于 2019-12-12 03:45:04
问题 I use that at my plugin: MavenResourcesExecution mavenResourcesExecution = new MavenResourcesExecution(resources, outputFileDirectory, project, encoding, buildFilters, Collections.<String>emptyList(), session); try { mavenResourcesFiltering.filterResources(mavenResourcesExecution); } catch (MavenFilteringException e) { e.printStackTrace(); } and it writes everyting into a file however I want to retrieve it as a variable instead of writing it into a file. How can I do it? 回答1: I have

Understanding the common Maven plugin code format

冷暖自知 提交于 2019-12-12 03:30:17
问题 Browsing the maven-plugin source code (for example 'clean-plugin'), I came across verify.bsh file, which has contents as import java.io.*; import java.util.*; import java.util.jar.*; import java.util.regex.*; try { File targetDir = new File( basedir, "target" ); System.out.println( "Checking for absence of " + targetDir ); if ( targetDir.exists() ) { System.out.println( "FAILURE!" ); return false; } } catch( Throwable t ) { t.printStackTrace(); return false; } return true; I would like to

Injecting a dependency via a maven plugin

放肆的年华 提交于 2019-12-12 03:29:31
问题 I have a system that accepts plugins to let users add functionality to a management system. The plugin is basically just a zip file with in a certain format (ie file x in this dir, y in that dir). Currently I use the maven-assembly-plugin plugin to make the zip. The problem is that it is awkward to keep all my plugins in sync and to let others make a plugin since they need the correct assembly.xml Therefore I've been trying to make a custom packaging type so developers can make a plugin like