maven-install-plugin does not load local dependency - spring

I'm trying load local dependencies using the Maven maven-install-plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
<executions>
<execution>
<id>tetramap</id>
<phase>initialize</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<groupId>tetramap</groupId>
<artifactId>tetramap</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<file>${project.basedir}/lib/tetraMap-1.0.jar</file>
</configuration>
</execution>
</executions>
</plugin>
<dependency>
<groupId>tetramap</groupId>
<artifactId>tetraMap</artifactId>
<version>1.0</version>
</dependency>
As a result, the downloaded dependency should appear in the repository (user/.m2/repository). the files should appear in the repository. But they are not uploaded to the repository ("tetramap-1.0.jar " and "tetramap-1.0.pom" files and the "maven-metadata-local.xm" file is missing).
Please tell me what I'm doing wrong. I want to see the uploaded files in the repository tetramap-1.0.jar , tetramap-1.0.pom and maven-metadata-local.xml.
More detailed:
I need this in order to create a Docker image for a project with Vaadin and Spring.
My Dockerfile:
FROM openjdk:11-jdk-slim
COPY *.tetra ./
COPY src src
COPY frontend frontend
COPY route route
COPY package.json ./
COPY target/*.jar tetraweb.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "/tetraweb.jar"]
If there are no such files in the user/.m2/repository directory, then when I run the command (creates a Docker image):
sudo docker build . -t tetraweb:latest
And then I run the image in the container
sudo docker run -p 8080:8080 tetraweb:latest
And after that I get an error:
java.lang.NoClassDefFoundError:
And if the files are located in the repository (user/.m2/repository) directory, then the Docker image is created correctly with local dependencies.
I tried connecting local dependencies in other ways:
<dependency>
<groupId>tetramap</groupId>
<artifactId>tetraMap</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/tetraMap-1.0.jar</systemPath>
</dependency>
или
<repository>
<id>local-repository</id>
<url>file://${project.basedir}/lib</url>
</repository>
...
<dependency>
<groupId>tetramap</groupId>
<artifactId>tetraMap</artifactId>
<version>1.0</version>
</dependency>
but the result is the same everywhere:
java.lang.NoClassDefFoundError

I found a temporary solution
my pom.xml:
<dependencies>
<dependency>
<groupId>tetramap</groupId>
<artifactId>tetraMap</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/tetraMap-1.0.jar</systemPath>
</dependency>
</dependencies>
...
<build>
<defaultGoal>spring-boot:run</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<executions>
<execution>
<id>inst_1</id>
<phase>initialize</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<groupId>tetramap</groupId>
<artifactId>tetraMap</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<file>${project.basedir}/lib/tetraMap-1.0.jar</file>
<localRepositoryPath>/home/user/.m2/repository</localRepositoryPath>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Now if I run a
mvn clean install
My directories in the repository are filled in correctly. I see the downloaded files:
enter image description here
At the moment, there is still a problem with creating a Docker image. If I run the command:
mvn -Pproduction
I see error:
[ERROR] Failed to execute goal com.vaadin:vaadin-maven-plugin:23.2.7:build-frontend (default) on project tetraweb: Could not execute build-frontend goal: Error occured during goal execution: nullPlease run Maven with the -e switch (or Gradle with the --stacktrace switch), to learn the full stack trace. NullPointerException -> [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/MojoFailureException
But if I disable the following code:
<!-- <scope>system</scope>
<systemPath>${project.basedir}/lib/tetraMap-1.0.jar</systemPath>-->
and I will run the command again:
mvn -Pproduction
In this case, the image creation will be successful
To upload a jar file to the repository, I need the included code:
<scope>system</scope>
<systemPath>${project.basedir}/lib/tetraMap-1.0.jar</systemPath>
To create a Docker image, this code must be disabled:( That's very strange...
This is my pom.xml all code:
<?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>
<!-- Project from https://start.vaadin.com/project/553cf24a-aade-4a91-a94d-9f2293333d44 -->
<groupId>oniip.tetra.web</groupId>
<artifactId>tetraweb</artifactId>
<name>tetraweb</name>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<java.version>11</java.version>
<vaadin.version>23.2.7</vaadin.version>
<!-- this parameter is needed as spring-boot bom overwrites it -->
<selenium.version>4.5.3</selenium.version>
<!-- selenium is so much verbose -->
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.5</version>
</parent>
<repositories>
<!-- Main Maven repository -->
<repository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>vaadin-prereleases</id>
<url>
https://maven.vaadin.com/vaadin-prereleases/
</url>
</repository>
<!-- Repository used by many Vaadin add-ons -->
<repository>
<id>Vaadin Directory</id>
<url>https://maven.vaadin.com/vaadin-addons</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<!-- The order of definitions matters. Explicitly defining central here to make sure it has the highest priority. -->
<pluginRepository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>vaadin-prereleases</id>
<url>
https://maven.vaadin.com/vaadin-prereleases/
</url>
</pluginRepository>
</pluginRepositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<version>${vaadin.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<!-- Replace artifactId with vaadin-core to use only free components -->
<artifactId>vaadin</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-testbench</artifactId>
<scope>test</scope>
</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>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.mysql/mysql-connector-j -->
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>8.0.31</version>
</dependency>
<!-- Include JUnit 4 support for TestBench and others -->
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>5.1.1</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.github.appreciated/apexcharts -->
<dependency>
<groupId>com.github.appreciated</groupId>
<artifactId>apexcharts</artifactId>
<version>23.0.0</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-actor_2.11</artifactId>
<version>2.4.20</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-remote_2.11</artifactId>
<version>2.4.20</version>
</dependency>
<dependency>
<groupId>com.typesafe</groupId>
<artifactId>config</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.17</version>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.55</version>
</dependency>
<dependency>
<groupId>com.github.oshi</groupId>
<artifactId>oshi-core</artifactId>
<version>5.5.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.simplejavamail/simple-java-mail -->
<dependency>
<groupId>org.simplejavamail</groupId>
<artifactId>simple-java-mail</artifactId>
<version>5.0.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>com.github.bbottema</groupId>
<artifactId>emailaddress-rfc2822</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>1.6.1</version>
</dependency>
<!-- Локальные репозитории -->
<dependency>
<groupId>org.jlibrtp</groupId>
<artifactId>jlibrtp</artifactId>
<version>1.0</version>
<!-- <scope>system</scope>
<systemPath>${project.basedir}/lib/jlibrtp.jar</systemPath>-->
</dependency>
<dependency>
<groupId>org.snmp4j</groupId>
<artifactId>snmp4j</artifactId>
<version>1.11.3</version>
<!-- <scope>system</scope>
<systemPath>${project.basedir}/lib/snmp4j-1.11.3.jar</systemPath>-->
</dependency>
<dependency>
<groupId>tetra.commons</groupId>
<artifactId>tetraCommons</artifactId>
<version>1.0</version>
<!-- <scope>system</scope>
<systemPath>${project.basedir}/lib/TetraCommons-1.0.jar</systemPath>-->
</dependency>
<dependency>
<groupId>tetramap</groupId>
<artifactId>tetraMap</artifactId>
<version>1.0</version>
<!-- <scope>system</scope>
<systemPath>${project.basedir}/lib/tetraMap-1.0.jar</systemPath>-->
</dependency>
</dependencies>
<build>
<defaultGoal>spring-boot:run</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<executions>
<execution>
<id>inst_1</id>
<phase>initialize</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<groupId>org.jlibrtp</groupId>
<artifactId>jlibrtp</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<file>${project.basedir}/lib/jlibrtp.jar</file>
<localRepositoryPath>/home/user/.m2/repository</localRepositoryPath>
</configuration>
</execution>
<execution>
<id>inst_2</id>
<phase>initialize</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<groupId>org.snmp4j</groupId>
<artifactId>snmp4j</artifactId>
<version>1.11.3</version>
<packaging>jar</packaging>
<file>${project.basedir}/lib/snmp4j-1.11.3.jar</file>
<localRepositoryPath>/home/user/.m2/repository</localRepositoryPath>
</configuration>
</execution>
<execution>
<id>inst_3</id>
<phase>initialize</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<groupId>tetra.commons</groupId>
<artifactId>tetraCommons</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<file>${project.basedir}/lib/TetraCommons-1.0.jar</file>
<localRepositoryPath>/home/user/.m2/repository</localRepositoryPath>
</configuration>
</execution>
<execution>
<id>inst_4</id>
<phase>initialize</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<groupId>tetramap</groupId>
<artifactId>tetraMap</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<file>${project.basedir}/lib/tetraMap-1.0.jar</file>
<localRepositoryPath>/home/user/.m2/repository</localRepositoryPath>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<!-- Clean build and startup time for Vaadin apps sometimes may exceed
the default Spring Boot's 30sec timeout. -->
<configuration>
<jvmArguments>-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5037</jvmArguments>
<wait>500</wait>
<maxAttempts>240</maxAttempts>
</configuration>
</plugin>
<!--
Take care of synchronizing java dependencies and imports in
package.json and main.js files.
It also creates webpack.config.js if not exists yet.
-->
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-frontend</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<!-- Production mode is activated using -Pproduction -->
<id>production</id>
<properties>
<vaadin.productionMode>true</vaadin.productionMode>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
<goal>build-frontend</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>it</id>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<id>start-spring-boot</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop-spring-boot</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Runs the integration tests (*IT) after the server is started -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<trimStackTrace>false</trimStackTrace>
<enableAssertions>true</enableAssertions>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

Related

Why is a bean resolved with `spring-boot:run` but not `java -jar`?

I have a multi-module maven project with #Beans defined here and there.
#SpringBootApplication(scanBasePackageClasses = {...}) is configured so that all configuration files and components are scanned.
Application starts successfully from STS and with mvn spring-boot:run but crashes when running java -jar my-module/target/my-module-0.0.1-SNAPSHOT.jar with:
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 0 of constructor in com.c4_soft.lifix.web.FaultController required a bean of type 'com.c4_soft.lifix.common.storage.StorageService' that could not be found.
Action:
Consider defining a bean of type 'com.c4_soft.lifix.common.storage.StorageService' in your configuration.
Why are #Bean from common-storage (among which stands StorageServiceimplementation) resolved with spring-boot:run and not in packaged application ?
P.S.
I intend to build and run native image. Here is the pom for a "runnable" module
<?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>com.c4-soft</groupId>
<artifactId>lifix-api-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<groupId>com.c4-soft.lifix</groupId>
<artifactId>faults-endpoints</artifactId>
<name>faults-endpoints</name>
<description>REST endpoints for little fixes app</description>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-r2dbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.experimental</groupId>
<artifactId>spring-native</artifactId>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-webflux-ui</artifactId>
</dependency>
<dependency>
<groupId>com.c4-soft.springaddons</groupId>
<artifactId>spring-security-oauth2-addons</artifactId>
</dependency>
<dependency>
<groupId>com.c4-soft</groupId>
<artifactId>common-security</artifactId>
</dependency>
<dependency>
<groupId>com.c4-soft</groupId>
<artifactId>common-storage</artifactId>
</dependency>
<dependency>
<groupId>com.c4-soft</groupId>
<artifactId>common-web</artifactId>
</dependency>
<dependency>
<groupId>com.c4-soft.lifix</groupId>
<artifactId>lifix-domain</artifactId>
</dependency>
<dependency>
<groupId>com.c4-soft.lifix</groupId>
<artifactId>lifix-persistence</artifactId>
</dependency>
<dependency>
<groupId>io.r2dbc</groupId>
<artifactId>r2dbc-postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<!-- tests -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.r2dbc</groupId>
<artifactId>r2dbc-h2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<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>
<classifier>${repackage.classifier}</classifier>
<image>
<builder>paketobuildpacks/builder:tiny</builder>
<env>
<BP_NATIVE_IMAGE>true</BP_NATIVE_IMAGE>
</env>
</image>
<jvmArguments>-Dspring.application.admin.enabled=true</jvmArguments>
</configuration>
<executions>
<execution>
<id>pre-integration-test</id>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>post-integration-test</id>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-maven-plugin</artifactId>
<version>1.3</version>
<configuration>
<apiDocsUrl>https://localhost:4443/v3/api-docs</apiDocsUrl>
<outputFileName>faults-openapi.json</outputFileName>
<outputDir>../..</outputDir>
<skip>false</skip>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.experimental</groupId>
<artifactId>spring-aot-maven-plugin</artifactId>
<version>${spring-native.version}</version>
<executions>
<execution>
<id>test-generate</id>
<goals>
<goal>test-generate</goal>
</goals>
</execution>
<execution>
<id>generate</id>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<profiles>
<profile>
<id>native</id>
<properties>
<repackage.classifier>exec</repackage.classifier>
<native-buildtools.version>0.9.1</native-buildtools.version>
</properties>
<dependencies>
<dependency>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>junit-platform-native</artifactId>
<version>${native-buildtools.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>${native-buildtools.version}</version>
<executions>
<execution>
<id>test-native</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
<execution>
<id>build-native</id>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
edit : pom after I followed this sample (with no success):
<?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>com.c4-soft</groupId>
<artifactId>lifix-api-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<groupId>com.c4-soft.lifix</groupId>
<artifactId>faults-endpoints</artifactId>
<name>faults-endpoints</name>
<description>REST endpoints for little fixes app</description>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-r2dbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.experimental</groupId>
<artifactId>spring-native</artifactId>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-webflux-ui</artifactId>
</dependency>
<dependency>
<groupId>com.c4-soft.springaddons</groupId>
<artifactId>spring-security-oauth2-addons</artifactId>
</dependency>
<dependency>
<groupId>com.c4-soft</groupId>
<artifactId>common-security</artifactId>
</dependency>
<dependency>
<groupId>com.c4-soft</groupId>
<artifactId>common-storage</artifactId>
</dependency>
<dependency>
<groupId>com.c4-soft</groupId>
<artifactId>common-web</artifactId>
</dependency>
<dependency>
<groupId>com.c4-soft.lifix</groupId>
<artifactId>lifix-domain</artifactId>
</dependency>
<dependency>
<groupId>com.c4-soft.lifix</groupId>
<artifactId>lifix-persistence</artifactId>
</dependency>
<dependency>
<groupId>io.r2dbc</groupId>
<artifactId>r2dbc-postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<!-- tests -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.r2dbc</groupId>
<artifactId>r2dbc-h2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.springframework.experimental</groupId>
<artifactId>spring-aot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>native</id>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<id>build-image</id>
<goals>
<goal>build-image</goal>
</goals>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
<image>
<builder>paketobuildpacks/builder:tiny</builder>
<env>
<BP_NATIVE_IMAGE>true</BP_NATIVE_IMAGE>
</env>
<pullPolicy>IF_NOT_PRESENT</pullPolicy>
</image>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

SoapUI Project tests execution using Maven plugin in Jenkins transitive dependency error

I am trying to run a SoapUI 5.2.0 open source project xml in Jenkins using Maven and getting the following error:
[ERROR] Failed to execute goal com.smartbear.soapui:soapui-maven-plugin:5.4.0:test (SoapUI-Test) on project AmexIQCX: Execution SoapUI-Test of goal com.smartbear.soapui:soapui-maven-plugin:5.4.0:test failed: Plugin com.smartbear.soapui:soapui-maven-plugin:5.4.0 or one of its dependencies could not be resolved: The following artifacts could not be resolved: com.fasterxml.jackson.core:jackson-databind:jar:2.3.0, org.apache.ws.security:wss4j:jar:1.6.16: Could not transfer artifact com.fasterxml.jackson.core:jackson-databind:jar:2.3.0 from/to m-all (https://ci-repo.aexp.com/java-proxy/content/groups/prod/): Access denied to: https://ci-repo.aexp.com/java-proxy/content/groups/prod/com/fasterxml/jackson/core/jackson-databind/2.3.0/jackson-databind-2.3.0.jar , ReasonPhrase:Requested item is quarantined. -> [Help 1]
Here is my 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>AmexIQCX</groupId>
<artifactId>AmexIQCX</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version> <!-- or whatever current version -->
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-maven-plugin</artifactId>
<version>5.4.0</version>
<configuration>
<projectFile>./SabreCommandLLS1-8-1RQ-soapui-project.xml</projectFile>
<testSuite>TestSuite 1</testSuite>
<printReport>true</printReport>
<outputFolder>${basedir}/soapui-output</outputFolder>
<junitReport>true</junitReport>
</configuration>
<dependencies>
<dependency>
<groupId>com.jgoodies</groupId>
<artifactId>forms</artifactId>
<version>1.0.7</version>
</dependency>
<dependency>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-maven-plugin</artifactId>
<version>5.4.0</version>
<!-- <exclusions> <exclusion> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId> </exclusion> <exclusion> <groupId>org.apache.ws.security</groupId>
<artifactId>wss4j:jar</artifactId> </exclusion> </exclusions> -->
</dependency>
</dependencies>
<executions>
<execution>
<id>SoapUI-Test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.20.1</version>
<configuration>
<reportsDirectories>
<reportsDirectory>${basedir}/soapui-output</reportsDirectory>
</reportsDirectories>
<outputDirectory>${basedir}/soapui-output</outputDirectory>
<outputName>${project.artifactId}-TEST-${env}</outputName>
<showSuccess>true</showSuccess>
<aggregate>true</aggregate>
<linkXRef>false</linkXRef>
</configuration>
<executions>
<execution>
<id>Surefire-Report</id>
<phase>test</phase>
<goals>
<goal>report-only</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>smartbear-sweden-plugin-repository</id>
<url>http://www.soapui.org/repository/maven2/</url>
</pluginRepository>
</pluginRepositories>
</project>
This is resolve by using the following versions in dependencies with exclusions:
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.12.1</version>
</dependency>
<dependency>
<groupId>org.apache.ws.security</groupId>
<artifactId>wss4j</artifactId>
<version>2.3.1</version>
</dependency>

Why is Maven connecting to archiva.openqa.org

I'm building the code that I got from the book ActiveMQ in ACtion. When I run the code using these commands mvn clean install, I get these messages below. I cannot understand why it is downloading from release.openqa.org for the spring framework because I do not see anywhere in my POM.xml that this is configured to do so.
..........
Downloading from release.openqa.org: http://archiva.openqa.org/repository/releases/org/springframework/spring-core/maven-metadata.xml
[WARNING] Could not transfer metadata org.springframework:spring-core/maven-metadata.xml from/to release.openqa.org (http://archiva.openqa.org/repository/releases): Connect to archiva.openqa.org:80 [archiva.openqa.org/199.102.165.92] failed: Connection timed out: connect
.......
Content of POM.xml:
<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>
<!--
<parent> <groupId>org.apache.activemq.book</groupId>
<artifactId>activemq-in-action</artifactId>
<version>1.0-SNAPSHOT</version> </parent>
-->
<groupId>org.apache.activemq.book</groupId>
<artifactId>activemq-in-action-examples</artifactId>
<version>1.0-SNAPSHOT</version>
<name>ActiveMQ in Action Examples</name>
<description>ActiveMQ in Action Example Code</description>
<!-- This build uses Maven 2.x -->
<properties>
<activemq-version>5.3.2</activemq-version>
<camel-version>2.0.0</camel-version>
<commons-logging-version>1.1</commons-logging-version>
<commons-pool-version>1.4</commons-pool-version>
<geronimo-spec-version>1.1</geronimo-spec-version>
<junit-version>4.4</junit-version>
<log4j-version>1.2.14</log4j-version>
<springframework-version>2.5.6</springframework-version>
<stax-version>1.0.1</stax-version>
<woodstox-version>3.2.7</woodstox-version>
<xbean-version>3.4.3</xbean-version>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<version>${activemq-version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.activemq</groupId>
<artifactId>activeio-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jms_1.1_spec</artifactId>
<version>${geronimo-spec-version}</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-j2ee-management_1.0_spec</artifactId>
<version>${geronimo-spec-version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-optional</artifactId>
<version>${activemq-version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-pool</artifactId>
<version>${activemq-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>${springframework-version}</version>
</dependency>
<dependency>
<groupId>org.apache.xbean</groupId>
<artifactId>xbean-spring</artifactId>
<version>${xbean-version}</version>
</dependency>
<dependency>
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
<version>${stax-version}</version>
</dependency>
<dependency>
<groupId>woodstox</groupId>
<artifactId>wstx-asl</artifactId>
<version>${woodstox-version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-camel</artifactId>
<version>${activemq-version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jms</artifactId>
<version>${camel-version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-web</artifactId>
<classifier>classes</classifier>
<version>${camel-version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>${camel-version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring</artifactId>
<version>${camel-version}</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>${commons-logging-version}</version>
<exclusions>
<exclusion>
<groupId>avalon-framework</groupId>
<artifactId>avalon-framework</artifactId>
</exclusion>
<exclusion>
<groupId>logkit</groupId>
<artifactId>logkit</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j-version}</version>
</dependency>
</dependencies>
<build>
<finalName>activemq-in-action-examples</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<target>1.5</target>
<source>1.5</source>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<failIfNoTests>false</failIfNoTests>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>example-src</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>${project.basedir}/src/main/assembly/activemq-in-action-src.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>java.net</id>
<name>java.net</name>
<url>http://download.java.net/maven/2</url>
<layout>default</layout>
</repository>
</repositories>
</project>
After running mvn help:effective-pom, I get the following. I still do not see why maven is connecting to release.openqa.org:
PS C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src> mvn help:effective-pom
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.apache.activemq.book:activemq-in-action-examples:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. # line 155, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. # line 163, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] --------< org.apache.activemq.book:activemq-in-action-examples >--------
[INFO] Building ActiveMQ in Action Examples 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-help-plugin:3.2.0:effective-pom (default-cli) # activemq-in-action-examples ---
[INFO]
Effective POMs, after inheritance, interpolation, and profiles are applied:
<?xml version="1.0" encoding="Cp1252"?>
<!-- ====================================================================== -->
<!-- -->
<!-- Generated by Maven Help Plugin on 2019-06-17T23:59:41+08:00 -->
<!-- See: http://maven.apache.org/plugins/maven-help-plugin/ -->
<!-- -->
<!-- ====================================================================== -->
<!-- ====================================================================== -->
<!-- -->
<!-- Effective POM for project -->
<!-- 'org.apache.activemq.book:activemq-in-action-examples:jar:1.0-SNAPSHOT' -->
<!-- -->
<!-- ====================================================================== -->
<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>org.apache.activemq.book</groupId>
<artifactId>activemq-in-action-examples</artifactId>
<version>1.0-SNAPSHOT</version>
<name>ActiveMQ in Action Examples</name>
<description>ActiveMQ in Action Example Code</description>
<properties>
<activemq-version>5.3.2</activemq-version>
<camel-version>2.0.0</camel-version>
<commons-logging-version>1.1</commons-logging-version>
<commons-pool-version>1.4</commons-pool-version>
<geronimo-spec-version>1.1</geronimo-spec-version>
<junit-version>4.4</junit-version>
<log4j-version>1.2.14</log4j-version>
<springframework-version>2.5.6</springframework-version>
<stax-version>1.0.1</stax-version>
<woodstox-version>4.4.1</woodstox-version>
<xbean-version>3.4.3</xbean-version>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<version>5.3.2</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>activeio-core</artifactId>
<groupId>org.apache.activemq</groupId>
</exclusion>
<exclusion>
<artifactId>camel-core</artifactId>
<groupId>org.apache.camel</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jms_1.1_spec</artifactId>
<version>1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-j2ee-management_1.0_spec</artifactId>
<version>1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-optional</artifactId>
<version>5.3.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-pool</artifactId>
<version>5.3.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>2.5.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.xbean</groupId>
<artifactId>xbean-spring</artifactId>
<version>3.4.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
<version>1.0.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>woodstox-core-asl</artifactId>
<version>4.4.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-camel</artifactId>
<version>5.3.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jms</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-web</artifactId>
<version>2.0.0</version>
<classifier>classes</classifier>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>avalon-framework</artifactId>
<groupId>avalon-framework</groupId>
</exclusion>
<exclusion>
<artifactId>logkit</artifactId>
<groupId>logkit</groupId>
</exclusion>
<exclusion>
<artifactId>servlet-api</artifactId>
<groupId>javax.servlet</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
<scope>compile</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>java.net</id>
<name>java.net</name>
<url>http://download.java.net/maven/2</url>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</pluginRepository>
</pluginRepositories>
<build>
<sourceDirectory>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src\src\main\java</sourceDirectory>
<scriptSourceDirectory>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src\src\main\scripts</scriptSourceDirectory>
<testSourceDirectory>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src\src\test\java</testSourceDirectory>
<outputDirectory>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src\target\classes</outputDirectory>
<testOutputDirectory>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src\target\test-classes</testOutputDirectory>
<resources>
<resource>
<directory>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src\src\main\resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src\src\test\resources</directory>
</testResource>
</testResources>
<directory>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src\target</directory>
<finalName>activemq-in-action-examples</finalName>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.3</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-5</version>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<executions>
<execution>
<id>default-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<target>1.5</target>
<source>1.5</source>
</configuration>
</execution>
<execution>
<id>default-testCompile</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<target>1.5</target>
<source>1.5</source>
</configuration>
</execution>
</executions>
<configuration>
<target>1.5</target>
<source>1.5</source>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<executions>
<execution>
<id>default-test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<failIfNoTests>false</failIfNoTests>
</configuration>
</execution>
</executions>
<configuration>
<failIfNoTests>false</failIfNoTests>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-5</version>
<executions>
<execution>
<id>example-src</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src/src/main/assembly/activemq-in-action-src.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>default-clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>default-testResources</id>
<phase>process-test-resources</phase>
<goals>
<goal>testResources</goal>
</goals>
</execution>
<execution>
<id>default-resources</id>
<phase>process-resources</phase>
<goals>
<goal>resources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>default-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>default-install</id>
<phase>install</phase>
<goals>
<goal>install</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
<executions>
<execution>
<id>default-site</id>
<phase>site</phase>
<goals>
<goal>site</goal>
</goals>
<configuration>
<outputDirectory>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src\target\site</outputDirectory>
<reportPlugins>
<reportPlugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
</reportPlugin>
</reportPlugins>
</configuration>
</execution>
<execution>
<id>default-deploy</id>
<phase>site-deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
<configuration>
<outputDirectory>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src\target\site</outputDirectory>
<reportPlugins>
<reportPlugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
</reportPlugin>
</reportPlugins>
</configuration>
</execution>
</executions>
<configuration>
<outputDirectory>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src\target\site</outputDirectory>
<reportPlugins>
<reportPlugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
</reportPlugin>
</reportPlugins>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<outputDirectory>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src\target\site</outputDirectory>
</reporting>
</project>
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.162 s
[INFO] Finished at: 2019-06-17T23:59:51+08:00
[INFO] ------------------------------------------------------------------------
PS C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src>
Under the local repository C:\Users\wmunlai.m2\, I do see a few files called "resolver-status.properties". Could this be the cause? May I know the purpose of this file "resolver-status.properties". The content of one of this file is shown below:
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
#Mon Jun 17 23:58:04 SGT 2019
maven-metadata-apache.snapshots.xml.error=
maven-metadata-release.openqa.org.xml.error=Could not transfer metadata org.springframework\:spring/maven-metadata.xml from/to release.openqa.org (http\://archiva.openqa.org/repository/releases)\: Connect to archiva.openqa.org\:80 [archiva.openqa.org/199.102.165.92] failed\: Connection timed out\: connect
maven-metadata-java.net.xml.lastUpdated=1560787064788
maven-metadata-codehausSnapshots.xml/#default-codehausSnapshots-http\://snapshots.maven.codehaus.org/maven2/.lastUpdated=1560681286264
maven-metadata-java.net.m2.xml.lastUpdated=1560787065347
maven-metadata-release.openqa.org.xml/#default-release.openqa.org-http\://archiva.openqa.org/repository/releases/.lastUpdated=1560787084477
maven-metadata-java.net.xml.error=
maven-metadata-java.net.m2.xml.error=
maven-metadata-codehausSnapshots.xml.lastUpdated=1560686487495
maven-metadata-central.xml.lastUpdated=1560787063879
maven-metadata-apache.snapshots.xml.lastUpdated=1560787064417
It seems that this file camel-web-2.0.0.pom contains the following code that caused this problem:
C:\Users\wmunlai.m2\repository\org\apache\camel\camel-web\2.0.0\camel-web-2.0.0.pom
<repositories>
<repository>
<id>java.net.m2</id>
<name>java.net Maven 2 Repo</name>
<url>http://download.java.net/maven/2</url>
</repository>
<repository>
<id>release.openqa.org</id>
<name>OpenQA Releases</name>
<url>http://archiva.openqa.org/repository/releases</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
repositories are either configured in the pom.xml file (your own one or a dependent one) or in settings.xml
You can check the effective files use by running mvn help:effective-pom or mvn help:effective-settings. The repo might appear there. Since spring dependencies are usually taken from central it might be a settings thing. Settings files can be placed into the maven installation directly or in your user home / .m2 directory or passed to the build with a parameter. So just add the help goals in front of your usual maven goals and then search for the repo name. If it's not showing up one of the dependencies you use may be a bit weird? Then I would search the local maven repository for that uri.
Adding repositories to pom.xml files is no longer encouraged, as they tend to move too frequent and impact the reliability of builds. Usually, companies install a repository mirror like Nexus or Artifactory. Both work by being configured as mirrorOf in settings.xml and proxy all requests made.

MuleSoft deployment failing using maven

I am trying to deploy a flow I created in Anypoint Studio to CloudHub using maven. I have my pom.xml configured as best as I can tell:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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>capgemini</groupId>
<artifactId>maven-test</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>mule</packaging>
<name>Mule maven-test Application</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<mule.version>3.9.0</mule.version>
<mule.tools.version>1.2</mule.tools.version>
<cloudhub.domain>mydomain</cloudhub.domain>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.mule.tools.maven</groupId>
<artifactId>mule-app-maven-plugin</artifactId>
<version>${mule.tools.version}</version>
<extensions>true</extensions>
<configuration>
<copyToAppsDirectory>true</copyToAppsDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>add-resource</id>
<phase>generate-resources</phase>
<goals>
<goal>add-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>src/main/app/</directory>
</resource>
<resource>
<directory>src/main/api/</directory>
</resource>
<resource>
<directory>mappings/</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.mule.tools.maven</groupId>
<artifactId>mule-maven-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<deploymentType>cloudhub</deploymentType>
<muleVersion>3.9.0</muleVersion>
<username>myusername</username>
<password>mypassword</password>
<applicationName>circleci-maven</applicationName>
<redeploy>true</redeploy>
<target>Cloudhub</target>
<domain>${cloudhub.domain}</domain>
<targetType>server</targetType>
<environment>Development</environment>
</configuration>
<executions>
<execution>
<id>deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<!-- Mule Dependencies -->
<dependencies>
<dependency>
<groupId>org.jfrog.maven.annomojo</groupId>
<artifactId>maven-plugin-anno</artifactId>
<version>1.4.1</version>
</dependency>
<!-- Xml configuration -->
<dependency>
<groupId>com.mulesoft.muleesb</groupId>
<artifactId>mule-core-ee</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<!-- Xml configuration -->
<dependency>
<groupId>com.mulesoft.muleesb.modules</groupId>
<artifactId>mule-module-spring-config-ee</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<!-- Mule Transports -->
<dependency>
<groupId>org.mule.transports</groupId>
<artifactId>mule-transport-file</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.transports</groupId>
<artifactId>mule-transport-http</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.mulesoft.muleesb.transports</groupId>
<artifactId>mule-transport-jdbc-ee</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.mulesoft.muleesb.transports</groupId>
<artifactId>mule-transport-jms-ee</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.transports</groupId>
<artifactId>mule-transport-vm</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<!-- Mule Modules -->
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-scripting</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-xml</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<!-- for testing -->
<dependency>
<groupId>org.mule.tests</groupId>
<artifactId>mule-tests-functional</artifactId>
<version>${mule.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-http</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-spring-config</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>Central</id>
<name>Central</name>
<url>http://repo1.maven.org/maven2/</url>
<layout>default</layout>
</repository>
<repository>
<id>mulesoft-releases</id>
<name>MuleSoft Releases Repository</name>
<url>http://repository.mulesoft.org/releases/</url>
<layout>default</layout>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>mulesoft-release</id>
<name>mulesoft release repository</name>
<layout>default</layout>
<url>http://repository.mulesoft.org/releases/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>
And I keep getting the following error:
[INFO] No application configured. Using project artifact: C:\workspace\maven-test\target\maven-test-1.0.0-SNAPSHOT.zip
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.383 s
[INFO] Finished at: 2018-07-03T10:33:29-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.mule.tools.maven:mule-maven-plugin:2.2.1:deploy (default-cli) on project maven-test: Execution default-cli of goal org.mule.tools.maven:mule-maven-plugin:2.2.1:deploy failed.: NullPointerException -> [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/PluginExecutionException
I have tried changing things around but can't seem to find anything that works or a detailed explanation of how to get the thing to work. Can someone please tell me what I am missing?
There are a few things wrong here. target, targetType and domain are not applicable for CloudHub deployments via the mule-maven-plugin, and you need to provide some more info (like workerType) Make sure you specify businessGroup as well. Here's an example of a configuration that has yielded a successful deployment for me in the past:
<plugin>
<groupId>org.mule.tools.maven</groupId>
<artifactId>mule-maven-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<skip>false</skip>
<deploymentType>${deployment.type}</deploymentType>
<muleVersion>${mule.version}</muleVersion>
<username>${username}</username>
<password>${password}</password>
<applicationName>${application.name}</applicationName>
<environment>${arm.environment}</environment>
<businessGroup>${business.group}</businessGroup>
<region>${region}</region>
<workerType>${worker.type}</workerType>
<workers>${workers}</workers>
<redeploy>${redeploy}</redeploy>
<properties>
<env>${mule.env}</env>
<vault.key>${vault.key}</vault.key>
</properties>
</configuration>
<executions>
<execution>
<id>deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
You can replace the placeholders with your values. Information on what all these fields are can be found here in the documentation.

Running an Apache Beam/Google Cloud Dataflow job from a maven-built jar

I have a Google Cloud Dataflow job that I'm running from IntelliJ IDEA using the following command string:
compile exec:java -Dexec.mainClass=com.mygroup.mainclass "-Dexec.args=--..."
It runs fine from here, I want to deploy this onto a local server to be run automatically at build time. The args specify pipeline options; at any given build we need to start three different jobs using this pipeline and having to recompile three times is wasteful. So I'm using mvn package to produce a jar file in the following manner:
clean compile assembly:single
The problem is, when I run the pipeline via java -jar my_pipeline-1.0-SNAPSHOT-jar-with-dependencies.jar --args in the project's target directory, I'm getting an exception:
Exception in thread "main" java.lang.IllegalArgumentException:
Unknown 'runner' specified 'DataflowRunner', supported pipeline runners [DirectRunner]
Posts on the Beam mailing list suggest passing -Pdataflow-runner to set the classpath at execution time, but I haven't found a way to make that work if I'm just calling the jar. I've tried specifying the profile during the compile and package steps, but that hasn't helped.
Here's my pom.xml. It might be a little messy; I've been trying the scattershot approach to trying to make this work but nothing has stuck to the wall yet.
<?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.mygroup</groupId>
<artifactId>data_dump</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<slf4j.version>1.7.5</slf4j.version>
<junit.version>4.8.2</junit.version>
<hamcrest.version>1.3</hamcrest.version>
<mockito.version>1.10.19</mockito.version>
<bigquery.version>v2-rev312-1.22.0</bigquery.version>
<powermock.version>1.6.6</powermock.version>
<beam.version>2.0.0</beam.version>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>com.mygroup.mainclass</mainClass>
<addClasspath>true</addClasspath>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<!-- Build an executable JAR -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>.</classpathPrefix>
<mainClass>com.mygroup.mainclass</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/**</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<configuration>
<aggregate>true</aggregate>
</configuration>
<executions>
<execution>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>java</executable>
<arguments>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>direct-runner</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<!-- Makes the DirectRunner available when running a pipeline. -->
<dependencies>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-runners-direct-java</artifactId>
<version>${beam.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>dataflow-runner</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<dependencies>
<dependency>
<groupId>com.google.cloud.dataflow</groupId>
<artifactId>google-cloud-dataflow-java-sdk-all</artifactId>
<version>${beam.version}</version>
</dependency>
</dependencies>
</profile>
<profile>
<id>flink-runner</id>
<!-- Makes the FlinkRunner available when running a pipeline. -->
<dependencies>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-runners-flink_2.10</artifactId>
<version>${beam.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-core</artifactId>
<version>${beam.version}</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquery</artifactId>
<version>0.18.0-beta</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.google.cloud.dataflow</groupId>
<artifactId>google-cloud-dataflow-java-sdk-all</artifactId>
<version>${beam.version}</version>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-runners-direct-java</artifactId>
<version>${beam.version}</version>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-io-google-cloud-platform</artifactId>
<version>${beam.version}</version>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-runners-google-cloud-dataflow-java</artifactId>
<version>${beam.version}</version>
<scope>runtime</scope>
</dependency>
<!-- slf4j API frontend binding with JUL backend -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>RELEASE</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-storage</artifactId>
<version>5.0.0</version>
</dependency>
<dependency>
<groupId>com.esotericsoftware.yamlbeans</groupId>
<artifactId>yamlbeans</artifactId>
<version>1.08</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.1</version>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-easymock</artifactId>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>3.4</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>apache-maven-repo</id>
<name>Apache Nightlies</name>
<url>https://repository.apache.org/content/repositories/snapshots/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</project>
Okay, I've solved this. There were a couple of things wrong with my pom.
First, the dependencies were in the wrong order. I moved the beam-runners-google-cloud-dataflow-java dependency to the top of the list and the error I was receiving went away.
I further encountered another exception:
Caused by: java.lang.IllegalStateException: Unable to find registrar for gs.
Following the instructions in this question and building with package instead of assembly, I was able to get my job to start. Whew!
I could fix it by adding activation tag to the dataflow-runner profile, seems missing in WordCount example 2.25 I test.
<activation>
<activeByDefault>true</activeByDefault>
</activation>

Resources