How do JVM build tools resolve dependencies with no identified version in the POM?

My project has a transitive dependency on Google’s guice library. Guice’s POM contains dependencies that have no version info. For example: <dependency> <groupId>javax.inject</groupId> <artifactId>javax.inject</artifactId> </dependency> I note that there is only one version of that particular library: 1. I also note that there is no <dependencyManagement> node in the POM. There is a <parent> node,… Read More How do JVM build tools resolve dependencies with no identified version in the POM?

error while building maven application. com.trampoline

Here’s my pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"&gt; <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.7.0</version> <relativePath /> <!– lookup parent from repository –> </parent> <groupId>com.trampoline.buddyto</groupId> <artifactId>sample-service</artifactId> <version>0.0.1-SNAPSHOT</version> <name>sample-service</name> <packaging>war</packaging> <description>sample-service</description> <properties> <java.version>1.8</java.version> <springfox-version>2.7.0</springfox-version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <scope>provided</scope> </dependency> <!– https://mvnrepository.com/artifact/io.springfox/springfox-swagger2 –> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.9.2</version> </dependency> <!– https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui –> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger-ui</artifactId>… Read More error while building maven application. com.trampoline

Change target directory for a specific profile in the pom file

In the pom file, we can override project.build.directory for a specific profile <profile> <id>foo</id> <build> <directory>${project.basedir}/foo_directory/target</directory> </build> </profile> My question is, what happens to other directories depending on project.build.directory? for example these two: <outputDirectory>${project.build.directory}/classes</outputDirectory> <testOutputDirectory>${project.build.directory}/test-classes</testOutputDirectory> If I run maven with foo profile and I use outputDirectory or testOutputDirectory will maven take into consideration the new… Read More Change target directory for a specific profile in the pom file

AWS Lambda java.lang.ClassNotFoundException: com.opencsv.exceptions.CsvException

I am getting below mentioned error while running code on AWS lambda – START RequestId: cd42e5ab-fbc8-4f50-8c4f-e8257525bd78 Version: $LATEST Error loading method handler on class com.test.myapp: java.lang.NoClassDefFoundError java.lang.NoClassDefFoundError: com/opencsv/exceptions/CsvException at java.base/java.lang.Class.getDeclaredMethods0(Native Method) at java.base/java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.base/java.lang.Class.privateGetPublicMethods(Unknown Source) at java.base/java.lang.Class.getMethods(Unknown Source) Caused by: java.lang.ClassNotFoundException: com.opencsv.exceptions.CsvException. Current classpath: file:/var/task/ I am working on IntelliJ created a JAR… Read More AWS Lambda java.lang.ClassNotFoundException: com.opencsv.exceptions.CsvException