Why the maven child referencing versions from BOM does not work? - java

I created this example POM file so that I do not need the dependency versions replicated in each child project. My requirement is that the thirdparty version need not be provided for each project. Each project should inherit the library versions from the bom file. I created the example based on the documentation of Maven dependencies. My maven version is Apache Maven 3.2.5
I am getting the error below
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.test.testapp:test-app:1.0-SNAPSHOT (/Users/skoya/workspace/test-app/pom.xml) has 2 errors
[ERROR] 'dependencies.dependency.version' for junit:junit:jar is missing. # line 22, column 17
[ERROR] 'dependencies.dependency.version' for commons-cli:commons-cli:jar is missing. # line 26, column 17
root bom pom file
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.test</groupId>
<artifactId>bom</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>test-dependencies-bom</name>
<url>http://myorg.org</url>
<properties>
<commons-cli.version>1.3</commons-cli.version>
<junit.version>3.8.1</junit.version>
</properties>
<modules>
<module>test-dependencies</module>
</modules>
</project>
test-dependencies/pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.test</groupId>
<artifactId>test-parent-pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>test-parent-pom</name>
<url>http://maven.apache.org</url>
<parent>
<groupId>org.test</groupId>
<artifactId>bom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<prerequisites>
<maven>3.0.0</maven>
</prerequisites>
<dependencies>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>${commons-cli.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
</dependency>
</dependencies>
</project>
Maven project files referencing the bom file
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.test.testapp</groupId>
<artifactId>test-app</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>test-app</name>
<url>http://maven.apache.org</url>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.test</groupId>
<artifactId>bom</artifactId>
<version>0.0.1-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
</dependency>
</dependencies>
</project>

There are 2 issues:
For importing of dependencies, the imported pom project (test-dependencies/pom.xml) should define the dependencies to import in a <dependencyManagement> section, not just <dependencies> as was done in your original sample.
The project that imports that pom needs to import the project that declares the dependencies (test-dependencies/pom.xml), not the parent pom.xml.
I fixed this by making the following changes.
test-dependencies/pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.test</groupId>
<artifactId>test-parent-pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>test-parent-pom</name>
<url>http://maven.apache.org</url>
<parent>
<groupId>org.test</groupId>
<artifactId>bom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<prerequisites>
<maven>3.0.0</maven>
</prerequisites>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>${commons-cli.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
Maven project files referencing the bom file
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.test.testapp</groupId>
<artifactId>test-app</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>test-app</name>
<url>http://maven.apache.org</url>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.test</groupId>
<artifactId>test-parent-pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
</dependency>
</dependencies>
</project>
After that, I was able to build and verify that the project importing the pom was bringing in the expected dependencies:
mvn dependency:tree
...
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) # test-app ---
[INFO] org.test.testapp:test-app:jar:1.0-SNAPSHOT
[INFO] +- junit:junit:jar:3.8.1:compile
[INFO] \- commons-cli:commons-cli:jar:1.3:compile
Note that it still successfully pulled the version numbers as defined in properties from the parent pom.xml. This a perfectly valid way to structure the project. It just needed the 2 adjustments I described.

Related

maven multi-module project not running

I have developed a multi-module project with Java spring boot on IntelliJ.
This is runnable in the IDE without any problem via 'run Application' where 'Application' is my SpringBootApplication and located in a submodule of the parent module.
Now I want to run this system on a server and I am unable to get it running. I tried
mvn spring-boot:run
and I get following error:
Error: Could not find or load main class com.example.application.Application
Caused by: java.lang.ClassNotFoundException: com.example.application.Application
I also tried other commands like
mvn clean package
where I get errors saying that packages from the 'shared_model' (succesfully compiled - because no dependencies of other modules) do not exist (although they exist), while trying to compile 'aggregate'-package (depending on 'shared_model'), e.g.:
[ERROR] /.../aggregates/src/main/java/com/example/aggregates/.../.java:[3,52] package com.example.shared_model.... does not exist
[ERROR] /.../aggregates/src/main/java/com/example/aggregates/.../.java:[13,12] cannot find symbol
The file structure looks like this:
main
├── adapters-input
├── adapters-output
├── aggregates
├── application
├── application-services
└── shared_model
Where every package has its own pom-file.
The pom of the parent module looks as follows:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>main</artifactId>
<packaging>pom</packaging>
<version>0.0.1-SNAPSHOT</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.1</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<java-version>11</java-version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<modules>
<module>adapters-output</module>
<module>adapters-input</module>
<module>application-services</module>
<module>aggregates</module>
<module>application</module> <!-- location of main class -->
<module>shared_model</module>
</modules>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>com.example.application.Application</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</project>
The pom of the 'application'-package looks as follows:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.1</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>application</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>application</name>
<description>Application endpoint</description>
<properties>
<java.version>11</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.example</groupId>
<artifactId>adapters-input</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.example</groupId>
<artifactId>shared_model</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.example</groupId>
<artifactId>adapters-output</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.example</groupId>
<artifactId>application-services</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.example</groupId>
<artifactId>aggregates</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
</project>
I tried a lot of things and became a little desperate. It seems like there is an issue with seeing sibling-modules and child-modules, but I don't see why. Also, I don't understand why it is working smoothly from when ran from IntelliJ.
I greatly appreciate any help. Thanks!

Spring boot library and application structure

I am implementing a Microservice library, which can be used by other developers to create microservices without taking the pain of implementing internal features like health, metrics, Kafka communication etc.
I am planning to create a multi-module maven project and I will install the library jar separately and this jar will be added as dependency in the application pom.xml.
This is the folder structure I am using:
Library
MicroServiceLibrary
|
|____mvnw
|
|____pom.xml
|
|____src/
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.oracle.ofsc</groupId>
<artifactId>microservice-library</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.5.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
</dependency>
</dependencies>
</project>
Application
MicroServiceApplication
|
|____mvnw
|
|____pom.xml
|
|____application/
|
|___pom.xml
|
|___src/
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework</groupId>
<artifactId>gs-multi-module</artifactId>
<version>0.1.0</version>
<packaging>pom</packaging>
<modules>
<module>application</module>
</modules>
application/pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.oracle.ofsc</groupId>
<artifactId>microservice-application</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.5.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<!--dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.oracle.ofsc</groupId>
<artifactId>microservice-library</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Here are my questions:
1. Am I implementing the right directory structure?
2. What is the purpose of pom.xml inside MicroServiceApplication?
3. Where should I specify spring-boot-starter-parent artifact - In library or application pom.xml?
Am I implementing the right directory structure?
This is totally up to your project module structure. But, you need one pom.xml at project root folder.
What is the purpose of pom.xml inside MicroServiceApplication?
You need pom.xml to download required jar from maven central repository.
Where should I specify spring-boot-starter-parent artifact - In library or application pom.xml?
As far as I understood, they are microservice and they might be running independent. right ? Then, you should include spring-boot-starter-parent in both.

Maven: Jersey 2 dependency not working

I am new to maven and jersey and try to put a dependency of jersey into my pom.xml.
Regarding
http://search.maven.org/#artifactdetails%7Corg.glassfish.jersey%7Cproject%7C2.27%7Cpom
the dependency should be
<dependency>
<groupId>org.glassfish.jersey</groupId>
<artifactId>project</artifactId>
<version>2.27</version>
</dependency>
But if I put that in the pom, then I get an error.
[ERROR] Failed to execute goal on project mytest: Could not resolve dependencies for project mytest:mytest:jar:1.0-SNAPSHOT: Could not find artifact org.glassfish.jersey:project:jar:2.27 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
I created the project completely new.
mvn archetype:generate -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false -DgroupId=mytest -DartifactId=mytest
Thats my pom.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>mytest</groupId>
<artifactId>mytest</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>mytest</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey</groupId>
<artifactId>project</artifactId>
<version>2.27</version>
</dependency>
</dependencies>
</project>
Whats the problem??
Thanks for help!

maven dependency version issues

I just got in issue related to Maven and Dependent JAR version. I create following project to analyze issue.
I created App_1.jar which is using spring version 4.2.9.
I created App_2.jar which is using spring version 4.3.4.
I created App_3.jar which is using spring version 4.3.6.
I created App_Main.war which will App_1.jar, App_2.jar, App_3.jar.
According to maven if you use different version it will use the latest one but in my case it using the spring version of jar which i included first which is App_1.jar and its version is 4.2.9.
Here is the code.
**App_1 POM.xml**
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ksh</groupId>
<artifactId>App_1</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<name>App_1</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.2.9.RELEASE</version>
</dependency>
</dependencies>
</project>
**App_2 POM.xml**
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ksh</groupId>
<artifactId>App_2</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<name>App_2</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.3.4.RELEASE</version>
</dependency>
</dependencies>
</project>
**App_3 POM.xml**
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ksh</groupId>
<artifactId>App_3</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<name>App_3</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.3.6.RELEASE</version>
</dependency>
</dependencies>
</project>
App_Main POM.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.app</groupId>
<artifactId>App_Main</artifactId>
<packaging>war</packaging>
<version>1.0</version>
<name>App_Main Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>com.ksh</groupId>
<artifactId>App_1</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.ksh</groupId>
<artifactId>App_2</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.ksh</groupId>
<artifactId>App_3</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
<build>
<finalName>App_Main</finalName>
</build>
</project>
Where did you read maven use the latest one?
For transitives dependencies Maven uses a "nearest-wins" strategy to resolves version conflicts, and that means it will use the version of the closest dependency to your project in the tree of dependencies.
Maven transitive dependencies
One possible solution is use the <dependencyManagement> to resolve your conflicts.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>spring_context_version_you_want_to_use</version>
</dependency>
</dependencies>
</dependencyManagement>
Maven dependency managament
You can check your tree of dependencies with the command:
mvn dependency:tree -Dverbose -Dincludes=your-jar
Resolving conflicts using the dependency tree

Why I get cannot be resolved with maven project

I am building a Dropwizard project.
(start with:https://dropwizard.github.io/dropwizard/getting-started.html)
I create a project in eclipse, but don't understand why I get "cannot be resolved".
This is errors:
This is pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>foo.bar.app</groupId>
<artifactId>mvn-test</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>mvn-test</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<dropwizard.version>INSERT VERSION HERE</dropwizard.version>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-core</artifactId>
<version>${dropwizard.version}</version>
</dependency>
</dependencies>
</project>
Any one can help?
I don't know how to import the package, i really have no idea with maven dependency.
Thanks.
You have to define ${dropwizard.version} tag between in pom.xml like this :
<properties>
<dropwizard.version>0.7.0</dropwizard.version>
</properties>
You have to insert your specific dropwizard.version:
<dropwizard.version>**INSERT VERSION HERE**</dropwizard.version>
so it can be used in your pom:
<version>${dropwizard.version}</version>

Categories