I am trying to dockerize a simple Spring Boot Application, built with Maven. Dockerfile: When I run the .jar without the container (java -jar target/backend-1.0-SNAPSHOT.jar), everything works fine and the app is running. Now I create the container with docker build -t company/backend . But when I try to run …
Tag: maven
How to include a file from a directory above in Maven src.xml?
I want to include the .gitignore file in my Maven project when it is getting packaged. (My university wants the file so they can see that I used it the right way) But the .gitignore is on the …
Kafka Dependencies – ccs vs ce
To develop my Kafka connector I need to add a connect-API dependency. Which one I should use? For example mongodb connector use connect-api from maven central But links from dev guide go to https://packages.confluent.io/maven/org/apache/kafka/connect-api/5.5.0-ccs/ and beside 5.5.0-ccs there is also 5.5.0-ce …
Maven java project in Intellij IDEA 2019.3, JDK 11.0.3: Cannot resolve symbol ‘java’ but still compile
What I have: Intellij IDEA 2019.3, bundled JDK 11.0.3 A Maven project with project JDK: the bundled JDK My problem: For any java. imports I get the error Cannot resolve symbol … but I can still compile correctly. I’m totally aware that a lot of people already discussed this problem, and of course …
Removing a Version from a Maven Remote Repo
I have currently been working on my first Maven project and have run into some confusion with Maven versioning. I understand that while developing a new version the SNAPSHOT keyword should be used in the version number. I also understand that a non SNAPSHOT version should only be released once. I was wonderin…
Intellij Code Inspection for Custom Annotation
One of the problems I’ve encountered while using DTOs is that I often find myself shipping (accidentally) entities along with DTOs. To mitigate this problem, I created another Maven project with an annotation (@ValidDTO) and its processor that finds if a DTO annotated with @ValidDTO has @Entity annotate…
Unable to set Command Line profile in spring boot 2.2
Unable to run spring boot maven project with spring-profiles. I’ve tried the following commands which all return the same error mvn spring-boot:run -Dspring-boot.run.profiles=local mvn spring-boot:run -Dspring.profiles.active=local mvn spring-boot:run -Dspring-boot.profiles.active=local I’m using …
SpringBoot does not run unit tests when added into dependencyManagement
My project is supposed to be inherited from a custom parent and at the same time use Spring Boot. The standard solution for that is using <dependencyManagement> section as described here. The problem is when a Spring Boot dependency is added into the section, maven does not see any unit tests (Test runs…
Maven dependencies are failing with a 501 error
Recently Maven build jobs running in Jenkins are failing with the below exception saying that they couldn’t pull dependencies from Maven Central and should use HTTPS. I’m not sure how to change the requests from HTTP to HTTPS. Could someone guide me on this matter? [ERROR] Unresolveable build exte…
Maven installation issues: JAVA_HOME should point to a JDK not JRE?
I’m super new to CS and very unfamiliar with UNIX/Bash vocab. I’m currently trying to install Maven, and I made a few mistakes by copy pasting old installation instructions (with incorrect version numbers) and now the whole process is so messed up. I first tried to follow the given instructions on…