Why is my Maven not using the defined BOM? - java

I am currently trying to introduce a BOM (bill of materials) file to my Maven project, but it does not seem to work and I have no clue, why.
This is my bom:
<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.private</groupId>
<artifactId>test.bom</artifactId>
<version>5.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
<version.CoreAnnotation>5.0.0-SNAPSHOT</version.CoreAnnotation>
<version.CoreWeb>5.0.0-SNAPSHOT</version.CoreWeb>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.private</groupId>
<artifactId>CoreAnnotation</artifactId>
<version> ${version.CoreAnnotation}</version>
<type>ejb</type>
</dependency>
<dependency>
<groupId>com.private</groupId>
<artifactId>CoreWeb</artifactId>
<version>${version.CoreWeb}</version>
<type>war</type>
</dependency>
</dependencies>
</dependencyManagement>
</project>
There are many more, but I excluded them because I think this should be enough as an example.
This is my pom (where I try to include the bom):
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>Core</artifactId>
<groupId>com.private</groupId>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>Core-ear</artifactId>
<packaging>ear</packaging>
<name>Core-ear: EAR Module for private</name>
<properties>
<version.test.bom>5.0.0-SNAPSHOT</version.test.bom>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.private</groupId>
<artifactId>test.bom</artifactId>
<version>${version.test.bom}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>
Whenever I use maven install there should be a collection of all packages defined in the dependencies section appear in the folder \target\Core-ear\
Now the problem: The dependencies defined in the bom don't appear there. What could be the problem?
ps: running mvn install -X for debugging does not seem to help.

This happens because you did not declare the dependencies in your POM. You only declared the <dependencyManagement> section.
In your POM, you need to add the following dependencies, without the version:
<dependencies>
<dependency>
<groupId>com.private</groupId>
<artifactId>CoreAnnotation</artifactId>
<type>ejb</type>
</dependency>
<dependency>
<groupId>com.private</groupId>
<artifactId>CoreWeb</artifactId>
<type>war</type>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.private</groupId>
<artifactId>test.bom</artifactId>
<version>${version.test.bom}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Refer to Introduction to the Dependency Mechanism: BOM are used to factor version of all the artifacts, so you don't need to add it in your <dependency> section.

Related

Issues related to ClassNotFoundException: org.springframework.boot.bind.RelaxedPropertyResolver

I've been trying to develop a pay system using the guidance from some video tutorials.
I've done everything as follows and upgrade the version of some dependencies.However, When I try to build this program I got an error:
Issues related to ClassNotFoundException: org/springframework/boot/bind/RelaxedPropertyResolver.
Here are my pom.xml files:
this is parent's 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.example</groupId>
<artifactId>springCloudLearning</artifactId>
<version>1.0-SNAPSHOT</version>
<modules>
<module>cloud-provider-payment8001</module>
</modules>
<packaging>pom</packaging>
<properties>
<maven.compiler.source>18</maven.compiler.source>
<maven.compiler.target>18</maven.compiler.target>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.6.2</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
this is the pom.xml of module
<?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">
<parent>
<artifactId>springCloudLearning</artifactId>
<groupId>org.example</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>cloud-provider-payment8001</artifactId>
<properties>
<maven.compiler.source>18</maven.compiler.source>
<maven.compiler.target>18</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.6.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<version>2.6.2</version>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>1.2.8</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.27</version>
</dependency>
</dependencies>
</project>
I thought that may be I mixed different versions, but I don't know how to fix it. Please help me ...
Well, I know why this happened.
I found mybatis-spring-boot-starter and druid-spring-boot-starter rely on the same dependency spring-boot-autoconfigure and their versions conflict with each other.
When I exclude spring-boot-autoconfigure in druid-spring-boot-starter, everything works! Thanks to idea's powerful dependency Diagram

Maven unpackage classes from jar dependency when builidn children project

I have two projects ALPHA and BETA. ALPHA project is jar file, on BETA im working. I wanna add classes from ALPHA to BETA using maven. I mean to BETA.jar. Is there way to do this? My pom file is below.
<?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>BETA</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.4.8.Final</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.18</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ALPHA</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<name>BETA</name>
</project>

