maven-plugin

How to deploy only zip artifacts in maven

风格不统一 提交于 2019-12-04 04:54:06
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.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion>

MojoExecutionException: Maven with Android

╄→尐↘猪︶ㄣ 提交于 2019-12-04 04:37:21
I'm using Android Studio with Maven 3.1.1 and in the package goal it crashes with a MojoExecutionException. I have readed lot of posts but I can't get the solution. [ERROR] Error when generating sources. org.apache.maven.plugin.MojoExecutionException: at com.jayway.maven.plugins.android.phase01generatesources.GenerateSourcesMojo.generateR(GenerateSourcesMojo.java:593) at com.jayway.maven.plugins.android.phase01generatesources.GenerateSourcesMojo.execute(GenerateSourcesMojo.java:216) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106) at org

android maven plugin does not get ANDROID_HOME env variable in Eclipse

老子叫甜甜 提交于 2019-12-04 03:09:58
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 ANDROID_HOME -> [Help 1]" if i hardcode my android_home path into pom.xml,it works fine but we use git

Ignoring report generation for specific classes in cobertura maven plugin

混江龙づ霸主 提交于 2019-12-04 02:25:25
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 know is it possible, and if yes, then what are the changes I need to get done in pom.xml. pom.xml <report

How does Maven resolve plugin versions?

大城市里の小女人 提交于 2019-12-04 02:13:21
I'm reading the docs and still confused as to how Maven is deciding which versions of plugins to download. For example, consider this simple scenario: an empty local repository a default settings.xml run a simple maven command. for example, mvn archetype:generate for the maven-archetype-quickstart as described in the Maven in 5 Minutes doc. After running the command, the first thing Maven does is download a bunch of plugins. Some of the plugins Maven is downloading include: maven-clean-plugin-2.4.1 maven-install-plugin-2.3.1 maven-deploy-plugin-2.5 Why those versions? The most recent version

Retrieving Maven Artifact from Repository using Maven Java API

ε祈祈猫儿з 提交于 2019-12-04 01:13:31
问题 If I have a Maven Artifact information (GroupId, ArtifactId, Version) how can I programmatically (using Java) retrieve that Artifact from my local repository? Specifically, I need to be able to connect to the Maven Repository and create/retrieve a org.apache.maven.artifact.Artifact so I can retrieve the file associated with the Artifact. I have looked into m2e source code, but the MavenImpl.java (which provides Artifact resolution) is way more complex than what I need and it is difficult to

How to bind a plugin goal to another plugin goal

早过忘川 提交于 2019-12-04 01:00:33
问题 In my current project we use some plugins needed by other plugins parameters like properties-maven-plugin or buildnumber-plugin. <?xml version="1.0"?> <project> <modelVersion>4.0.0</modelVersion> <groupId>mygroup</groupId> <artifactId>myartifact</artifactId> <packaging>pom</packaging> <version>v0</version> <name>myProject</name> <properties> <env>dev</env> </properties> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>properties-maven-plugin</artifactId> <version>1

Missing Maven Plugin Jetty

旧城冷巷雨未停 提交于 2019-12-03 23:25:56
I am having trouble folowing this http://hrycan.com/2012/03/28/primefaces-lazy-loading-datatable-for-jsf2/ It says I should just run mvn jetty:run but I keep on encountering this error. org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'jetty' in the current project and in the plugin groups [org.apache.m aven.plugins, org.codehaus.mojo] available from the repositories [local (C:\MyRepo), central (http://repo1.maven.org/maven2)] at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.r I used Maven 3 here. Any thoughts? ADD: From the link,

mvn deploy:file to different repositories for snapshot and release version

╄→гoц情女王★ 提交于 2019-12-03 22:23:46
Is it possible to in some way tell the maven deploy:file goal to deploy to two independent artifactories based on whether the version of the project is a snapshot / release? I'm hoping there might be a property which indicates the fact the version has -SNAPSHOT prepended, or perhaps the default artifactory to deploy to (which has been worked out based on the version number already). I thought about using two different profiles and working out if its a snapshot in ant by parsing the pom.xml file, but I'd rather a cleaner solution if possible. Currently, my deploy plugin looks as follows, but

Add Maven generated site to generated package

左心房为你撑大大i 提交于 2019-12-03 21:13:19
In order to deliver an all-in-one Jar for our project, we are wondering if it is possible to include the project's generated site (generated via the site plugin) into the generated project's package? The idea behind this is very simple, we have a project named "sample" that demonstrates the usage of our API and we want to give the user documentation on the API and its usage in a single bundle. Is it possible using Maven to create such a Jar? Thanks in advance! Using site:jar and then the assembly plugin to create a bundle of everthing should be possible. I'm posting here to document a solution