Questions tagged [maven-3]

1

votes
1

answer
2.8k

Views

Detect OS and Java on Windows and Linux

I have a JavaFX project based on Maven. I want to build the Maven project on Windows and on Linux. In order to automate the process when I deploy the bundle I want to automatically detect the operating system. In windows I have this configuration: org.apache.maven.plugins maven-compiler-plugin 3.1 1...
Peter Penzov
1

votes
2

answer
91

Views

When filtering, how can I use default filter file when specified file does not exist?

In my POM, I have: ${basedir}/src/main/props/${environment}-${flavor}.properties Where environment and flavor can be provided at command line: mvn clean install -Denvironment=test -Dflavor=guest And inside the maven-resources plugin definition, I have: ${basedir}/src/main/props/base.properties ${cus...
MegaMatt
1

votes
1

answer
27

Views

NetBeans: Use environment from .bash_profile when running Maven commands

I have a .bash_profile with environment variables I want my IDE, NetBeans, to see during execution but doesn't seem to work. Any hints on how to get the IDE to see this?
javydreamercsw
1

votes
1

answer
65

Views

Required to create Maven plugin or 'some kind of wrapper' or should I use a parent pom

We are using the frontend-maven-plugin in several (10+) projects. These projects are build in combination with our own CMS. These projects are using a specific 'parent' in the pom, such as: nl.companyname companyname-corporate-pom 2.0.13 In this 'corporate pom', we have some predefined configuration...
NickGreen
1

votes
0

answer
242

Views

Return Code is:401 ReasonPharse: Unauthorized.

I started to practice nexus and i have sample java code. in command prompt, i went to the project path and ran 'mvn clean deploy' nexus admin admin credentials in settings.xml are correct. below code has been added in POM.xml file. nexus Java Releases Nexus Repository http://localhost:8018/repositor...
ssk
1

votes
0

answer
162

Views

How can know which external dependencies from a java maven project and do its bazel build/compile

I'm trying to do with bazel build, this is java maven project, how can I know which external dependencies and include it in workspace file to a bazel build? there is a migration--tooling: https://github.com/bazelbuild/migration-tooling, what is the maven_project path as following? I tried it as d...
Jamesjin
1

votes
1

answer
900

Views

Maven update version of specific dependency

I am trying to update the version of particular dependency in my Spring Boot project using the below command. However the dependency version is not getting updated. This is the command I am using: mvn versions:use-latest-snapshots -Dincludes=com.example:drools-sample-proj Spring Boot project's depen...
Suresh
1

votes
1

answer
88

Views

In Maven extensions is it possible to add <configuration> block in the pom.xml like we do for plugins?

We have a Maven extension which does some post actions at the end of build, but we want to extended its features by adding some flags/properties/something else in block same as the way we do for plugin configurations in pom.xml. Is it possible to do that? We tried adding it in pom.xml but it is thr...
Reddysekhar Gaduputi
1

votes
0

answer
232

Views

Wildfly run timeout altough the server is launched

Here is the configuration I used in order to use test integration in maven : [...] org.wildfly.plugins wildfly-maven-plugin 1.2.0.Final ${wildfly.home} ${wildfly.home}/modules localhost XXX XXX -b=0.0.0.0 -bmanagement=0.0.0.0 ${wildfly.home}/standalone localhost -server -Xms8192m -Xmx8192m standalo...
Antoine O
1

votes
0

answer
133

Views

maven assembly and depedency plugin - copying files works when using archives, fails when using dir

I have 2 projects: ProjA and ProjB. ProjB depends on ProjA. What i'm trying to do is simply copy several files from ProjA (which is packaged with assembly plugin) to ProjB (which is just standard jar) in the package phase. There are two cases - one works, the other doesn't work. But first here are t...
hrs
1

votes
0

answer
236

Views

Failed to determine Java version for profile jdk7-plugin-fix-version @ org.apache.commons:commons-parent:42

I am facing the below error on maven build. Failed to determine Java version for profile jdk7-plugin-fix-version @ org.apache.commons:commons-parent:42 problems were encountered while building the effective model for org.apache.commons:commons-lang3:3.5 Please help to resolve this issue. Full pom fi...
Kanhu Mohanty
1

votes
0

answer
200

Views

Force download maven-metadata.xml

So my job has 2 parts. The first part downloads all the required maven artifacts from a central online repository. The second part uses the download folder as an online repository(by changing URL from central repo to local folder) to build our product. But there are certain artifacts which do not ha...
Amit
1

votes
0

answer
169

Views

Failed to read extensions descriptor. Could not find artifact in central

I have created a maven extension, and now I am trying to use it without installing it locally. So I have deployed it to our own repository (not maven central yet) but for some reason maven is trying to download it from https://repo.maven.apache.org/maven2 and it fails, of course: [WARNING] Failed to...
Salvatorelab
1

votes
1

answer
293

Views

maven multi threaded build leading to OverConstrainedVersionException

I am using maven-3.2.3 ,maven-depedency-plugin-3.0.2 and maven-assembly-plugin-3.0.0 all of which are thread safe, but when running maven build with 4 threads (mvn clean install -T 4), I'am intermittently hitting org.apache.maven.artifact.versioning.OverConstrainedVersionException This never occurs...
Optimus
1

votes
0

answer
272

Views

JAVA 9 + spring-boot 2.0 + maven 3.5.3, meet ERROR package com.sun.org.apache.xerces.internal.parsers is not visible

I execute spring-boot:run command successfully in java 9 + spring-boot 2.0 + maven 3.5.3. I want to migrate project java 7 to java 9. My project has many library dependencies, and compiles by java 6 or 7. I know internal api is a problem. So I added a class for testing and run it. It failed like bel...
Songkey
1

votes
1

answer
60

Views

Maven - Integration-testing a multi-module rest api JavaEE project

My web-app project is made up of multiple modules and has structure like this: project //pom | |-- mod-pojo //jar | `-- src | |-- main | |-- test | `-- pom.xml | |-- mod-util //jar | `-- src | |-- main | |-- test | `-- pom.xml | |-- mod-wepapi-war //war | |-- pom...
Carlsson Evert
1

votes
2

answer
393

Views

Maven package error: No compiler is provided in this environment

I am new to Maven and I am trying to create a JAR out of a HelloWorld program. I have done the classpath setting: This is the pom.xml file: 4.0.0 com.demo custom-project maven-plugin 1.0 custom-project Maven Mojo http://maven.apache.org org.apache.maven maven-plugin-api 2.0 junit junit 3.8.1 test W...
user182944
1

votes
0

answer
206

Views

Strange Maven nullpointer

I have modified this question since initially asking it. Please refer to sections UPDATE 1 and, specifically, UPDATE 2 at the end. I am building a large JavaFX application with a lot of dependencies. I am using IntelliJ to do the job and am at the point of deployment. I am using IntelliJ's own tutor...
kdhansen
1

votes
0

answer
362

Views

Bouncy Castle not found in classpath, but works when run in maven

This is a very weird error, that I don't know more how to fix it. I'm using Bouncy Castle libs to decrypt a password. I configured it in my maven pom.xml as: org.bouncycastle bcprov-jdk15 1.46 provided The provided scope is because it is a signed jar. It is a command line application and I use mav...
neves
1

votes
1

answer
703

Views

Maven docker plugin for spring boot build error

I have a simple maven project with multi modules (only one for the moment) for Spring Boot microservices In the root folder the pom.xml contains 4.0.0 be.demo.microservices master 1.0.0-SNAPSHOT pom hello-service In the hello-service folder, the pom.xml contains 4.0.0 be.demo.microservices hello-ser...
tweetysat
1

votes
0

answer
915

Views

org.gradle.internal.event.ListenerNotificationException: Failed to notify build listener

When we build our application using gradle, it is throwing exception below * Exception is: org.gradle.internal.event.ListenerNotificationException: Failed to notify build listener. at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:86) and Caused by: java...
Laxmanrao Potadar
1

