maven-3

Maven 3 warnings about build.plugins.plugin.version

谁都会走 提交于 2019-12-17 05:21:07
问题 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,

Is Maven ready for JDK9?

五迷三道 提交于 2019-12-17 04:58:51
问题 Today I tried the latest jdk9 Build 113 and tried to compile my project with the latest Maven 3.3.9 These are the commands (found partially via twitter) export MVN_OPTS="-Dmaven.compiler.fork -Dmaven.compiler.executable=/somewhere/Downloads/jdk-9/bin/javac" export JAVA_HOME="/somewhere/Downloads/jdk-9" mvn clean install But I get this error ... in short: [WARNING] Error injecting: org.codehaus.plexus.archiver.jar.JarArchiver java.lang.ExceptionInInitializerError at sun.reflect

Maven Compilation Error: (use -source 7 or higher to enable diamond operator)

左心房为你撑大大i 提交于 2019-12-17 02:24:03
问题 I'm using maven in IntelliJ, JDK1.8, maven 3.2.5. Got compilation error: use -source 7 or higher to enable diamond opera. details are as follows: [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] TrainingConstructor.java:[31,55] diamond operator is not supported in -source 1.5 (use -source 7 or higher to enable diamond operator) [ERROR] DTM.java:[79,21] try-with-resources is not supported in -source 1.5 (use -source 7 or higher to enable

Maven - how to create ejb client when packing war

邮差的信 提交于 2019-12-14 03:49:09
问题 I've an eclipse base ejb project that I have just converted into a maven module. It is structured in web app layout (as preferred by Tomee). So, in pom.xml, the packaging type is set to war, which maven correctly generated the war file. But I'm not very successful in getting maven to also create a ejb-client jar when packaging the war. I added this to the pom.xml but it does not seems to be doing anything: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId

Maven pom variables as command argument

 ̄綄美尐妖づ 提交于 2019-12-14 03:33:44
问题 I want to be able to do something like: mvn release:branch -DbranchName=${project.version} I'm sure this won't work and I'm asking for help on how to achieve it. mvn release:branch require a branchName. I need the branchName on the command line argument taking the project version as value. My pom looks like this: <profile> <id>branch</id> <activation> <property> <name>branchName</name> </property> </activation> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId

Create META-INF/services file with Maven

耗尽温柔 提交于 2019-12-14 03:22:55
问题 Is there a way to create a custom services file within META-INF/services with Maven? This is how you would do it with Ant: https://ant.apache.org/manual/Tasks/jar.html I understand that it's possible to simply create a resources/META-INF/ in my source code and place whatever services file I want in there. Maven will then automatically pull those files into my JAR. This does not solve my issue. The contents of my service file changes depending on the type of JAR I'm building, so I can't simply

Tycho: How do I deploy sources jars of packaging eclipse-plugin?

烈酒焚心 提交于 2019-12-14 02:55:30
问题 In my parent pom I got this configuration to deploy sources jars: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <executions> <execution> <goals> <goal>jar</goal> <goal>test-jar</goal> </goals> </execution> </executions> </plugin> But the tycho build modules ignore that, so their sources aren't installed/deployed in the maven repository. Which means I can't include them in an assembly (especially if the assembly module is located in another

Is the surefire's forkMode 'never' working with cobertura under Maven 3?

◇◆丶佛笑我妖孽 提交于 2019-12-14 02:44:04
问题 After switching from maven 2 to maven 3 I have found out having 0% test coverage reported by cobertura. I've stated question about which versions of cobertura and surefire to use: What versions of cobertura and surefire plugins work together under maven3? I have, however, investigated problem deeper and found out what of configuration fragment was not working: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>${surefire.plugin.version

maven assembly plugin do not set file attributes

ぐ巨炮叔叔 提交于 2019-12-14 02:23:12
问题 I know this is a duplicate of Maven assembly plugin not applying fileMode on unpacked dependencySet but it's still unanswered. My assembly is <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd"> <id>distribution</id> <formats> <format>tar.gz</format> </formats>

How do I build, integrate, and compile java code created by google-protobuf into an Android Studio Project

守給你的承諾、 提交于 2019-12-14 01:45:44
问题 I have been trying to find a way to integrate java code, generated by google-protobuf's protoc compiler, into an Android Studio project. protoc --java_out=. Navigation.proto where Navigation.proto contains: syntax = "proto3"; option java_generic_services = true; message Navigation { string name = 1; string url = 2; } service NavRPC { rpc putNavigation(Navigation) returns (Navigation); }; will generate a java class (Navigation.java), but that class references packages that are not present in