Я пытаюсь перенести мой существующий многомодульный проект Ant на Maven.Я успешно сгенерировал соответствующие файлы POM и добавил правильные зависимости.Но для конкретного модуля сборка постоянно завершается с ошибкой StackOverflowError.Моя структура проекта выглядит следующим образом:
OALSCMProdDataSync
|
---Properties
|
---Utilities
|
---Model
|
---RESTClient
|
---RESTServices
|
---EARModule
. В этом случае файлы «Свойства» и «Утилиты» создаются правильно, но при построении модели последовательно происходит сбой с этой ошибкой:
Exception in thread "main" java.lang.StackOverflowError
at java.util.IdentityHashMap.hash(IdentityHashMap.java:294)
at java.util.IdentityHashMap.get(IdentityHashMap.java:328)
at org.eclipse.aether.util.graph.transformer.ConflictResolver$ConflictContext.isIncluded(ConflictResolver.java:1062)
at org.eclipse.aether.util.graph.transformer.NearestVersionSelector$1.accept(NearestVersionSelector.java:145)
at org.eclipse.aether.util.graph.visitor.PathRecordingDependencyVisitor.visitEnter(PathRecordingDependencyVisitor.java:93)
at org.eclipse.aether.graph.DefaultDependencyNode.accept(DefaultDependencyNode.java:334)
Примечание. Требуемые зависимостидля модуля Model правильно загружен в моем хранилище .m2.
Любое предложение приветствуется.Добавление файлов POM из 3 модулей.
POM для свойств (успешно создан):
<?xml version="1.0" encoding="UTF-8" ?>
<project xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>OALSCMProdDataSync</groupId>
<artifactId>Properties</artifactId>
<version>1.0-SNAPSHOT</version>
<description>Generated POM from JDeveloper for project Properties</description>
<dependencies>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.6.1</version>
<!--<type>pom</type>-->
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.6.1</version>
<!--<type>pom</type>-->
<scope>compile</scope>
</dependency>
<dependency>
<groupId>oal.util.logger</groupId>
<artifactId>LoggerApp</artifactId>
<version>16.4</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>lib_rel</id>
<name>lib_rel</name>
<url>https://artifactory-slc.oraclecorp.com/artifactory/libs-release</url>
</repository>
</repositories>
<build>
<sourceDirectory>src/</sourceDirectory>
<resources>
<resource>
<directory>${basedir}</directory>
<includes>
<include>*</include>
</includes>
</resource>
</resources>
<outputDirectory>classes/</outputDirectory>
</build>
</project>
POM для утилит (успешно создан):
<?xml version="1.0" encoding="UTF-8" ?>
<project xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>OALSCMProdDataSync</groupId>
<artifactId>Utilities</artifactId>
<version>1.0-SNAPSHOT</version>
<description>Generated POM from JDeveloper for project Utilities</description>
<dependencies>
<dependency>
<groupId>OALSCMProdDataSync</groupId>
<artifactId>Properties</artifactId>
<version>1.0-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20170516</version>
</dependency>
<dependency>
<groupId>com.oracle.adf.library</groupId>
<artifactId>Java-EE</artifactId>
<version>12.2.1-2-0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.6.1</version>
<!--<type>pom</type>-->
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.6.1</version>
<!--<type>pom</type>-->
<scope>compile</scope>
</dependency>
<dependency>
<groupId>oal.util.logger</groupId>
<artifactId>LoggerApp</artifactId>
<version>16.4</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.9</version>
</dependency>
<dependency>
<groupId>com.oracle.adf.library</groupId>
<artifactId>JAX-RS-Jersey-2.x-Client</artifactId>
<version>12.2.1-2-0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.oracle.em</groupId>
<artifactId>jps-api</artifactId>
<version>12.2.1-2-0</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>lib_rel</id>
<name>lib_rel</name>
<url>https://artifactory-slc.oraclecorp.com/artifactory/libs-release</url>
</repository>
</repositories>
<build>
<sourceDirectory>src/</sourceDirectory>
<resources>
<resource>
<directory>${basedir}</directory>
<includes>
<include>*</include>
</includes>
</resource>
</resources>
<outputDirectory>classes/</outputDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
POMдля модели (при ошибке StackoverflowError):
<?xml version="1.0" encoding="UTF-8" ?>
<project xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>OALSCMProdDataSync</groupId>
<artifactId>Model</artifactId>
<version>1.0-SNAPSHOT</version>
<description>Generated POM from JDeveloper for project Model</description>
<dependencies>
<dependency>
<groupId>OALSCMProdDataSync</groupId>
<artifactId>Utilities</artifactId>
<version>1.0-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>OALSCMProdDataSync</groupId>
<artifactId>Properties</artifactId>
<version>1.0-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.oracle.adf.library</groupId>
<artifactId>TopLink</artifactId>
<version>12.2.1-2-0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.oracle.adf.library</groupId>
<artifactId>Oracle-XML-Parser-v2</artifactId>
<version>12.2.1-2-0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.oracle.adf.library</groupId>
<artifactId>BC4J-Runtime</artifactId>
<version>12.2.1-2-0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.oracle.adf.library</groupId>
<artifactId>ADF-Model-Runtime</artifactId>
<version>12.2.1-2-0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.oracle.adf.library</groupId>
<artifactId>MDS-Runtime</artifactId>
<version>12.2.1-2-0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.oracle.adf.library</groupId>
<artifactId>MDS-Runtime-Dependencies</artifactId>
<version>12.2.1-2-0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.oracle.adf.library</groupId>
<artifactId>BC4J-Security</artifactId>
<version>12.2.1-2-0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.oracle.adf.library</groupId>
<artifactId>Oracle-JDBC</artifactId>
<version>12.2.1-2-0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.oracle.adf.library</groupId>
<artifactId>BC4J-Oracle-Domains</artifactId>
<version>12.2.1-2-0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.oracle.adf.library</groupId>
<artifactId>Java-EE</artifactId>
<version>12.2.1-2-0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.oracle.adf.library</groupId>
<artifactId>EJB</artifactId>
<version>12.2.1-2-0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.oracle.adf.library</groupId>
<artifactId>ADF-Common-Runtime</artifactId>
<version>12.2.1-2-0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20170516</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.6.1</version>
<!--<type>pom</type>-->
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.6.1</version>
<!--<type>pom</type>-->
<scope>compile</scope>
</dependency>
<dependency>
<groupId>oal.util.logger</groupId>
<artifactId>LoggerApp</artifactId>
<version>16.4</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>lib_rel</id>
<name>lib_rel</name>
<url>https://artifactory-slc.oraclecorp.com/artifactory/libs-release</url>
</repository>
</repositories>
<build>
<sourceDirectory>src/</sourceDirectory>
<resources>
<resource>
<directory>${basedir}</directory>
<includes>
<include>*</include>
</includes>
</resource>
</resources>
<outputDirectory>classes/</outputDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>