votes
0

answer
360

Views

Jacoco report : Not able to navigate to source file and see code coverage

Tools : Jacoco maven plugin Issue : I am working on a multi-module project. The project structure is described as below - Module1 Module1Test Module2 Module2Test I am able to generate the jacoco report for the Test module . The jacoco report was not coming due to ' Skipping JaCoCo execution du...
Atul
1

votes
0

answer
58

Views

maven PMD plugin generates xml which has wrong xml format

I am running pmd using maven in a separate jenkins build /tools/apache-maven-3.0.4/bin/mvn pmd:pmd --settings $Settings > /logfiles/pmdResults.$Job 2>&1 The result xml is not correctly formatted. for some of the violations, it does not have end tag of violations. Hence jenkins is not able to parse...
Hebbar
1

votes
1

answer
686

Views

How to set both VM Params and Program args using exec-maven-plugin?

I am using exec-maven-plugin to run java app. I need to pass both JVM params and program arguments. I am setting JVM params like this: exec-maven-plugin 1.6.0 MyId java MyClass -XX:+UseG1GC -Xms2G -Xmx2G ... and run the program: mvn exec:[email protected] -Dexec.args='my...
Tatiana Didik
1

votes
0

answer
26

Views

Command to display evictions graph in maven similar to SBT

SBT for scala has command sbt evicted that displays the transitive dependency graph with evicted versions. something similar to this. Is there any similar option that is provided maven?
1

votes
2

answer
77

Views

How to customise maven dependency version resolution?

So I want to use maven version ranges, however the rules of the current version resolution does not fit my requirements. Is there any way, perhaps extending from the existing maven plugins, so that I can override what version from the range to be selected as the dependency version? For example, let'...
xbmono
1

