Building an executable jar with maven+geotools jai-imageio / kakadu runtime error

Following the directions here I tried to build an executable jar for my geotools based project to distribute it to users. Now during runtime I get the following error java.util.ServiceConfigurationError: javax.imageio.spi.ImageReaderSpi: Provider it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReaderSpiit.geosolutions.imageio.plugins.jp2k.JP2KKakaduImageReaderSpi not found on Runtime. Does anybody know how to resolve this (maybe by forcing geotools to not use any native libs?)

maven-based distribution of multi-module web app

I am trying to develop a distribution package for a complex simulator with a web-based front-end (see www.powertac.org). The simulator is a Spring-based application with 11 separate modules. We have distributed a "headless" version (without the web front-end) that allows a user to simply download the pom.xml and run the server directly - maven downloads all the pieces, if necessary, and calls the main class with command-line args. Now I want to distribute a version that includes the simulator a

Apache Felix Maven Plugin Not Working

Simple. Here is the felix plugin in the maven pom.xml: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.5.1</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin>

Maven POM file for installing multiple 3rd party commercial libraries

I have a bunch of projects which are dependant on a set of commercial 3rd party libraries. We currently don't have a company repository so I have to install the libraries in my own local repo. Running mvn install:installFile -Dpackaging=jar -Dfile=<file> -DgroupId=<groupId> -DartifactId=<artifactId> -Dversion=<version> for each file is rather tedious. Could create a bat file, but is there a way to do this using maven? I'm thinking a project for all the jars and a singl

How do I automate the update of SNAPSHOT dependencies to the latest released versions when using maven

I am trying to define a release process for our project. I was able to use the maven release plugin to accomplish the release but I had to manually update all of our internal SNAPSHOT dependencies to release versions prior to the prepare and then again back to SNAPSHOT versions after the release. I have used the maven versions plugin and it detects my corporate dependencies that are SNAPSHOT builds and lists the correct release build to use. I tried the maven release plugin, prepare goal, and

Maven custom Archetype generator Sources and Resources missing

We are developing modular application where we want to use common template for each ERP module. Created own archetype inspired by maven. Finally we are able to deployed it own repository as usually able to generate project by own archetype. Where is we have to register lots files into archetype.xml, this is the break point for me. Because we are not interested to register lots of files into archetype.xml manually as it is time consuming matter. archetype.xml file where I could register sourc

GitHub dependency in Apache Maven project

I have a Maven project on github.com: <project ...> ... <groupId>com.example</groupId> <artifactId>my-github-library</artifactId> <packaging>jar</packaging> <version>1.0.0</version> ... </project> Now I want to add my-github-library as a dependency to another my-local-application project: <project ...> ... <groupId>com.example</groupId> <artifactId>my-local-application</artifactId> &

Gradle way of handling maven non-lib artifact dependencies

I previously archived a zip artifact in our internal Maven repository. In my Gradle buildscript I can reference the artifact as a dependency and can get a path to the artifact, using: configurations{ resourceProperties } dependencies{ resourceProperties "$group:$name:$version" } ... def path = configurations.resourceProperties.asPath Unfortunately I get all the zip artifact's project dependencies appended on the path as well. Is there another Gradle way to handle non-lib Maven artif

maven nested properties ${${}}

how can maven using nested properties definition ? <groupId>org.sonatype.mavenbook.simple</groupId> <artifactId>simple</artifactId> <version>1.0-SNAPSHOT</version> <packaging>pom</packaging> <name>simple</name> <url>http://maven.apache.org</url> <properties> **<TEST-1.0-SNAPSHOT>hello world</TEST-1.0-SNAPSHOT> <test>${TEST-${project.version}}</test>** </properties> I d

Maven archetype - Run external commands after creation

I'm looking for a way, to execute additional commands (e.g. a perl script) after running mvn archetype:generate on my custom archetype automatically. Is this possible? Context I'm writing an archetype, that creates OSGi bundles which i want to integrate into a parent project as modules. After generating the bundle, i wish to organise it into the parents directory structure and then manipulate poms and other configuration files automatically. This has been asked on maven forums before 1, howe

Maven and Multiple Goals

I'm attempting to use the Grails Maven plugin to build a war file. There's a known problem with the plugin in that it does not resolve range dependencies, and my project pom file must contain range dependencies. The dependency is specified like this: <dependency> <groupId>mygroup</groupId> <artifactId>myartifact</artifactId> <version>[0.0.0,999.999.999)</version> </dependency> The error message is like this: [ERROR] Failed to execute

Intellij-idea Debugger disconnected when debugging maven test

