maven-3

Maven throws a ClassNotFoundException codehaus.plexus.Launcher with JDK 9 [closed]

亡梦爱人 提交于 2019-12-24 01:37:23
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . While trying the freshly released JDK 9, I noticed that it seems to break maven entirely. Even a simple mvn -version won't work: vgm@localhost:~$ mvn -version Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher Caused by: java.lang.ClassNotFoundException: org.codehaus

get mojo parameters in maven plugin

限于喜欢 提交于 2019-12-24 01:18:57
问题 Is there any way to access a plugins properties within the execution method? I have a base mojo that has some properties, like so: @Parameter(defaultValue = "DEV", property = "dbEnvironment", required = true) protected Environment dbEnvironment; @Parameter(defaultValue = "true", property = "validate") protected boolean validate; The child mojo then adds some additional properties. I'd like to be able to read all of these properties, to validate them, but it's not obvious how to do so. When I

Spring Jersey - java.lang.NoSuchMethodError: javax.ws.rs.core.Application.getProperties()Ljava/util/Map

只谈情不闲聊 提交于 2019-12-24 00:59:06
问题 UPDATE: So I just want to point out that before I submitted this question, I attempted the solution that I've seen on similar stackoverflow questions such as this one. It was still giving me runtime errors, so I decided to write this question. mvn dependency:tree is what I was looking for so thanks @dunni. With mvn dependency:tree , I was able to find the actual name of the jersey dependency that was breaking my application and updated the exclusion by changing it from: <exclusions>

Upgrading to maven 3 from maven 2

自闭症网瘾萝莉.ら 提交于 2019-12-23 22:25:04
问题 I have upgraded from Maven 2 to Maven 3 and it seems to be working fine to clean install . However, in the Maven 3.x Compatibility Notes, it is mentioned that the <reporting> tag is no longer supported and should be moved up to the <build> tag. <reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-project-info-reports-plugin</artifactId> <version>2.1</version> <reportSets> <reportSet> <reports> <report>dependencies</report> <report>dependency-convergence

Bouncy castle security provider doesn't load under Java 11/12

拈花ヽ惹草 提交于 2019-12-23 20:15:15
问题 I'm trying to do something that's supposed to be trivial but there is a problem that I'm facing. The bouncy castle security provider won't load when after migrating a JavaFx application from Java 8 to Java 11 (tried Java 12 as well, same results). It's a Maven project that I updated to use Java 11 compliant plugins. It compiles fine but when running I get this in the terminal window: jar .Launcher java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect

Combine multiple jar into one (using maven)

孤者浪人 提交于 2019-12-23 19:44:55
问题 I have a project in javafx , I have 3 dependencies I try to combine them with my principale jar using maven : The result I got a jar (1.82mb) but when I click he dosen't launch noting appears. pom.xml <?xml version="1.0" encoding="UTF-8"?> <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> <dependencies>

Apache Maven installation in windows 8

十年热恋 提交于 2019-12-23 12:05:41
问题 I followed steps mentioned in this link http://maven.apache.org/download.cgi Whenever I type mvn --version in cmd. I got 'mvn' is not recognized as an internal or external command, operable program or batch file. But when I opened cmd with "Run as a administrator" it worked. OS: windows 8 How can I run mvn for any user on windows 8. 回答1: Try setting the environment variable M2 as System variable instead of User variable. 回答2: I used Rapid Environment Editor, started as an Administrator, and

Excluding generated-sources from source:jar

浪尽此生 提交于 2019-12-23 11:01:19
问题 Using the source:jar goal, how do I configure it such that the target/generated-sources folder is excluded from the archive? I've tried a number of different configurations, and can't get any of them to work. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <version>2.2.1</version> <configuration> <excludes> <exclude>target/generated-sources</exclude> </excludes> </configuration> </plugin> I've tried various things in the exlude tag such as

Excluding generated-sources from source:jar

不羁的心 提交于 2019-12-23 11:00:17
问题 Using the source:jar goal, how do I configure it such that the target/generated-sources folder is excluded from the archive? I've tried a number of different configurations, and can't get any of them to work. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <version>2.2.1</version> <configuration> <excludes> <exclude>target/generated-sources</exclude> </excludes> </configuration> </plugin> I've tried various things in the exlude tag such as

Maven pmd plugin - Exclude/Disable a rule

巧了我就是萌 提交于 2019-12-23 10:15:12
问题 I'm attempting to exclude a certain rule from pmd using the maven-pmd-plugin (in a multi-module maven project). Approach: Using the excludeFromFailureFile http://maven.apache.org/plugins/maven-pmd-plugin/examples/violation-exclusions.html Ideally, I want to exclude this rule for the entire product (based on a parent package), however,to being with I tested for a particular class - even that is not working. Environment Java 7, Maven 3.0.3 <plugin> <groupId>org.apache.maven.plugins</groupId>