Import and Dependency Management in Maven

I was learning about "import" scope in maven and did a sample project below,
Project_1 POM file :
<dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>
project_2 POM file :
<parent>
<groupId>com.sample</groupId>
<artifactId>project1</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
...
...
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.sample</groupId>
<artifactId>project1</artifactId>
<version>1.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
However, this throws an error stating that the JUnit packages are not available in Project2. When I remove the dependencyManagement tag from project_1 POM file. Everything works fine.
But as per the maven docs,
This scope is only supported on a dependency of type pom in the
section. It indicates the dependency to be
replaced with the effective list of dependencies in the specified
POM's section. Since they are replaced,
dependencies with a scope of import do not actually participate in
limiting the transitivity of a dependency.
I've done as mentioned in the docs, what went wrong here?
It looks like you're trying to use a bill-of-materials (BOM) POM and import that.
Your Project_1 is the BOM POM in this case, and you include all your project's dependencies in the <dependencyManagement> element. It looks like you're doing this correctly.
To import a BOM POM in your project however, you need both <dependencyManagement> and <dependencies>.
For example, your Project_2 pom.xml should include:
<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.sample</groupId>
<artifactId>project1</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<dependencyManagement>
<dependencies>
<!-- Imports the bill-of-materials POM. -->
<dependency>
<groupId>com.sample</groupId>
<artifactId>bom</artifactId>
<version>1.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- Add a dependency from the BOM POM.
Note: no version or scope is required, it's inherited from the BOM POM! -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
</dependencies>
</project>
Here is the BOM POM definition for the above example:
<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.sample</groupId>
<artifactId>bom</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>
There is documentation about this on the Apache Maven website (search for "bom").
Update:
BOM POMs and parent POMs are similar but different. BOM POMs are meant purely for importing dependencies into your project. Parent POMs are meant for multi-module projects, and allow you to define Maven coordinates, plugins, and dependencies that will be inherited by all of modules using the parent POM.
Here is an example of using an inherited dependency from a parent POM. Note that there are several elements included here that don't make sense in a BOM 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>
<parent>
<groupId>com.sample</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>project1</artifactId>
<packaging>jar</packaging>
<dependencies>
<!-- Inherited from the parent POM. -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
</dependencies>
</project>
Here is the parent POM definition for the above example:
<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.sample</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>child1</module>
<module>child2</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!--Global dependencies...-->
</dependencies>
<build>
<pluginManagement>
<!--Plugins...-->
</pluginManagement>
</build>
</project>
First Make sure you are using Maven version 2.0.9 or later that supports this functionality.
Second your Project1 Pom.Xml is missing the attribute "packaging" Make sure your packaging and type are of the same name so that it inherits all the dependencies.
Also your artifact Id and group ID has to be the same as your project 1's Pom.xml file for it to import the dependency
When in doubt refer to this link
https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies

Maven cyclic dependency

