Maven error - resolving dependencies - maven

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

Related

Non-resolvable parent POM for From Docker

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.

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.

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 not compiling test code / not running test code

I have a simple Mavenized Java Project with the expected directory structure an no "business" classes yet:
The pom.xml is rather mundane. It declares dependencies on JUnit4 and JUnit5, and the "surefire" plugin (enclosing project noise elided):
<properties>
<junit5Version>5.1.0</junit5Version>
<junit4Version>4.12</junit4Version>
<commonsCodecVersion>20041127.091804</commonsCodecVersion>
<mavenCompilerPluginVersion>3.7.0</mavenCompilerPluginVersion>
<junitPlatformSurefireProviderVersion>1.1.0</junitPlatformSurefireProviderVersion>
<mavenSurefirePluginVersion>2.21.0</mavenSurefirePluginVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${mavenCompilerPluginVersion}</version>
<configuration>
<release>9</release>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${mavenSurefirePluginVersion}</version>
<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>${junitPlatformSurefireProviderVersion}</version>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>${junit5Version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit5Version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<!-- https://www.petrikainulainen.net/programming/testing/junit-5-tutorial-running-unit-tests-with-maven/ -->
<dependencies>
<!-- https://mvnrepository.com/artifact/commons-codec/commons-codec/ -->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>${commonsCodecVersion}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit4Version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit5Version}</version>
</dependency>
</dependencies>
Problem:
In the above I don't not scope the junit:junit and
org.junit.jupiter.junit-jupiter-api dependencies to the test
scope. Indeed, if I do that, mvn compile fails because it cannot
find the symbols for JUnit4 and JUnit5. This is unexpected, I would
expect it to not actually compile the test code at all. Indeed
examples generally show restriction to the test scope. What's
wrong?
If there is no restriction to the test scope, then mvn compile works, but mvn test doesn't run any tests. The surefire plugin seems to not sniff out any JUnit tests, neither 4's nor 5's. What's wrong here?
And finally, version info:
$ mvn -version
Apache Maven 3.5.2
Maven home: /usr/local/java/maven
Java version: 9.0.4, vendor: Oracle Corporation
maven-surefire-plugin 2.21.0 is not compatible with version 1.1.0 of the junit-platform-surefire-provider.
Either rollback maven-surefire-plugin to 2.19.1 or update junit-platform-surefire-provider to 1.2.0-SNAPSHOT (or the 1.2.0 release if it's out).
The pom.xml to use if using the SNAPSHOT, with the Sonatype plugin repository configured:
<?xml version="1.0"?>
<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>TestJava</groupId>
<artifactId>TestJava</artifactId>
<version>0.0.1-SNAPSHOT</version>
<pluginRepositories>
<pluginRepository>
<id>oss-sonatype</id>
<name>oss-sonatype</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<properties>
<junit5Version>5.1.0</junit5Version>
<junit4Version>4.12</junit4Version>
<mavenCompilerPluginVersion>3.7.0</mavenCompilerPluginVersion>
<junitPlatformSurefireProviderVersion>1.2.0-SNAPSHOT</junitPlatformSurefireProviderVersion>
<mavenSurefirePluginVersion>2.21.0</mavenSurefirePluginVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${mavenCompilerPluginVersion}</version>
<configuration>
<release>9</release>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${mavenSurefirePluginVersion}</version>
<!-- https://www.petrikainulainen.net/programming/testing/junit-5-tutorial-running-unit-tests-with-maven/ -->
<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>${junitPlatformSurefireProviderVersion}</version>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>${junit5Version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit5Version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<dependencies>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit4Version}</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit5Version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Run mvn -U test to force a check for missing releases and updated snapshots on remote repositories.

maven does not consider changed pom file

i have a problem with maven built .war file.
i have a dependency on project's POM which has the provided scope.
when for first time i try to run "package" goal on my project, maven does not
insert dependent jar file into final .war file.
and as i expected, when i remove the provided scope form the POM, maven includes dependent
jar file on final .war file (it is correct until this point).
but when i set provided scope for dependency again, maven still includes the dependent jar file in war package.!!!
i have tried clean:clean goal and also update snapshot switch
but it still goes wrong.
is it a bug? or i must do some configuration to avoid this.
i am using maven 3.0.3
this is POM:
<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>testmaven</groupId>
<artifactId>testmaven</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name/>
<description/>
<dependencies>
<dependency>
<groupId>com.pardis.communicationcenter</groupId>
<artifactId>communicationCenterCommon</artifactId>
<version>1.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.pardis.communicationcenter</groupId>
<artifactId>communicationCenterWSCommon</artifactId>
<version>1.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.pardis.parameterengine</groupId>
<artifactId>parameterenginecommon</artifactId>
<version>1.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.bea.weblogic</groupId>
<artifactId>weblogic</artifactId>
<version>1.0</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>javaee</groupId>
<artifactId>javaee-api</artifactId>
<scope>provided</scope>
<version>5</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.5</version>
</dependency>
<dependency>
<groupId>com.pardis.common</groupId>
<artifactId>fanavaCommon</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.pardis.retail.common</groupId>
<artifactId>rtlmgrCommon</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.pardis.retail.common</groupId>
<artifactId>rtlmgrFast</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.pardis.job</groupId>
<artifactId>jobschedulingclient</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.pardis.security</groupId>
<artifactId>pincoding</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.pardis.workflowengine</groupId>
<artifactId>workflowenginegclient</artifactId>
<version>1.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.pardis.genericmanagedbean</groupId>
<artifactId>genericManagedBeanCommon</artifactId>
<version>1.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.apache.myfaces.tomahawk</groupId>
<artifactId>tomahawk</artifactId>
<version>1.1.9</version>
</dependency>
<dependency>
<groupId>com.pardis.common</groupId>
<artifactId>SAD</artifactId>
<version>1.6</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.pardis.common</groupId>
<artifactId>accountDataProviderCommon</artifactId>
<version>1.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.pardis.common</groupId>
<artifactId>personDataProviderCommon</artifactId>
<version>1.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.pardis.bank</groupId>
<artifactId>BankBusiness</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-impl</artifactId>
<version>1.2.7</version>
</dependency>
<dependency>
<groupId>com.pardis.batch</groupId>
<artifactId>batchwebserviceclient</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.pardis.security</groupId>
<artifactId>usermanagerclient</artifactId>
<version>1.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.pardis.cardmanager</groupId>
<artifactId>crdmgrCommon</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>${basedir}/src</sourceDirectory>
<outputDirectory>${basedir}/WebRoot/WEB-INF/classes</outputDirectory>
<resources>
<resource>
<directory>${basedir}/src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webappDirectory>${basedir}/WebRoot</webappDirectory>
<warSourceDirectory>${basedir}/WebRoot</warSourceDirectory>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
problem is about:
<dependency>
<groupId>com.bea.weblogic</groupId>
<artifactId>weblogic</artifactId>
<version>1.0</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
thanks in advance
Which war are you looking at? Running mvn clean package will build a new war in your target directory, and that war won't have any dependency in it whose scope is provided.

Resources