Non-resolvable parent POM for From Docker - spring-boot

Hi I'm trying to run the following dockerfile which should:
create a fat jar springboot
and run it
FROM openjdk:17-alpine as build
WORKDIR /workspace/app
COPY mvnw .
COPY .mvn .mvn
COPY pom.xml .
COPY src src
RUN ./mvnw install -DskipTests
RUN mkdir -p target/dependency && (cd target/dependency; jar -xf ../*.jar)
FROM openjdk:8-jdk-alpine
VOLUME /tmp
ARG DEPENDENCY=/workspace/app/target/dependency
COPY --from=build ${DEPENDENCY}/BOOT-INF/lib /app/lib
COPY --from=build ${DEPENDENCY}/META-INF /app/META-INF
COPY --from=build ${DEPENDENCY}/BOOT-INF/classes /app
EXPOSE 8080
ENTRYPOINT ["java", "-Dspring.profiles.active=${ENV}", "-Djasypt.encryptor.password=${MASTER_PASSWORD}", "-jar", "app.jar"]
when I launch the docker build.
Sending build context to Docker daemon 72.35MB
Step 1/16 : FROM openjdk:17-alpine as build
---> 264c9bdce361
Step 2/16 : WORKDIR /workspace/app
---> Using cache
---> e9b5dd3bdd5d
Step 3/16 : COPY mvnw .
---> Using cache
---> eb136deee21e
Step 4/16 : COPY .mvn .mvn
---> Using cache
---> bbda18e60e07
Step 5/16 : COPY pom.xml .
---> b7ae10a2559c
Step 6/16 : COPY src src
---> 8f73e87e80ca
Step 7/16 : RUN ./mvnw install -DskipTests
---> Running in 1b0bd104bad8
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.florence:blockforgery.backend:1.0-SNAPSHOT: Could not find artifact com.florence:blockforgery.masterpom:pom:1.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM # line 11, column 13
#
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.florence:blockforgery.backend:1.0-SNAPSHOT (/workspace/app/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for com.florence:blockforgery.backend:1.0-SNAPSHOT: Could not find artifact com.florence:blockforgery.masterpom:pom:1.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM # line 11, column 13 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
The command '/bin/sh -c ./mvnw install -DskipTests' returned a non-zero code: 1
This is the POM of my 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>
<groupId>com.florence</groupId>
<artifactId>blockforgery.backend</artifactId>
<version>1.0-SNAPSHOT</version>
<parent>
<groupId>com.florence</groupId>
<artifactId>blockforgery.masterpom</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<properties>
<start-class>com.florence.blockforgery.Application</start-class>
</properties>
<dependencies>
<dependency>
<groupId>com.florence</groupId>
<artifactId>blockforgery.common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
<mainClass>${start-class}</mainClass>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
While this is the 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.florence</groupId>
<artifactId>blockforgery.masterpom</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.0</version>
<relativePath />
</parent>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<aws.version>1.12.163</aws.version>
<maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
<junit.jupiter.version>5.7.0</junit.jupiter.version>
<junit.platform.version>1.8.1</junit.platform.version>
<java-ipfs-http-client.version>v1.3.3</java-ipfs-http-client.version>
<log4j.version>2.17.2</log4j.version>
<mockito.version>4.3.1</mockito.version>
<spring.version>2.6.4</spring.version>
<aws.java.sdk.version>2.17.152</aws.java.sdk.version>
<apache.http>4.5.13</apache.http>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>${aws.java.sdk.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.6.9</version>
</dependency>
<dependency>
<groupId>org.web3j</groupId>
<artifactId>web3j-spring-boot-starter</artifactId>
<version>1.6.0</version>
</dependency>
<dependency>
<groupId>com.github.ulisesbocchio</groupId>
<artifactId>jasypt-spring-boot-starter</artifactId>
<version>3.0.4</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>com.github.ipfs</groupId>
<artifactId>java-ipfs-http-client</artifactId>
<version>${java-ipfs-http-client.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>auth</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>dynamodb</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>dynamodb-enhanced</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>sqs</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.22</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
<version>2.5.5</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.9.1</version>
</dependency>
<dependency>
<groupId>net.lingala.zip4j</groupId>
<artifactId>zip4j</artifactId>
<version>2.9.1</version>
</dependency>
<dependency>
<groupId>org.web3j</groupId>
<artifactId>core</artifactId>
<version>4.8.7</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite-api</artifactId>
<version>${junit.platform.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite</artifactId>
<version>${junit.platform.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.22</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<id>rhazdev</id>
<url>https://mymavenrepo.com/repo/NIp3fBk55f5oF6VI1Wso/</url>
</repository>
<repository>
<id>florence-nexus-blockforgery</id>
<url>https://nexus.florence-consulting.it/nexus/repository/maven-blockforgery/</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>florence-nexus-blockforgery-releases</id>
<name>Internal Releases</name>
<url>https://nexus.florence-consulting.it/nexus/repository/maven-blockforgery-release/</url>
</repository>
<snapshotRepository>
<id>florence-nexus-blockforgery-snapshots</id>
<name>Internal Snapshots</name>
<url>https://nexus.florence-consulting.it/nexus/repository/maven-blockforgery-snapshot/</url>
</snapshotRepository>
</distributionManagement>
</project>
I state that by running the:
mvn clean install -DskkipTests
command from the console on Ubuntu everything works correctly.
These are my configurations:
Maven Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
JAVA openjdk 17.0.3 2022-04-19
DOCKER Docker version 20.10.17, build 100c701
S.O. Ubuntu 20.04
Thank you very much for helping

Your parent blockforgery.masterpom is not installed in your container, nor deployed in a repository manager (nexus, artifactory, ...)
Either you publish the parent pom somewhere, or you'll have to push to your container and build the parent also.

Related

Error while trying to clean install, 409 conflict

I'm trying to integrate jFrog with Gitlab, working with maven and spring framework
I have this error when doing the commit
This is the pom.xml I'm using
<?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.6.3</version>
<relativePath/>
</parent>
<groupId>com.engine</groupId>
<artifactId>enginebe</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>enginebe</name>
<description>enginebe</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
<version>0.11.2</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<version>0.11.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
<version>0.11.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.8.1</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>snapshots</id>
<name>xxxx-libs-snapshot</name>
<url>https://xxx.jfrog.io/artifactory/xxx-libs-snapshot</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
And the gitlab pipeline is like this
# This file is a template, and might need editing before it works on your project.
image: maven:latest
before_script:
# Install JFrog CLI
- curl -fL https://getcli.jfrog.io | sh
# Configure Artifactory instance with JFrog CLI
- ./jfrog rt config --url=$ARTIFACTORY_URL --user=$ARTIFACTORY_USER --password=$ARTIFACTORY_PASS
- ./jfrog rt c show
# Set the M2_HOME environment variable
- export M2_HOME=/usr/share/maven
# Replace the repository name in the configuration.yml to the correct one.
- sed -i 's,MAVEN_REPO_KEY,'"$MAVEN_REPO_KEY"',g' configuration.yml
build:
script:
# Run the MVN command
- ./jfrog rt mvn "clean install" configuration.yml --build-name=gitlabci-maven-artifactory --build-number=$CI_JOB_ID
# Collect the environment variables
- ./jfrog rt bce gitlabci-maven-artifactory $CI_JOB_ID
# Pass the build information to Artifactory
- ./jfrog rt bp gitlabci-maven-artifactory $CI_JOB_ID
only:
- main
I know the problem due to , pom.xml not specified, I'm not sure if I should add something to jFrog or just change something to the pom.xml file
I tried mvn deploy in the terminal and it was successful, it deployed the jar and pom to the artifactory, but with gitlab pipeline it does not work.
The 409 error you receive indicates an issue with the pom.xml.
In the pom.xml above I noticed you added "relativePath" closure but without opening it or specifying it. I think the pom validator doesn't like that.
Regardless, you can tell Artifactory to ignore this kind of issue by ticking the "Suppress POM Consistency" box in the repository configuration page.
For more information on this flag, you can read JFrog documentation here.

Maven Failed to deploy artifacts: Could not find artifact - CodeArtifact

I'm trying to deploy an artifact on AWS CodeArtifact using CodeBuild. I was able to do the same with other artifacts in the same repository, but on this one I have the following error message:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy)
on project common-api: Failed to deploy artifacts:
Could not find artifact it.friendshome.api:common-api:jar:0.0.16 in friendshome-private-maven-repo
(https://friendshome-243132787362.d.codeartifact.eu-south-1.amazonaws.com/maven/private-maven-repo/)
This is the pom.xml 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 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.5.2</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>it.friendshome.api</groupId>
<artifactId>common-api</artifactId>
<version>0.0.16</version>
<name>common-api</name>
<description>FriendsHome User Common API</description>
<properties>
<java.version>11</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.zalando</groupId>
<artifactId>logbook-spring-boot-starter</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/com.auth0/java-jwt -->
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>3.16.0</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<version>6.6</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source> <!-- depending on your project -->
<target>${java.version}</target> <!-- depending on your project -->
</configuration>
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>friendshome-private-maven-repo</id>
<name>friendshome-private-maven-repo</name>
<url>https://friendshome-243132787362.d.codeartifact.eu-south-1.amazonaws.com/maven/private-maven-repo/</url>
</repository>
</distributionManagement>
This is the custom settings.xml used:
<settings>
<servers>
<server>
<id>friendshome-private-maven-repo</id>
<username>aws</username>
<password>${env.CODEARTIFACT_TOKEN}</password>
</server>
</servers>
</settings>
I cannot understand why, in the deploy phase, Maven is not able to find the package I was deploying in that moment in the repo (and why it is looking for it).
I managed this problem creating a new repo on CodeArtifact. I suppose that something was wrong in the repo I was managing, but I didn't changed any configuration.

Maven Failed to initialize ear modules: Unknown artifact type[zip] for release-documentation

Environment:
Java 11
Maven 3.6.3
I added the following dependency on submodule pom.xml EJB and the problem came up
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-ri</artifactId>
<version>2.3.3</version>
<type>pom</type>
</dependency>
pom.xml root
<dependencyManagement>
<dependencies>
...
<dependency>
<groupId>org.jvnet.mimepull</groupId>
<artifactId>mimepull</artifactId>
<version>1.9.13</version>
</dependency>
<dependency>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-jaxb-xjc</artifactId>
<version>2.3.3</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.1.13</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>javax.xml.bing</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
...
</dependencies>
</dependencyManagement>
pom.xml (ear)
<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>es.domain.app</groupId>
<artifactId>app2</artifactId>
<version>8.0.0</version>
</parent>
<artifactId>app-ear</artifactId>
<packaging>ear</packaging>
<name>app-ear</name>
<description>Arxiu d'aplicacio EAR de app</description>
<dependencies>
<!-- Especificacions i llibreries proporcionades per JBoss -->
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-8.0</artifactId>
<type>pom</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- Mòduls que van dins l'application.xml -->
<dependency>
<groupId>es.domain.app</groupId>
<artifactId>app-back</artifactId>
<type>war</type>
</dependency>
<dependency>
<groupId>es.domain.app</groupId>
<artifactId>app-commons</artifactId>
<type>jar</type>
</dependency>
<dependency>
<groupId>es.domain.app</groupId>
<artifactId>app-ejb</artifactId>
<type>ejb</type>
</dependency>
<dependency>
<groupId>es.domain.app</groupId>
<artifactId>app-front</artifactId>
<type>war</type>
</dependency>
<dependency>
<groupId>es.domain.app</groupId>
<artifactId>app-ws</artifactId>
<type>ejb</type>
</dependency>
</dependencies>
<build>
<finalName>${project.parent.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<generateApplicationXml>true</generateApplicationXml>
<defaultLibBundleDir>lib</defaultLibBundleDir>
<includeLibInApplicationXml>false</includeLibInApplicationXml>
<outputFileNameMapping>#{artifactId}#-#{version}#.#{extension}#</outputFileNameMapping>
<version>8</version>
<archive>
<manifestEntries>
<project-version>${project.version}</project-version>
<project-buildtime>${maven.build.timestamp}</project-buildtime>
<scm-revision>${buildNumber}</scm-revision>
</manifestEntries>
</archive>
<modules>
<webModule>
<groupId>es.domain.app</groupId>
<artifactId>app-back</artifactId>
<bundleFileName>app-back.war</bundleFileName>
<contextRoot>/app2back</contextRoot>
</webModule>
<ejbModule>
<groupId>es.domain.app</groupId>
<artifactId>app-ejb</artifactId>
<bundleFileName>app-ejb.jar</bundleFileName>
</ejbModule>
<webModule>
<groupId>es.domain.app</groupId>
<artifactId>app-front</artifactId>
<bundleFileName>app-front.war</bundleFileName>
<contextRoot>/app2front</contextRoot>
</webModule>
<ejbModule>
<groupId>es.domain.app</groupId>
<artifactId>app-ws</artifactId>
<bundleFileName>app-ws.jar</bundleFileName>
</ejbModule>
</modules>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<configuration>
<skip>false</skip>
<deployables>
<deployable>
<properties>
<name>${project.build.finalName}</name>
</properties>
</deployable>
</deployables>
</configuration>
</plugin>
<!-- Defineix la propietat ${buildNumber} que s'empra al filtrat -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
I have no issues with the following commands:
mvn dependency:resolve
mvn dependency:tree
No clue how to find out what is happening...
Error log
...
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-ear-plugin:3.1.0:generate-application-xml (default-generate-application-xml) on project app-ear: Failed to initialize ear modules: Unknown artifact type[zip] for relea
se-documentation -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :app-ear
...
Try excluding the documentation. You may also have to exclude samples.
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-ri</artifactId>
<version>2.3.3</version>
<type>pom</type>
<exclusions>
<exclusion>
<groupId>com.sun.xml.ws</groupId>
<artifactId>release-documentation</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.xml.ws</groupId>
<artifactId>samples</artifactId>
</exclusion>
</exclusions>
</dependency>

Non-resolvable import POM: Could not transfer artifact org.camunda.bpm:camunda-bom:pom:7.14.0-ee from/to camunda-bpm-nexus

I am trying to start "camunda web ee" but I am getting a lot of errors. Do you know how to fix the issue below I tried a lot of things but somehow it does not fix the error:
ERROR:
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.adesso.camunda:springboot-edi-hub-camunda-ee:0.0.1-SNAPSHOT (C:\hub\pom.xml) has 2 errors
[ERROR] Non-resolvable import POM: Could not transfer artifact org.camunda.bpm:camunda-bom:pom:7.14.0-ee from/to camunda-bpm-nexus (https://app.camunda.com/nexus/content/groups/public): PKIX pa
th building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target # line 33, column 25 -> [Help 2]
[ERROR] 'dependencies.dependency.version' for org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-we
in my settings.xml I have this:
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
<servers>
<server>
<id>camunda-bpm-ee</id>
<username>account***</username>
<password>password***</password>
</server>
</servers>
<activeProfiles>
<activeProfile>camunda-bpm</activeProfile>
</activeProfiles>
</settings>
and in my POM.xml as you can see I added the repository here in the pom. I tried also to call the repository in the Settings.xml file but it did not work it is always the same error. I have not idea why it is not working after trying everything that I found in google.
<?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.camunda</groupId>
<artifactId>springboot-edi-hub-camunda-ee</artifactId>
<version>0.0.1-SNAPSHOT</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.4.RELEASE</version>
<relativePath/>
</parent>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<camunda.version>7.14.0-ee</camunda.version>
<spring.boot.version>2.3.4.RELEASE</spring.boot.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-bom</artifactId>
<version>${camunda.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-webapp-ee</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.3</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>com.berryworks</groupId>
<artifactId>edireader-json-basic</artifactId>
<version>5.6.2</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>fluent-hc</artifactId>
<version>4.5.3</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20180130</version>
</dependency>
<dependency>
<groupId>com.berryworks</groupId>
<artifactId>edireader</artifactId>
<version>4.7.3.1</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
<version>11.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<configuration>
<layout>ZIP</layout>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>camunda-bpm-nexus</id>
<name>camunda-bpm-nexus</name>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<url>https://app.camunda.com/nexus/content/groups/public</url>
</repository>
<repository>
<id>camunda-bpm-nexus-ee</id>
<name>camunda-bpm-nexus-ee</name>
<url>https://app.camunda.com/nexus/content/repositories/camunda-bpm-ee</url>
</repository>
<repository>
<id>project.local</id>
<name>project</name>
<url>file:${project.basedir}/repo</url>
</repository>
</repositories>
</project>
Not sure if that fixes all problems, but in your pom.xml you refer to the EE Maven Repo with the name "camunda-bpm-nexus-ee":
<repository>
<id>camunda-bpm-nexus-ee</id>
<name>camunda-bpm-nexus-ee</name>
<url>https://app.camunda.com/nexus/content/repositories/camunda-bpm-ee</url>
</repository>
And in your settings, you set the credentials for the name "camunda-bpm-ee"
<server>
<id>camunda-bpm-ee</id>
<username>account***</username>
<password>password***</password>
</server>
You need to choose the same id in both places. See also https://docs.camunda.org/get-started/apache-maven/#enterprise-edition-1

Maven error - resolving dependencies

I'm not very familiar with maven and I'm struggling with this error message when running a maven compile:
[ERROR] Failed to execute goal on project myProject: Could not resolve dependencies for project myProject:1.0: Failure to find weka:weka:jar:3.7.1-beta in http://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 -> [Help 1]
The pom looks like 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>myGroup</groupId>
<artifactId>myProject</artifactId>
<version>1.1</version>
<repositories>
<repository>
<id>ambit-plovdiv</id>
<url>
http://ambit.uni-plovdiv.bg:8083/nexus/content/repositories/thirdparty</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
</dependency>
<!-- general purpose math-libraries -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>net.sf.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>net.sourceforge.jtds</groupId>
<artifactId>jtds</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
<version>2.6.10</version>
</dependency>
<dependency>
<groupId>tablelayout</groupId>
<artifactId>TableLayout</artifactId>
<version>20050920</version>
</dependency>
<dependency>
<groupId>org.openscience.cdk</groupId>
<artifactId>cdk</artifactId>
<version>1.3.8</version>
</dependency>
<dependency>
<groupId>org.openscience.cdk</groupId>
<artifactId>jchempaint</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.7-beta1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>3.7-beta1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.7-beta1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<optimize>true</optimize>
<fork>true</fork>
<compilerVersion>1.6</compilerVersion>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
Can anybody help to understand this error message?
It was Friday... I mixed up two maven projects. Thanks a lot for your help!
First part of the message means that one of your (transitive) dependency is missing in your accessible repositories.
Second part means that it is not the first time this request has been made, so unless you un-blacklist it (with -U in your command for instance), Maven will not try to find it again on the remote repositories.
If you can upgrade, later versions of weka are in maven central.
Alternatively, as a last resort if you can't find the versions you need in a maven repo somewhere, you could download the jars you need from the weka site, and put them in your local repository, something like this:
mvn install:install-file -Dfile=weka-3.7.1-beta.jar -DgroupId=weka -DartifactId=weka -Dversion=3.7.1-beta -DgeneratePom=true

Resources