I have followed this link to debug maven test via Intellij Idea : http://www.grygoriy.com/2012/01/how-to-debug-tests-maven-test-via.html When reaching the third step and starting debugging, It's connected but quickly disconnected and isn't stopped in breakpoints. I had in Intellij : Connected to the target VM, address: 'localhost:5005', transport: 'socket' Disconnected from the target VM, address: 'localhost:5005', transport: 'socket' Any idea ?

Maven indirect dependencies

I have a java ee maven project. The project has some dependencies in pom. But also it has some indirect dependencies (dependencies of dependencies). While deploying the app I have some ClasNotFound exceptions of classes in this indirect dependencies. How can I resolve them except adding them in Glassfish CLASSPATH?

Maven 'gpg.exe' is not recognized as an internal or external command after setting environment?

[INFO] --- maven-gpg-plugin:1.4:sign (sign-artifacts) @ server-test-toolkit --- 'gpg.exe' is not recognized as an internal or external command, I have set the environment path: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\MinGW\msys-7.2\bin;C:\Program Files (x86)\GNU\GnuPG I run the gpg in cmd.exe in windows, it is OK. But when running the maven-gpg-plugin in eclipse why still popup the error: 'gpg.exe' is not recogniz

Lombok with maven at Openshift (Jboss AS) build fails

