How to reference sibling module in a test for my maven spring boot multi-module project? - maven

How can I include a sibling module as a test dependency for my spring boot tests in maven?
I have a little multi-module maven project with a spring boot web app (querying-api ), a common library (domain-definitions), and an initializing script (database-loader).
I'm writing test cases in my querying-api module to test my API, and I would like to run my database-loader service before the tests begin to load the database with predefined test data, simultaneously testing that the loader still works. However I'm getting the following error when running mvn clean package:
[ERROR] Failed to execute goal on project querying-api: Could not resolve dependencies for project com.my.little.package:querying-api:jar:1.0.0: Failure to find com.my.little.package:database-loader:jar:1.0.0 in http://mycompanysnexusrepo.com/nexus/content/repositories/EAJAVA/ was cached in the local repository, resolution will not be reattempted until the update interval of EAJAVA has elapsed or updates are forced -> [Help 1]
The tests have no problem referencing the common domain-definitions library...
Parent 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>
<packaging>pom</packaging>
<name>my-little-project</name>
<description>Project for my little microservice</description>
<groupId>com.my.little.package</groupId>
<artifactId>my-little-project</artifactId>
<version>1.0.0</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.8.RELEASE</version>
<relativePath/>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<spring.security.version>2.3.5.RELEASE</spring.security.version>
<springfox.version>2.7.0</springfox.version>
</properties>
<modules>
<module>domain-definitions</module>
<module>database-loader</module>
<module>querying-api</module>
</modules>
<distributionManagement>
<repository>
<id>EAJAVA</id>
<url>http://mycompanysnexusrepo.com/nexus/content/repositories/EAJAVA/</url>
</repository>
</distributionManagement>
<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>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.my.little.package</groupId>
<artifactId>domain-definitions</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.my.little.package</groupId>
<artifactId>database-loader</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>
querying-api POM file (Spring boot app for querying the database):
<?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>
<artifactId>querying-api</artifactId>
<packaging>jar</packaging>
<name>querying-api</name>
<description>Spring boot app for querying the database</description>
<parent>
<groupId>com.my.little.package</groupId>
<artifactId>my-little-project</artifactId>
<version>1.0.0</version>
</parent>
<dependencies>
<dependency>
<groupId>com.my.little.package</groupId>
<artifactId>domain-definitions</artifactId>
</dependency>
<dependency>
<groupId>com.my.little.package</groupId>
<artifactId>database-loader</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>querying-api</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
domain-definitions POM file (Common library):
<?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>
<parent>
<groupId>com.my.little.package</groupId>
<artifactId>my-little-project</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>domain-definitions</artifactId>
<name>domain-definitions</name>
<description>Classes to define the structure of the tables</description>
</project>
database-loader POM file:
<?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>
<artifactId>database-loader</artifactId>
<packaging>jar</packaging>
<name>database-loader</name>
<description>Java script to load data into the database for the first time</description>
<parent>
<groupId>com.my.little.package</groupId>
<artifactId>my-little-project</artifactId>
<version>1.0.0</version>
</parent>
<dependencies>
<dependency>
<groupId>com.my.little.package</groupId>
<artifactId>domain-definitions</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

This might be because of the library jar not found in the local repository. You need to first execute :
mvn clean install.
This will install the lib jar in your local repository and maven can easily find it when you execute package goal.
Explained here: How are "mvn clean package" and "mvn clean install" different?
Furthermore, if you are using the sibling module only in tests then you can define the scope as test in dependency.
<dependency>
<groupId>com.my.little.package</groupId>
<artifactId>domain-definitions</artifactId>
<scope>test</scope>
</dependency>

Related

Generate parent pom for existing project modules

I have following project modules. Each of the modules have their own pom.xml . Now I want to generate a parent POM (for existing modules like below) . Is there a way to do that? I know there is a way we can do if we are creating brand new project but my need here is I already have a project structure.
project-module-1
project-module-2
project-module-3
project-module-4
Thank you for your help
You need revising your exising project a little, it is not too hard.
Your project structure like this
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.example</groupId>
<artifactId>sample-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<description>sample</description>
<url>http://example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<modules>
<module>project-module-1</module>
<module>project-module-2</module>
<module>project-module-3</module>
<module>project-module-4</module>
</modules>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
</plugins>
</build>
</project>
Child 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>
<parent>
<groupId>com.example</groupId>
<artifactId>sample-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>com.example</groupId>
<artifactId>project-module-1</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<description>sample</description>
<url>http://example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
</plugins>
</build>
</project>
Sample project source code: https://github.com/donhuvy/maven_parent_childs/archive/master.zip

Spring boot parent module not updating upon changes on child module

