Skip to content
Advertisement

Tag: maven

How to append folder to each classpath entry using maven dependency and jar plugin?

I am trying to append folder before for all classpath entries in manifest file. As you can see in pom file below, I am using jar plugin to add classpath entries to manifest. With dependency plugin I am copying dependencies to ${project.build.directory}/${finalName}-lib folder. I want to keep these dependencies in that folder and change classpath entries to match ${finalName}-lib folder

Database error with Java Spring boot Project

I am trying to run a Java Spring Boot survey project (Maven Architecture) in my local machine by following steps — mvn clean package connect to created jar file java -jar target/filename.jar Open browser and browse to localhost:8080 Project is running ok, I can input survey data, but I am getting following error while trying to show result data from

Dockerfile to run a Java 11 class

I’m attempting to write the simplest docker file that will run a main class named InsertVolume in package scripts. Here is my Dockerfile : Here is the result of running command : When I then attempt to run the image using : I receive error : The mvn command mvn compile exec:java -Dexec.mainClass=”scripts.InsertVolume” runs successfully when I execute against the

Setting up multi-release JAR unit tests

I have a project that uses a lot of reflection, also on “new” Java features such as records and sealed classes. I’m writing a class like this: Of course, this only works in Java 16 and higher, so I’m trying to set up a multi-release JAR file, with a default implementation like this: I’ve been able to set that up

How to bundle a JAR file with its dependencies using maven

I am developing a Java agent using ByteBuddy, and I need the ByteBuddy library .jar file to be included in the agent .jar file. So far, in order for the agent to run smoothly, I need the ByteBuddy library .jar files to be present in the classpath both at compile time and at runtime. How can I bundle a .jar

Pi4j to use java with raspberry Pi not working

I am honestly about to just give up, i’ve tried so many different possibilities, for multiple weeks now, almost a month, of multiple problems. I am a new-ish programmer, especially with java, but i have a good understanding about java I am able to create a maven project no problem, i have no problems with the structure of java itself,

Upgrade to springboot 2.6.1 with querydsl jpa 5.0.0

I am trying to upgrade my springboot version from 2.3.4 to 2.6.1. I use query dsl with jpa and apt-maven-plugin. My issue is that I can’t no more generate the QClasses when I run maven compile. I noticed that I am no more able to use an older version of querydsl (previous one 4.4.0 and apt-maven-plugin 1.1.3). Now when I

Karaf-assembly and features: new and old method?

I am attempting to create a Java Maven OSGI Desktop Application which can be launched using Karaf. The project includes several bundles. I believe I need to create features and assemble them? From Karaf’s documentation it seems there is a new and “old” way. https://svn.apache.org/repos/asf/karaf/site/production/manual/latest/custom-distribution.html I am still confused about the following: In addition to my parent/child bundle projects, should

Advertisement