I started using Lombok in my project and all is working well in my local environment (maven compile is working). When I try to pusth to openshift (Jboss installation) maven compile in openshift fails with errors: [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ german-school --- [INFO] Compiling 13 source files to /var/lib/openshift/5290ebf4500446c6e20000b8/app-root/runtime/repo/target/classes [INFO] ------------------------------------------------------------- [ERROR] COMPILA

Maven best way to refer to war files using gradle cargo plugin

I'm working on a gradle build which builds several war files and publishes them to the local maven repo. In another project I want gradle to deploy all the new war files to a tomcat server and then run webetsts against them. I have it working but the only way I was able to refer to the war files using cargo was with something like : deployable { file = file( 'file://' + new File(System.getProperty('user.home'), '.m2/repository/company/project/5.0.0/myWar-5.0.0.war').absolutePath) cont

Maven OSGi Code Coverage during Integration Testing

I am running integration tests on OSGi bundles using SOAPUI. So far I have integrated SOAPUI with Maven which runs integration tests on OSGi bundles*(running in Apache Karaf)*. I am trying to find out how can I further enhance my pom.xml to calculate code coverage during runtime for the bundles? Can anyone plz suggest some points? I have the following pom.xml: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="

Maven How do package managers handle ordered dependencies?

How do package managers like rpm, pip, msi, mvn, npm, etc. handle dependencies that need to be installed in a particular order? Also, how are circular dependencies handled? Are there design patterns for these types of requirements?

How to deploy to archiva using Jenkins and maven

I am trying to deploy to my archiva repo using Jenkins and maven. I am using the "post-build actions" option: "deploy artifacts to maven repository" and I have added the configuration plugin where I added a settings.xml and defined the server details (id, username, password). I also added this file to "build environment" settings where I provided the file as a configuration file. The problem I am having is the error: not authorized , reasonphrase: unauthorized. The username and password are

Maven Hive 0.12.0 IncompatibleClassChangeError

I'm trying to install hive on my single node Hadoop installation. I'm running Mint 16. I've tried installing Hive 0.12.0 and 0.13.0. I've added HIVE_HOME, HIVE_HOME/bin and HIVE_HOME/lib (and without lib) to my path. Each time I run hive from the terminal I'm getting the following stack Exception in thread "main" java.lang.IncompatibleClassChangeError: Implementing class at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source)

Difficulty deploying second artifact with Maven

A mavenized version of an old project of mine creates two Jar files, one for command line and one for GUI use. As it currently stands, it deploys only the primary artifact to the local repository. The jars are created by having two executions for maven-jar-plugin, and both get created in the target directory. What happens is the GUI file overwrites the primary one, with the wrong name: [INFO] Installing /Users/gmcgath/DevProjects/git/jhove/target/jhove-GUI-1.12.0-SNAPSHOT.jar to /Users/gmcgath/

maven release from svn trunk file adds irrelevant projects to the release folder

I want to make a release from a project located in svn trunk named like com.a.b and I want to see my release under my tags folder. It is happening but maven release adds all the folders under the trunk with irrelevant ones to my release folder. I just want to add projects to release folder named like com.a.b.c or com.a.b.d . edit: related parts of the pom.xml: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId&

Maven include test sources as dependency

I have a multi-module project looks like this: module-A --POM.xml --sourceDirectory --SourceA.java --testSourceDirectory --testSourceA.java module-B --POM.xml --sourceDirectory --SourceB.java --testSourceDirectory --testSourceB.java ...many similar modules ParentModule --POM.xml --dependency --module-A --module-B ... --module-x I have ParentModule in order to access the source files (SourceA.java) in A,B, etc. in Netbeans using "Go to type" without o

Gradle/Maven dependency for Redshift JDBC driver

I've downloaded the RedshiftJDBC41-1.1.17.1007.jar to use the com.amazon.redshift.jdbc41.Driver for some Redshift POC work that I'm doing, and have been adding it manually to my classpath. I'd like to now incorporate it into our build, but I can't seem to find an example of a dependency name for it to put in my build.gradle file or find it in a Maven repo. Any tips? (Note, I'm looking for redshift jdbc only, not the older postgres-redshift driver).

Maven Running docker as non-root user OR running jenkins on tomcat as root user

I am trying to build a docker image using docker-maven plugin, and plan to execute the mvn command using jenkins. I have jenkins.war deployed on a tomcat instance instead of a standalone app, which runs as a non-root user. The problem is that docker needs to be run as root user, so maven commands need to be run as root user, and hence jenkins/tomcat needs to run as root user which is not a good practice (although my non-root-user is also sudoer so I guess won't matter much). So bottom line, I

Why my maven project does not pick-up the jar from nexus

I am on Redhat, using jenkins with Nexus Repository Manager OSS 2.12.0-01. What I am trying to achieve is to download all the jar from nexus. What, I have accomplished. Successfully installed nexus 2.12.0-01 This is the content of my maven setting.xml <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0

do not create meta-inf/maven in jar package when using maven assembly plugin

I have one project that using maven assembly plugin for merging two jar,without using maven assembly ,create jar package have meta-inf/maven that contain pom.properties and pom.xml . but after merge by Assembly this folder not exists. i search it and found that this can make that OK but dose not work . <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>2.6</version> <config

Excluding spark from uber jar with maven

How can I just compile my spark code to put onto remote server without also packaging spark which I have defined in maven? I don't need any of the spark dependency since I obviously already have it installed on the server when I run spark-submit. Still pretty new to maven. So far I'm thinking of possibly using shade plugin but not sure if that's the right way to go. Just trying to refine a workflow where I test my spark apps locally and then just need to package a jar for running on a remote ser

wrong test count with maven-surefire-plugin

Each counter is good but not the sum of all counters at the end in the summary My problem is the wrong test count So run:5+8+1739+1+1 = 1754 != 1744 So Skipped:0+0+237+0+0 = 237 != 227 I have: Tests run: 1744, Failures: 60, Errors: 4, Skipped: 227

Difference between 2 maven repositories

2 Maven Repositories - repA, repB. repA is getting decommissioned. Multiple applications depend currently on both repA,repB. What is the quickest way to identify jars which are on repA but not on repB ? Also, would be perfect if repA and repB have the same versions of a given jar- we can compare the md5 so that we can show diffs & prompt those applications for additional testing. Alternative solution might be show all jars(version,md5) under a repository.

Configuration inheritance regarding the Maven Shade Plugin

Currently I have problems with the configuration inheritance of the Maven Shade Plugin, what I mean by this is that artifactSet and all configuration options "underneath" it turn red whenever I remove the phase and goals options (which are meant to be inherited from the parents pluginManagement section. I'll show what I have in my parent first and after that what I'm trying to accomplish. <build> <pluginManagement> <plugins> <plugin>

Maven Dependency to file in resources root folder

I got Java module and structure looks like: moduleX -resources |-icons |_ icon.png |-libs |_ library.jar -src pom.xml resources is a folder mark as Resources Root in Intellij IDEA. How should looks Maven dependency to get the library.jar ? I tried as <dependency> <groupId>library</groupId> <artifactId>library</artifactId> <version1.0</version> <scope>system</scope> <systemPath>${basedir}/resou

Maven jacoco:report-aggregate either gets shallow coverage or none at all

I have a large multi-module Maven build, presently with a mix of PowerMock and Mockito tests (moving all PowerMock tests to Mockito soon). The default jacoco-maven-plugin config in the parent pom is for "offline" instrumentation, but the one module with Mockito tests is using online instrumentation. I believe each of the jacoco.exec files in the modules are being built correctly. One of the child modules, called "jacoco-aggregate", just tries to use the "merge" and "report-aggregate" goals.

running POM with Maven

I am running pom through maven and am getting the following error. Pom looks okay. It built successfully when run with testng. Could someone help me with this. T E S T S ------------------------------------------------------- Running TestSuite Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] To

Maven How to enforce that a property is set that points to a base directory for systemPath?

I'm trying to enforce that a property is set using the maven enforcer plugin. The property should point to a directory and is used as a base directory for some system scope dependencies. I have the following pom.xml: <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> <groupId&

Maven Jenkins tools vs shell command : Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher

I'm testing a Job in Jenkins with Declarative Pipelines, the job is simple it does a maven test. When I set maven and jdk in the tools in the declarative pipeline, and then I do mvn test, it works everything goes fine. But when I use directely a shell command this does not work. Everything goes fine when I do this: pipeline{ agent {label "linux-slave-01"} tools { maven : "Maven 3.2" jdk : "oracle-jdk-1.8" } stages{ stage{ steps{

Maven: compilation module fails

I've these modules into my pom.xml: <modules> <module>rep-digital-common</module> <module>rep-digital-api</module> </modules> So, rep-digital-common contains common classes rep-digital-api module needs. When I compile them using $ mvn clean compile ... [INFO] rep-digital-common ................................. SUCCESS [ 7.571 s] [INFO] rep-digital-api .................................... SUCCESS [ 17.988 s] However, when I perform: $ mvn -pl

Maven Can sonarqube gitlab plugin only scan changed files

I'm using gitlab-ci pipeline, it will run a new docker container with following commands: mvn --batch-mode verify sonar:sonar -Dsonar.analysis.mode=preview -Dsonar.gitlab.project_id=$CI_PROJECT_ID -Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA -Dsonar.gitlab.only_issue_from_commit_file=true -Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME -Dsonar.host.url=xxx -Dsonar.test.inclusions="/src/test/java/**/*.java" -Dsonar.login=xxx It becomes quite slow for my project, almost run for 20mins. I found

Adding properties to Spring Boot application.yml file at the maven build time

I have the use case in which I need to write some properties to the spring boot application.yml file for each Spring boot profile at the maven build time. Input(application.yml) : spring: profiles: ED eureka: client: enabled: true availabilityZones: us-west-2: us-west-2a,us-west-2b serviceUrl: us-west-2a: http://regdiscovery:${eureka.environment}@memeboot-regdiscovery1-ed.aord.expertcity.com:8080/eureka/ --- spring: profiles: RC eureka: client: enabled: t

Maven How can I resolve my BOM's dependencyManagement dependencies?

I have a Maven BOM (bill of materials) for a rather large project that contains several hundred dependencies within the <dependencyManagement> block. I'd like to verify that all of the dependencies can be successfully resolved before publishing it for the rest of my company. Unfortunately, the command mvn dependency:resolve (as well as the other dependency commands like dependency:tree) only seems to operate on the standard <dependencies> block but ignores <dependencyManagement&g

How to remove timestamp from artifacts uploaded to maven2 repository on nexus?

I am uploading a few artifacts through a Jenkins pipeline on a Nexus repository, the repository is maven2 hosted. I use the following block in Jenkins to upload artifacts: nexusArtifactUploader ( artifacts: [ [artifactId: 'artifact-part1', classifier: '', file: "build/libs/artifact-part1.jar", type: 'jar'], [artifactId: 'artifact-part2', classifier: '',

Is Ubuntu 19.04/19.10 compatible with maven 3?

I have problem with my maven 3.6.1 and Ubuntu 19.10. I installed maven using: sudo apt install maven, and when i try to run my project using Intellij IDEA, the packages of maven libraries are not downloaded and when I run maven clean install i see: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.8.RELEASE from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org This project works correctly on ubuntu 18.04 LTS. Somebody knows how to r

Sharing maven build across different projects in CircleCI

I have to 2 git repositories. Lets call them Project A and Project B. Both are java maven apps. I am trying to setup CI/CD in CircleCi for both projects. But build/targets from Project A are required as dependency in Project B. How should I configure Project B in circleci so that is uses build from Project A. In other words how can both Projects in circleci have same .m2 folder ?

What is the repository order that is considers by Maven when it tries to download plugins?

I don't find the documentation where Maven says how it orders the declared repositories. Consider the following locations one could configure maven repositories: settings.xml under settings/profiles/profile/repositories id: settings-repo1 id: settings-repo2 settings.xml under settings/mirrors id: settings-mirror1 id: settings-mirror2 parent pom.xml under project/repositories id: pom-parent-repo1 id: pom-parent-repo2 child pom.xml under project/repositories id: pom-child-repo1 id: p

Maven Nexus V3 wont work with artifactory as a remote repo. How can I get around this issue?

So I currently am trying to get artifacts from repo.osegeo.org, which is a Nexus V3. I am having issues getting the artifacts to populate into my virtual repo that i created which holds the remote osegeo repo, libs release, libs snapshot and also my local repos. I have tried following the work around that is stated in this link below: https://community.sonatype.com/t/maven-nexus-v3-remote-repository-integration-with-artifactory/2149 But I still have trouble actually getting the artifacts in my r

  1    2   3   4   5   6  ... 下一页 最后一页 共 91 页