I am new to spring boot. I have created a spring multi module project with spring boot version 2.2.5.RELEASE.
ModuleA
<?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.2.5.RELEASE</version>
</parent>
<groupId>com.module</groupId>
<artifactId>modules</artifactId>
<version>0.0.1</version>
<packaging>pom</packaging>
<name>modules</name>
<description>Module Services</description>
<modules>
<module>moduleA</module>
<module>moduleB</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<type>pom</type>
<version>${spring.boot.version}</version>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>${spring.boot.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
ModuleB
<?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>com.module</groupId>
<artifactId>modules</artifactId>
<version>0.0.1</version>
</parent>
<groupId>com.moduleA</groupId>
<artifactId>moduleA</artifactId>
<version>0.0.0.1</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>${spring.boot.version}</version>
</dependency>
</dependencies>
</project>
ModuleC
<?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>com.module</groupId>
<artifactId>modules</artifactId>
<version>0.0.1</version>
</parent>
<groupId>com.moduleB</groupId>
<artifactId>moduleB</artifactId>
<version>0.0.0.1</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>${spring.boot.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
If I make any modification on ModuleB or ModuleC, these are not reflected in ModuleA.
I have tried the following two methods:
spring-boot:run
versions:set versions:update-child-modules -DnewVersion=0.0.2 -DprocessAllModules
How do I make the parent module update itself when updating sub-modules?
The modules should be organized in directories in the following structure:
module A
|___ module B
|___ module C
Note: In this setup module A is used only for module management. So, no sources except pom.xml should be defined in module A.
If you need only version propagation, then define dependencies for module B and module C in dependency management section of module A pom.xml and skip <version> in child modules:
<dependencyManagement>
<dependencies>
<!-- other dependencies -->
<dependency>
<groupId>your-package-here</groupId>
<artifactId>moduleB</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>your-package-here</groupId>
<artifactId>moduleC</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
If you want the changes in module B become available in module C - you should define artifacts for in module A (as in case above) and add dependency on module B in module C pom.xml:
<dependencies>
<!-- other dependencies -->
<dependency>
<groupId>your-package-here</groupId>
<artifactId>moduleB</artifactId>
</dependency>
</dependencies>

Multi module web application maven architecture with Spring boot

I'm building a web application that contains several modules and I want to split each of these modules to a single project. This is the first time I'm trying to do such thing, I used to make the application in one project and I don't want to start the development with a wrong architecture.
What I want to do:
--Maven parent project
-- main app: Spring boot, Database connection, authentication, user management.
-- Module 1,2 .. n: modules, repositories, controllers
So the idea is splitting the project by functionality on the use case perspective. The question is: can this architecture work without problems and how can I configure it with maven?
You need something like this:
1) have a parent pom that holds it all together, this is your parent that has a parent of spring-boot:
<?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>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.3.RELEASE</version>
</parent>
<groupId>com.essexboy</groupId>
<artifactId>boot-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>boot-library</module>
<module>boot-web</module>
</modules>
</project>
2) have as many library modules as you wish:
<?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>
<parent>
<artifactId>boot-parent</artifactId>
<groupId>com.essexboy</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>boot-library</artifactId>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
3) Then have as many spring boot modules as you wish that will pull in the required libraries from the same project:
<?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>
<parent>
<artifactId>boot-parent</artifactId>
<groupId>com.essexboy</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>boot-web</artifactId>
<dependencies>
<dependency>
<groupId>com.essexboy</groupId>
<artifactId>boot-library</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- tag::actuator[] -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- end::actuator[] -->
<!-- tag::tests[] -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- end::tests[] -->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

Multi-module Spring Boot project and inherited dependencies

Trying to understand why my effective pom is missing inherited dependencies.
I have a very simple set up, in fact, identical to the one shown in "Creating a Multi Module Project" guide on Spring.io.
The root 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>library</module>
<module>application</module>
</modules>
</project>
The library module pom.xml is this (notice my addition of com.google.http-client dependency:
<?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>gs-multi-module-library</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.8.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>com.google.http-client</groupId>
<artifactId>google-http-client</artifactId>
<version>1.22.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
The module that lists the "library" module as a dependency is this:
<?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>gs-multi-module-application</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.8.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.example</groupId>
<artifactId>gs-multi-module-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>
YET, the effective pom.xml does NOT show com.google.http-client as one of the dependencies for this last "application" module:
cd application
mvn help:effective-pom
Why is this happening and how do I make sure that regular maven dependency transitivity still works?
I tried the sample provided and I am seeing dependencies resolved as expected:
Effective POM(includes library reference):
Resolved dependencies(includes google-httpclient):
Here is the answer:
help:effective-pom does NOT show transitive dependencies.
To show all the dependencies that are brought in as a result of transitive dependencies, use:
mvn dependency:tree

Maven update POM and all the POM's that have dependencies to the changed POM

I have a project with the following structure.
D:\PROJECT\Services
and inside the services I have multiple maven projects, like this:
D:\PROJECT\Services\DTO
D:\PROJECT\Services\PERSON
...
And I want to update the POM version of the DTO project.
<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>
<parent>
<groupId>com.hijat2</groupId>
<artifactId>Hijat2-root-parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>hijat2-dto</artifactId>
<version>0.6.0-EPIC-6312-SNAPSHOT</version>
<name>hijat2-dto</name>
<description>Data transfer object library for P.</description>
<dependencies>
<dependency>
<groupId>com.hijat2</groupId>
<artifactId>hijat2-enum</artifactId>
<version>0.6.0-EPIC-6312-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
</plugins>
</build>
if I run this line:
mvn versions:set -DnewVersion=$RELEASE_VERSION -DautoVersionSubmodules=true
this will be changed:
...
<parent>
<groupId>com.hijat2</groupId>
<artifactId>Hijat2-root-parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>hijat2-dto</artifactId>
<version>NEW VERSION</version>
<name>hijat2-dto</name>
...
The question that I have is, how can I update all the POM files that have this POM file as a dependecy?
like this example for this project
D:\PROJECT\Services\PERSON
this is the POM with the DTO dependecy
<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>
<parent>
<groupId>com.hijat2</groupId>
<artifactId>Hijat2-root-parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>hijat2-ansiotiedot-service-if</artifactId>
<version>0.2.0-EPIC-6312-SNAPSHOT</version>
<packaging>jar</packaging>
<name>hijat2-ansiotiedot-service-if</name>
<dependencies>
<dependency>
<groupId>com.hijat2</groupId>
<artifactId>hijat2-dto</artifactId>
<version>0.6.0-EPIC-6312-SNAPSHOT</version> <------This version should be updated
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-client</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
</plugins>
</build>
Both files are in different folders, Is this possible to do?
Thanks in advance.

Resources