maven-plugin

Maven 3 warnings about build.plugins.plugin.version

我只是一个虾纸丫 提交于 2019-11-26 23:28:22
Since I updated to Maven 3 I get the following warning messages at each build : How can I get rid of these warnings? [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for proj:id:jar:3.1 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ line 195, column 15 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 204, column 15 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is

Is there a way to deal with duplicate element definitions across multiple .xsd files in JAXB?

五迷三道 提交于 2019-11-26 22:51:15
问题 I have dozens and dozens .xsd files that I want to auto-generate code for. A couple of the files have duplicate names that clash when I try to generate all of them at the same time. I am focusing on just trying to get 2 of these to work. When I get these 2 working I will fix the rest. But I am just focusing on 2 of these files for now. I am not in control of them, they are from a vendor and follow a "standard" , so editing them is not an option for multiple reasons. I am using the maven-jaxb2

String arrays as command line arguments for maven plugin

不问归期 提交于 2019-11-26 21:48:39
问题 I'm writing a maven plugin that has a parameter that's a String[]. Like this: /** * @parameter expression="${args}" */ protected String[] args; This can be utilized through the POM like this: <args> <arg>arg1</arg> <arg>arg2</arg> <args> But I want to send it in from the command line -Dargs={arg1, arg2} Is this possible? 回答1: You can't do it directly as far as I know, but it is pretty common practice to accept a delimited String and split that into an array yourself. For example the maven

What is the best way to avoid maven-jar?

半城伤御伤魂 提交于 2019-11-26 20:29:08
I am using a different plugin (ant4eclipse) to jar my files. What is the best way to avoid the maven-jar plugin from executing? I tried to remove the <plugin>maven-jar-plugin</plugin> I tried to <exclude> ** / * < / exclude> I tried to <skip>true</skip> None worked peterj In Maven 3.0.x (I tried 3.0.2) you can disable maven-jar-plugin by binding the default-jar execution to a nonexistent phase, as @bmargulies suggested . Unfortunately that doesn't work in 2.2.1, but you can prevent it from interfering with your own jar by setting an alternative <finalName> and <classifier> for the default-jar

Maven:Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.7:resources

我怕爱的太早我们不能终老 提交于 2019-11-26 19:59:00
问题 I am building my project using Maven. My maven version is apache-maven-3.0.4. I am using Eclipse Luna. When I try to build my project I get the following error [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.7:resources (default-resources) on project OrionCommunity: Mark invalid -> [Help 1]. Following is the stack trace when I run mvn clean install -X : [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO]

Maven test dependency in multi module project

爷,独闯天下 提交于 2019-11-26 19:26:40
I use maven to build a multi module project. My module 2 depends on Module 1 src at compile scope and module 1 tests in test scope. Module 2 - <dependency> <groupId>blah</groupId> <artifactId>MODULE1</artifactId> <version>blah</version> <classifier>tests</classifier> <scope>test</scope> </dependency> This works fine. Say my module 3 depends on Module1 src and tests at compile time. Module 3 - <dependency> <groupId>blah</groupId> <artifactId>MODULE1</artifactId> <version>blah</version> <classifier>tests</classifier> <scope>compile</scope> </dependency> When I run mvn clean install , my build

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

纵饮孤独 提交于 2019-11-26 19:14:34
问题 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

how to integrate Angular 2 + Java Maven Web Application

淺唱寂寞╮ 提交于 2019-11-26 18:56:34
问题 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-

How do I create a new packaging type for Maven?

余生颓废 提交于 2019-11-26 17:26:49
I have a requirement to create jar files with Maven, but they need to be installed to the repository with a "foobar" extension , and it would be nice if they could have their own packaging type so we can identify those artifacts by the packaging. Can I set up a new packaging type to do this? Rich Seller To do as you described, create a Maven project with packaging jar (as stated here , as there won't be mojo definitions). In the src/main/resources/META-INF/plexus sub-folder create a components.xml with the following contents (assuming you want the packaging type to be "my-custom-type", change

Tool for creating a Java daemon service on Linux [closed]

断了今生、忘了曾经 提交于 2019-11-26 16:25:50
问题 What is the best way to create a java application that can be run using ‘service’ on Linux? I was going to use the JSW available here, but cannot use the licence on that (licence is either GPL or it costs money as far as I can tell). I’d need an apache style licence. I’m using maven to build, so it would be great if it was possible to create the service using a maven plugin, but any other suggestions would be great. I've seen Apache Commons Daemon, is there a maven plugin for this?