Tenho que dar manutenção em um sistema em java
com Maven
. Porem o sistema tem 3 projetos onde um se referencia com o outro, já tentei alterar o build path
adicionando projetos e etc. Até agora nada abaixo segue o arquivo 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>br.org.MyCompany</groupId>
<artifactId>inscricoes-cursos-backend</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>inscricoes-backend</name>
<parent> <!-- esta apresentando erro aqui nesta linha -->
<groupId>com.oracle.weblogic.archetype</groupId>
<artifactId>wls-common</artifactId>
<version>12.1.3-0-0</version>
<relativePath></relativePath>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.13</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-jaxrs</artifactId>
<version>1.9.13</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.ws.rs/javax.ws.rs-api -->
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.8.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.8.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.8.5</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>
<dependency>
<groupId>br.org.MyCompany</groupId>
<artifactId>gerador-boleto</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>br.org.MyCompany</groupId>
<artifactId>gerador-boleto</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<finalName>inscricoes-cursos-backend</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>com.oracle.weblogic</groupId>
<artifactId>weblogic-maven-plugin</artifactId>
<version>12.1.3-0-0</version>
<!-- You can find and redefine the following variables in the parent
pom file. oracleMiddlewareHome oracleServerUrl oracleUsername oraclePassword
oracleServerName -->
<configuration>
<middlewareHome>${oracleMiddlewareHome}</middlewareHome>
</configuration>
<executions>
<!--Deploy the application to the server -->
<execution>
<phase>pre-integration-test</phase>
<goals>
<goal>deploy</goal>
</goals>
<configuration>
<user>******</user>
<password>*****</password> <source>${project.build.directory}/${project.build.finalName}.${project.packaging}</source>
<target>ms_2</target>
<verbose>true</verbose>
<name>${project.build.finalName}</name>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
O erro apresentando na linha de parent
diz o seguinte.
"Project build error: Non-resolvable parent POM for br.org.MyCompany:inscricoes-cursos-backend:1.0-SNAPSHOT: Failure to find com.oracle.weblogic.archetype:wls-common:pom: 12.1.3-0-0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at no local POM"
Acho que tem que alterar alguma coisa nessa pasta .M2
mas não sei o que.
provavelmente rodar um comando parecido com esse:
mvn install:install-file -DpomFile=oracle-maven-sync-12.1.3.pom -Dfile=oracle-maven-sync-12.1.3.jar -DoracleHome=/Users/edwin/Oracle/JDevMiddleware12.1.3
Não faço a minima ideia do que esse comando esta fazendo portanto não sei o que alterar nele se for isso mesmo.
parent
indica que seu projeto, está herdando características do projetocom.oracle.weblogic.archetype:wls-common
. O erro quer dizer que esta projeto não está sendo encontrado no repositório domaven
que você está usando. Não sei do que se trata este archetype. Dando uma "googleada", aparece algo do tipo: docs.oracle.com/middleware/1212/wls/WLPRG/maven.htm#WLPRG585. Parece um bom ponto de partida. Antes de começar a dar manutenção em algum sistema, recomendo que você tente ao menos entender do que se trata.