my maven project has multiple maven modules. Two of those modules (product and feature) are dependent on each other. When I include the modules as dependencies in the pom files, an ! mark appears on the modules. On running maven install I get this error.
The projects in the reactor contain a cyclic reference: Edge between
'Vertex{label='com.catalog:feature:0.0.1-SNAPSHOT'}' and
'Vertex{label='com.catalog:product:0.0.1-SNAPSHOT'}' introduces to
cycle in the graph com.catalog:product:0.0.1-SNAPSHOT -->
com.catalog:feature:0.0.1-SNAPSHOT --> com.catalog:product:0.0.1-
SNAPSHOT #
Without adding the dependencies Product can't access functions defined in Feature module and vice versa.
The parent 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.catalog</groupId>
<artifactId>catalog</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.2.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
<version>1.0.0.Final</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<version>4.3.1</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.enterprise</artifactId>
<version>4.2.0</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>5.0.0.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.4.1.Final</version>
</dependency>
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.12.1.GA</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>6.0.6</version>
</dependency>
</dependencies>
<modules>
<module>category</module>
<module>resource</module>
<module>hibernate</module>
<module>product</module>
<module>helper</module>
<module>feature</module>
</modules>
Product module pom.xml
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.catalog</groupId>
<artifactId>catalog</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>product</artifactId>
<name>product</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.catalog</groupId>
<artifactId>hibernate</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.catalog</groupId>
<artifactId>category</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.catalog</groupId>
<artifactId>helper</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.catalog</groupId>
<artifactId>feature</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
Feature module pom.xml
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.catalog</groupId>
<artifactId>catalog</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>com.catalog</groupId>
<artifactId>feature</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>feature</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.catalog</groupId>
<artifactId>hibernate</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.catalog</groupId>
<artifactId>product</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
Design smell.
Refactor your modules. Basically everything which is needed in both modules should go into a common dependency. You cannot have cycles in your dependency tree, it just won't work.
Update: As this answer is occasionally getting a new upvote, I wanted to mention: the "tree" in "dependency tree" refers to a tree from graph theory, which means that by definition you cannot have cycles :)
It may not work for your particular situation but another option to rectify cyclical dependencies is to use events.
First, set your modules up in a tree with no cyclical dependencies. Put your Event classes at the top of the tree. Then publish and listen for events in any of the modules. This allows you to have modules that communicate with each other without depending on each other.
For how to publish and listen for events in Spring see:
https://spring.io/blog/2015/02/11/better-application-events-in-spring-framework-4-2

maven multi-module project with jersey & spring

I've been referring stackoverflow questions for quite some time. now i have got one of my own. I'm basically trying to create a Rest webservice with Jersey 2.22.1. I'm using this archetype to create a maven jersey project from section 1.4 here
mvn archetype:generate -DarchetypeArtifactId=jersey-quickstart-webapp \
-DarchetypeGroupId=org.glassfish.jersey.archetypes -DinteractiveMode=false \
-DgroupId=com.example -DartifactId=simple-service-webapp -Dpackage=com.example \
-DarchetypeVersion=2.22.1
This generates a sample rest jersey webservice. Now i want to access mongodb through this webservice. I'm trying to create a separate jar maven project that uses spring to connect to mongodb. its structure is
com.yuvi.mongo.service
com.yuvi.mongo.dao
I have a main class inside service which loads spring context , retrieve dao bean n performs db access.
Now i want to connect these two projects.
I created a parent project, included these 2 as its modules and added mongo as dependency in service. but when i try to access package com.yuvi.mongo from my service it shows package not found error. I created two simple maven projects and followed same procedure for creating multi-module projects that was working perfectly. but when i try it here i can't access the package. I'm displaying my pom files here.,
parent pom
<?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.yuvi</groupId>
<artifactId>Parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>Mongo</module>
<module>RService</module>
</modules>
</project>
Mongo pom
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.yuvi</groupId>
<artifactId>Parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>com.yuvi.mongo</groupId>
<artifactId>Mongo</artifactId>
<name>Mongo</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring-version>4.2.3.RELEASE</spring-version>
<mongodb-version>1.8.1.RELEASE</mongodb-version>
</properties>
<dependencies>
<!-- Spring 4 dependencies -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb</artifactId>
<version>${mongodb-version}</version>
</dependency>
</dependencies>
</project>
RService 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>
<parent>
<groupId>com.yuvi</groupId>
<artifactId>Parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>com.yuvi.service</groupId>
<artifactId>RService</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>RService</name>
<build>
<finalName>RService</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<inherited>true</inherited>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.yuvi.mongo</groupId>
<artifactId>Mongo</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey</groupId>
<artifactId>jersey-bom</artifactId>
<version>${jersey.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<!-- use the following artifactId if you don't need servlet 2.x compatibility -->
<!-- artifactId>jersey-container-servlet</artifactId -->
</dependency>
<!-- uncomment this to get JSON support
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-moxy</artifactId>
</dependency>
-->
</dependencies>
<properties>
<jersey.version>2.22.1</jersey.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>

Categories

Resources