P
P
parkito2016-12-01 02:28:11
Java
parkito, 2016-12-01 02:28:11

How to build a project of projects in maven?

Hello. Help, please, to solve a problem.
I want to divide a large project (MVC + SOAP) into services.
Main pom-nickname

<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.ChatRoom</groupId>
    <artifactId>ChatRoom</artifactId>
    <packaging>pom</packaging>
    <version>1.0</version>
    <name>ChatRoom Maven Webapp</name>
    <url>http://maven.apache.org</url>

    <modules>
        <module>soapService</module>
        <module>portalService</module>
    </modules>

</project>

SAOP
<groupId>com.SOAP</groupId>
    <artifactId>SOAP</artifactId>
    <version>1.0</version>
    <packaging>jar</packaging>
    <name>SOAP</name>
    <description>SOAP service</description>

    <parent>
        <groupId>com.ChatRoom</groupId>
        <artifactId>ChatRoom</artifactId>
        <version>1.0</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
...

 <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <compilerArgument>-Xlint:all</compilerArgument>
                    <showWarnings>true</showWarnings>
                    <showDeprecation>true</showDeprecation>
                </configuration>
            </plugin>

Likewise for MVC.
Everything is powered by Spring. What needs to be specified to maven so that it can collect two subprojects into one varnik and deploy it to tomcat. Or he would create a varnik for the project and at the same time would make them.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly Vitrenko, 2016-12-01
@Vestail

Make another project, and add the rest of the project to it as dependencies in<dependencies>

E
Eugene, 2016-12-01
@zolt85

You can try EAR .
I warn you, this is a "bloody enterprise"!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question