maven-plugin

how to avoid UTF-8 encoding for binary with maven-resources-plugin?

痴心易碎 提交于 2019-11-27 23:44:35
问题 I'm using the maven-resources-plugin to copy some resources from my project but one of my resources is a binary file. The output says it is Using 'UTF-8' encoding to copy filtered resources which I my problem!!! Here is my plugin configuration. <plugin> <artifactId>maven-resources-plugin</artifactId> <version>2.5</version> <executions> <execution> <id>copy-resources</id> <!-- here the phase you need --> <phase>validate</phase> <goals> <goal>copy-resources</goal> </goals> <configuration>

usage of maven enforcer plugin

人走茶凉 提交于 2019-11-27 21:13:40
问题 I'd like to use the maven enforcer plugin to check to see if I have duplicate classes on my path. I've tried the example from here. But when I run it like so: mvn enforcer:enforce I get this: Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.0.1:enforce (default-cli) on project datapopulator: The parameters 'rules' for goal org.apache.maven.plugins:maven-enforcer-plugin:1.0.1:enforce are missing or invalid Is there a way to use this correctly? EDIT #1 If changing my

Can I set the project version with a buildnumber-maven-plugin?

孤人 提交于 2019-11-27 20:46:18
问题 I'm trying to add the svn.revision to project version as a build number and can't seem to do so. My jar has the correct name durin packaging, but its installed in the my local repository it is as if ${buildNumber} is/was undefined when the version was set. I get foo-1.0.0-SNAPSHOT- ${buildNumber} instead of foo-1.0.0-SNAPSHOT- 304 Any idea what I'm doing wrong or is adding a revision to the project version a bad idea? Thanks for the help. <project> ... <version>1.0.0-${release.identifier}-$

Maven Plugin API: Get MavenProject from Artifact

和自甴很熟 提交于 2019-11-27 18:01:18
问题 I am trying to extract information on all dependencies (recursively) used in my project. It seems like the MavenProject class provides all information that I require. But I can't figure out how to transform an instance of Artifact into an instance of MavenProject /** * * * @reqiresDependencyResolution * */ @Mojo(name = "license-overview", defaultPhase = LifecyclePhase.PROCESS_SOURCES) public class MyMojo extends AbstractMojo { /** * @parameter default-value="${project}" * @required *

Use Maven to trigger a wsgen & wsimport in a row, using wsdlLocation

半腔热情 提交于 2019-11-27 17:45:30
I have hard times using maven to generate my client. So Please refer to Creating a web-service client directly from the source for the first part of my question. To keep it simple and short, I want to go from here (a file in src/main/java) : package com.example.maven.jaxws.helloservice; import javax.jws.WebService; @WebService public class Hello { public String sayHello(String param) { ; return "Hello " + param; } } to there : /** * This class was generated by the JAX-WS RI. * JAX-WS RI 2.1.7-b01- * Generated source version: 2.1 * */ @WebServiceClient(name = "HelloService", targetNamespace =

Which sonar-maven-plugin version to use?

喜夏-厌秋 提交于 2019-11-27 17:15:56
问题 I am wondering which sonar-maven-plugin in which version I should use. As far as I know there is a org.codehaus.mojo version and two org.codehaus.sonar versions (sonar-maven3-plugin, sonar-maven-plugin). As far as I understand the sonar-maven3-plugin is now deprecated and the org.codehaus.sonar:sonar-maven-plugin should be used instead. However those org.codehaus.sonar version are tied to a certain version of the sonar server, therefore it makes probably no sense to use them directly. To be

how to integrate Angular 2 + Java Maven Web Application

吃可爱长大的小学妹 提交于 2019-11-27 17:10:43
I have created a Angular 2 front-end Application.and i have created one Java Rest WS Back-end Application which is connected to DB. My Folder structure for Angular 2 App is below- Angular2App confg dist e2e node_modules public src app favicon.ico index.html main.ts system-config.ts tsconfig.json typings.d.ts tmp typings .editorconfig .gitignore angular-cli.json angular-cli-build.js package.json README.md tslint.json typings.json And My Java Maven Web Application Structure is below- JerseyWebApp src main java Custom Package java classes resources webapp WEB-INF web.xml index.html pom.xml I want

now getting 401 unauthorized in jenkins when deploying artifact to archiva maven repo

余生长醉 提交于 2019-11-27 17:01:47
问题 This used to work before I upgraded Jenkins to 1.494. Now I get this error in Jenkins when using the build promotion plugin to copy the war artifact to the snapshot repo: ERROR: Failed to deploy artifacts: Could not transfer artifact com.blah.data:RestWebServices:war:1.0-20121224.163825-2 from/to archiva.apache.snapshots (http://10.31.31.64:8080/archiva/repository/snapshots): Failed to transfer file: http://10.31.31.64:8080/archiva/repository/snapshots/com/blah/data/RestWebServices/1.0

Merge properties files with Maven assembly

寵の児 提交于 2019-11-27 16:16:43
问题 I have a problem with maven assembly plugin. I have a maven project which use several jars. Each jar contains configuration files. With another project, I use maven assembly plugin to assemble all configurations in unique jar. All work fine but unfortunately, two files are the same name and the second overwrites the first. I don't achieve to tell maven to merge the two files instead of overwrite. Someone knows how to do that ? Thanks. 回答1: It is not exactly what you are looking for, but I

Minimize an Uber Jar correctly, Using Shade-Plugin

本秂侑毒 提交于 2019-11-27 15:39:17
问题 I am using the Maven-Shade-Plugin to create a runnable Uber-jar. According to the last frame on this page, the size of the jar can be minimized by using: <configuration> <minimizeJar>true</minimizeJar> </configuration> But this feature does not take into consideration the classes that are declared in the log4j.properties file. Hence, e.g. org.apache.log4j.appender.TimeAndSizeRollingAppender is not included in the Uber-jar, even though it’s declared in the log4j.properties file. I believe I