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 the docker container with docker run -p 8080:8080 company/backend the
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 version. So, at this moment last versions are: 2.5.0 from maven central 5.5.0-ccs from packages.confluent.io/maven 5.5.0-ce from packages.confluent.io/maven What
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 I have tried all of it: Use
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 wondering if it were possible to delete an
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 annotated fields. This is my annotation. And, this is my processor. This is
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 2.2.5 and Maven 3.6.3 on Java 11 Edit: Adding Full Debug Logging from suggested command mvn spring-boot:run -Drun.jvmArguments=”-Dspring.profiles.active=local” -X I am getting practically the same logs with every
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 = 0). I reproduced that with artifacts
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 extension: Plugin org.apache.maven.wagon:wagon-ssh:2.1 or one of its dependencies could not be resolved:
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 the website, that didn’t work, then I tried a