votes
1

answer
59

Views

Integration in Maven module project

I am facing issues in organizing Maven multi-module projects. I want to use the files in one child project(B) from other child projects which are C, D and E. Below is complete scenario described. I have Parent project A and its child projects are B(output jar), C(output pom) and D(output pom). Proj...
Ahmed
1

votes
1

answer
265

Views

Maven unable to download plugins for archetype on ubuntu

i have fresh ubuntu install VERSION='18.04 LTS (Bionic Beaver)'. Then i install java by sudo apt-get install default-jdk and then i install maven. Now i want to use maven to generate the project, but get following error: [email protected]:~$ mvn archetype:generate WARNING: An illegal reflective ac...
Alexandr
1

votes
0

answer
116

Views

Maven coordinates terminology

What is the terminology for the following Maven coordinates situations? (I've included possible terms underneath each situation, in case no term currently exists for it) have groupId, artifactId & version that might or might not actually resolve to an artifact in a specific repository resolvable coo...
XDR
1

votes
1

answer
336

Views

Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.7:site (default-cli): Invalid byte tag in constant pool: 18

As I am not expert for maven, I'm a bit lost here. We have projects which fail with the following error [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.7:site (default-cli) on project xxxx: Execution default-cli of goal org.apache.maven.plugins:maven-site-plugin:3.7:site...
papanito
1

votes
1

answer
248

Views

Unable to use environment variable for Maven Proxy port

I am able to configure a proxy to work successfully with Maven using settings.xml. I decided to take the configuration one step further and use environment variables for each of the proxy's parameters like so: true https ${env.PROXY_HOST} ${env.PROXY_PORT} ${env.PROXY_USER} ${env.PROXY_PASSWORD} Thi...
Jake Doodle
1

votes
0

answer
220

Views

Maven : how to order multiple execution of a goal in the same phase in a specfic order

I want my 'pre-integration-test' phase to be the following execution of goals, in this specfic order. PHASE : pre-integration-test get a spring boot jar (maven-dependency-plugin:copy) get-a-port (build-helper-maven-plugin:reserve-network-port) display-port (maven-antrun-plugin:run #1) start-server (...
Filip
1

votes
0

answer
98

Views

Clover failing with “No Clover database found, skipping report generation”

I'm trying to add Clover to my maven (groovy) project in order to get some code coverage results. However it fails to generate the code coverage report. The report is just empty. My src files are located in src/main/groovy and my tests are located in src/test/groovy When I run: mvn clean clover:setu...
user1104939
1

votes
1

answer
137

Views

Control order in which jars are added to shaded jar

I have found that the Confluent Kafka Connect addons only work if the jars are added to the classpath in a specific order. Accordingly, I'm trying to build a single shaded jar that includes the jars, picking conflicting classes in the same order. My question is How do I control the order in which...
Marcin
1

votes
0

answer
17

Views

Getting the versioning through maven API

I'm trying to get the versions of a maven artifact by using: @Mojo(name = 'myGoal', defaultPhase = LifecyclePhase.VERIFY) public class MyMojo extends AbstractMojo{ @Parameter(defaultValue = '${project}', readonly = true) private MavenProject project; public void execute() throws MojoExecutionExcept...
Sten Petersson
1

votes
1

answer
30

Views

Why is a profile mandatory for acquiring archetypes in non-Central repositories?

I use Maven 3.2.1 and maven-archetype-plugin 3.0.1 on Windows 10. I deployed archetype to my repository and defined it in settings.xml, but archetype could not be found. archetype https://mydomain/repos The execution result is as follows. DOS> mvn archetype:generate \ -DarchetypeGroupId=my.sample \...
nikai
1

votes
0

answer
396

Views

Maven failed to parse POMs at Jenkins

I am getting the artifact in my remote repository after deploying but still I'm getting error in the build 'Failed to parse POMs' Could you please help me what is the mistake I've done. This is very basic maven project which I tried to pull the code from GitHub and trying to build and deploy the jar...
Ahamed N
1

votes
1

answer
330

Views

Modular java module not found

I read all of the modular documentation but still cannot figure out what the problem is here: I added a dependency via Maven (I also tried adding the jar into project library manually but still caused the same problem), but when I import the class from that particular into my class, IntelliJ says 'p...
Matahari
1

votes
1

answer
505

Views

Spring Boot 2.0.3 integration test using MAVEN - java.lang.NoClassDefFoundError: org springframework boot autoconfigure jdbc DataSourceBuilder

I have a project which is setup in Eclipse(STS). When running spring integration tests using junit within eclipse, the spring context starts up correctly and the tests execute correctly. When attempting to run the tests from maven I receive this error : ( using: mvn test ) Error: -------------------...
davisg1

View additional questions