Maven - how to unpack a jar and build the war files using unpacked files(class)

Is there any way to unpack a dependent jar and include the required class files from it to a war file.I have two modules, namely module-A and module-B.Module-A packaged as jar, and module-B packaged as war.Module-A is added as dependency in module-B.Now i get module-A jar file inside module-B. I need to include the class files, available inside Module-A jar file, into a specific folder in my war.Any help would be highly appreciated, thanks in Advance!...Read more

maven - Cannot access templates running Spring Boot with JAR

I have to run a Spring Boot on the command line using its JAR. I've seen already many topics about the "fat JAR", which I believe I have already created.The program uses Spring Boot + Maven + Thymeleaf + Spring Security.The problemTemplates that are in the templates folder - i.e. /resources/templates/<file> are displayed correctly (I have index.html, login.html and underConstruction.html tested and working)Templates that are in subfolders - i.e. /resources/templates/client/edit.html or /resources/templates/client/search.html - fail to ren...Read more

dependencies - How come Maven can generate the `effective pom` but fails to generate the `dependency list`?

I was playing with a Maven project when I recognized that:$mvn help:effective-pom leads to BUILD SUCCESSHowever$mvn dependency:list leads to BUILD FAILUREAs far I understand, the effective pom includes a detailed list of dependencies as well. So what dependency:list is trying to output can actually be found in effective pom. Can someone explain what is my misunderstanding?To replicate the problem:$git clone --depth 1$cd pinpoint$mvn clean help:effective-pom$mvn clean dependency:listThe full error message: ...Read more

maven - "An unexpected error occured (return code -1)" when trying to launch SWTBot test suite with Tycho

We are writing SWTBot tests for our Eclipse RCP application. Our RCP application includes NatTable components and has authorization mechanism to enable/disable perspectives. The test suite is working fine when launching it from Eclipse. Now we are trying to integrate it with Tycho.This is the pom.xml created for running the SWTBot test suite:<?xml version="1.0" encoding="UTF-8"?><project xsi:schemaLocation="" xmlns="" xmlns:...Read more

user interface - Maven/Tycho SWTBot Eclipse RCP

I would like to run my UI Tests SWTBot with Maven/Tycho and Tycho can't get my .product.This my log:!ENTRY 0 0 2017-12-02 16:36:32.573!MESSAGE Product tychodemo.bundle.product could not be found.***WARNING: Display must be created on main thread due to Cocoa restrictions.!ENTRY org.eclipse.osgi 4 0 2017-12-02 16:36:32.760!MESSAGE Application error!STACK 1...This is my pom.xml:<project xmlns="" xmlns:xsi="" xsi:schemaLocation="http://maven.apache...Read more

maven - Accessing parent POM properties from Jenkinsfile

I have a Spring application that is built using Maven. Jenkins Declarative pipeline is being used for achieving CI/CD.I want my Jenkinsfile to be as generic as possible, leveraging what's already available from the POM along with its parent POM. We use a custom Super POM to centralize metadata such as our Artifactory repositories (distributionManagement />), SonarQube servers and some other valuable properties.I'm already using readMavenPom().getParent().getGroupId() to fetch our company's standard groupId, along with readMavenPom().getArtifact...Read more

maven - Env variable value got reset to original even after assigning the pom version number in jenkins script

I have a scenario where i have to read the maven pom versions for different components and assign the version to docker image(TAG). But after i read the pom, assigned it to some global variable it will reset to original value in groovy jenkins script. Below is the sample. HMAP_VERSION value will 1.2.1 but when it is used in the line: sh "docker login -u ${ART_USERNAME} -p ${ART_PASSWORD}" the value will be UNINITIALISED.Can somebody tell me what might have gone wrong? This will work with single maven file which is read in env block as ...Read more

jmeter - Package maven project for offline mode

I need to execute JMeter tests on an offline server.Currently, I have a Maven project which executes JMeter tests with the plugin "jmeter-maven-plugin" on my workstation.Now I want to package this Maven project to deploy it on my offline server. I would like to be able to use the "maven verify" command on the deployed project to launch my JMeter tests.I tried to package (zip) my projet with "maven-dependency-plugin" and "maven-assembly-plugin" plugins.I want all the Maven dependencies in the zip file in order to execute my Maven project (especi...Read more

maven - Create a standalone groovy script with dependencies

I have a Groovy script with dependencies to RestFB:<dependency> <groupId>com.restfb</groupId> <artifactId>restfb</artifactId> <version>2.0.0</version> <scope>runtime</scope></dependency>I need to run this script on another machine with a groovy-shell. When I do it at the moment I get following error: @ line 7, column 1. import com.restfb.json.ParseException ^1 errorI read about ways to build a uber-jar but never found a good example that shows how to do it. A step by step guide...Read more

maven - How can I convert a groovy task in gradle into Gradle Kotlin DSL to generate a pom.xml?

What is the build.gradle.kts version of the the following Gradle script?apply plugin: 'maven'apply plugin: 'java'sourceCompatibility = 7targetCompatibility = 7dependencies { compile '' compile 'joda-time:joda-time:2.1' testCompile 'junit:junit:4.11' testCompile 'org.mockito:mockito-core:1.9.5'}task writeNewPom << { pom { project { groupId 'org.example' artifactId 'test' version '1.0.0' inceptionYear '2008' ...Read more

maven - Gradle - get dependency list for each library/module

I am trying to get the dependencies list for each modules/library in a project.Here is the structure of the project:Project+ --- library1 + --- library2 + --- library3 + --- library4 + --- library3The build.gradle of project is dependencies { compile project(':library1')}library2 and library4 all depend on library3. and the way they compile dependencies are the same with project.I would want to get the dependencies for each modules/libraries so that i can decide the sequence of bumping version for these libraries and u...Read more

maven - AWS Java SDK on JBoss AS7 - module.xml entries

I am having problems using the new AmazonAWS SDK in a JBoss AS 7.1 (EE6) projectI am just using the S3 library, so in accordance with the new release (1.9.7) I am only using the s3, core, kms jars-aws-java-sdk-core-1.9.17.jar-aws-java-sdk-s3-1.9.17.jar-aws-java-sdk-kms-1.9.17.jarSo I have created 3 separate module.xml entries for each jar within the /com/amazonaws directory:/com/amazonaws/aws-java-sdk-s3/main/module.xml<module xmlns="urn:jboss:module:1.1" name=""> <properties> <property name...Read more

jenkins - AEM - Continous Integration with Maven

I am very new in AEM and Maven too and I want to implement CI for my AEM website.Below is the flow that'd like to implement in Go.CD or Jenkins where I've figured out how to do the first 3 stages.I am now struggling with no.4 and no.5 (same as no.4).I'd like to do mvn clean install -PautoInstallPackage with the artifact uploaded to nexus repository but not installing the current code.Please see the comments beside the stages below +-----------+(1) | GIT | Start the pipe line when +-----+-----+ code is committed. ...Read more