Execution default of goal com.smartbear.soapui:soapui-maven-plugin:4.6.1:test failed - maven

Our SOAPUI test project has recently started failing with the message:
59626 [INFO] ------------------------------------------------------------------------
59626 [INFO] BUILD FAILURE
59626 [INFO] ------------------------------------------------------------------------
59627 [INFO] Total time: 56.863 s
59627 [INFO] Finished at: 2019-08-06T09:57:17+00:00
59703 [INFO] Final Memory: 13M/56M
59704 [INFO] ------------------------------------------------------------------------
59745 [ERROR] Failed to execute goal com.smartbear.soapui:soapui-maven-plugin:4.6.1:test (default) on project SIFIntegrationTest: Execution default of goal com.smartbear.soapui:soapui-maven-plugin:4.6.1:test failed: Plugin com.smartbear.soapui:soapui-maven-plugin:4.6.1 or one of its dependencies could not be resolved: The following artifacts could not be resolved: fife:rsyntaxtextarea:jar:2.0.1, groovy:groovy-all:jar:1.8.0: Could not find artifact fife:rsyntaxtextarea:jar:2.0.1 in smartbear-sweden-plugin-repository (http://smartbearsoftware.com/repository/maven2/) -> [Help 1]
We havent made any changes to it for weeks but now Maven cannot find a couple of JARs.
The pom.xml is:
<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.sif</groupId>
<artifactId>Test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<repositories>
<repository>
<id>smartbear-sweden-repository</id>
<url>http://smartbearsoftware.com/repository/maven2/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>smartbear-sweden-plugin-repository</id>
<url>http://smartbearsoftware.com/repository/maven2/</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-maven-plugin</artifactId>
<version>4.6.1</version>
<configuration>
<projectFile>Tests-soapui-project.xml</projectFile>
<outputFolder>${project.build.directory}/surefire-reports</outputFolder>
<junitReport>true</junitReport>
<printReport>false</printReport>
</configuration>
<executions>
<execution>
<goals>
<goal>test</goal>
</goals>
<phase>test</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
I guess SmartBear has changed their Maven repos, is there a way to fix this?
Our project is on a GitLab CI / CD pipeline using a Maven Image, we have tried directly on GitLab.com to eliminate our network and it still fails there.
Cheers,
Steve

Related

Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.5:sign (sign-artifacts) on project playerinputs: Exit code: 1 -> [Help 1]

I was trying to upload my first api to the maven central but I continue getting this error. I haven't been able to solve it. I am running mvn clean deploy
I have read that running mvn clean deploy -Dgpg.skip=true could work but it doesn't. I also have read this threads: stackoverflow github but it doesn't work
Here is the error
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.411 s
[INFO] Finished at: 2020-06-07T14:15:53+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.5:sign (sign-artifacts) on project playerinputs: Exit code: 1 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I have checked the page that is linked in the error but I coudn't love it
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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.MrNemo64</groupId>
<artifactId>playerinputs</artifactId>
<version>1.2</version>
<name>PlayerInputs</name>
<description>Useful clases to get player inputs in several ways</description>
<url>https://github.com/MrNemo64/player-inputs</url>
<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
</license>
</licenses>
<developers>
<developer>
<name>Javier Rodríguez Pérez</name>
<email>my.nemo_64.otravez#gmail.com</email>
<organization>org.github.MrNemo64</organization>
<organizationUrl>https://github.com/MrNemo64/player-inputs</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/MrNemo64/player-inputs.git</connection>
<developerConnection>scm:git:ssh://github.com:MrNemo64/player-inputs.git</developerConnection>
<url>https://github.com/MrNemo64/player-inputs</url>
</scm>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
<!-- This adds the Spigot Maven repository to the build -->
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
<dependencies>
<!--This adds the Bukkit API artifact to the build -->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.13.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
</dependency>
</dependencies>
</project>
Tell me if you need more information and thanks for the help!
In some cases if you are using gpg plugin to sign your artifacts you might get the following error and the build will fail.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.5:sign (sign-artifacts) on project testng-parser: Exit code: 2
If you get the above error there are few ways to skip artifact signing and carryout your build.
Method 1 : Editing your POM
You can disable the gbp plugin from the POM or skip the signing of artifacts. Refer the following.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
Method 2 : Disabling at runtime
You can also disable gpg signing at runtime by running the mvn build with following parameter.
mvn clean install -Dgpg.skip
Or as
mvn clean install -Dgpg.skip=true

Vaadin custom client side widget cannot compile 'No plugin found for prefix 'vaadin''

I trying to create a custom client side widget with eclipse IDE. when i click compile widgetset option from the toolbar it stops with following error. This topic is a duplicate, but no suitable answer.
[INFO] Scanning for projects...
[INFO] Downloading:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
metadata.xml
[INFO] Downloading:
https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
[INFO] Downloaded:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
metadata.xml (13 KB at 6.2 KB/sec)
[INFO] Downloaded:
https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
(20 KB at 8.4 KB/sec)
[INFO] ---------------------------------------------------------------------
---
[INFO] BUILD FAILURE
[INFO] ---------------------------------------------------------------------
---
[INFO] Total time: 5.004 s
[INFO] Finished at: 2017-07-04T15:48:53+05:30
[INFO] Final Memory: 15M/143M
[INFO] ---------------------------------------------------------------------
---
[ERROR] No plugin found for prefix 'vaadin' in the current project and in
the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available
from the repositories [local (C:\Users\xxxx\.m2\repository), central
(https://repo.maven.apache.org/maven2)] -> [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]
My Pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>logicalintelligence.widget.navigationdrawer</groupId>
<artifactId>navigationdrawer</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>Navigationdrawer Add-on</name>
<prerequisites>
<maven>3</maven>
</prerequisites>
<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>
<vaadin.version>7.7.10</vaadin.version>
<vaadin.plugin.version>7.7.10</vaadin.plugin.version>
<!-- ZIP Manifest fields -->
<Implementation-Version>${project.version}</Implementation-Version>
<!-- Must not change this because of the Directory -->
<Implementation-Title>${project.name}</Implementation-Title>
<Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
<Vaadin-License-Title>Apache License 2.0</Vaadin-License-Title>
<Vaadin-Addon>${project.artifactId}-${project.version}.jar</Vaadin-Addon>
</properties>
<licenses>
<license>
<name>Apache 2</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<repositories>
<repository>
<id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-server</artifactId>
<version>${vaadin.version}</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client</artifactId>
<version>${vaadin.version}</version>
<scope>provided</scope>
</dependency>
<!-- This can be replaced with TestNG or some other test framework supported by the surefire plugin -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
<configuration>
<archive>
<index>true</index>
<manifest>
<addClasspath>true</addClasspath>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<!-- Package format version - do not change -->
<Vaadin-Package-Version>1</Vaadin-Package-Version>
<Vaadin-License-Title>${Vaadin-License-Title}</Vaadin-License-Title>
<Vaadin-Widgetsets>logicalintelligence.widget.navigationdrawer.navigationdrawer.WidgetSet</Vaadin-Widgetsets>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<executions>
<execution>
<id>attach-javadoc</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<goals>
<goal>single</goal>
</goals>
<phase>install</phase>
</execution>
</executions>
</plugin>
<!-- Testing -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
</plugin>
</plugins>
<!-- This is needed for the sources required by the client-side compiler to be
included in the produced JARs -->
<resources>
<resource>
<directory>src/main/java</directory>
<excludes>
<exclude>rebel.xml</exclude>
</excludes>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
<profiles>
<profile>
<!-- Vaadin pre-release repositories -->
<id>vaadin-prerelease</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<repositories>
<repository>
<id>vaadin-prereleases</id>
<url>http://maven.vaadin.com/vaadin-prereleases</url>
</repository>
<repository>
<id>vaadin-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>vaadin-prereleases</id>
<url>http://maven.vaadin.com/vaadin-prereleases</url>
</pluginRepository>
<pluginRepository>
<id>vaadin-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</project>
Yes Morfic is right, I solved the problem by adding followings to the pom.xml
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.plugin.version}</version>
<executions>
<execution>
<goals>
<goal>update-theme</goal>
<goal>update-widgetset</goal>
<goal>compile</goal>
<!-- Comment out compile-theme goal to use on-the-fly theme compilation -->
<goal>compile-theme</goal>
</goals>
</execution>
</executions>
</plugin>

How can you use a dependency from the plugin's dependency scope in the maven-antrun-plugin?

We have a profile that uses maven-antrun-plugin to run a downloaded JAR.
Exhibit A: (this works)
We can reference the downloaded JAR using the property ${maven.dependency.com.foobar.target-jar.jar.path} (Can I use the path to a Maven dependency as a property?). But in this solution, the custom dependency and repository information isn't limited to just the scope of the profile.
<project>
...
<repositories>
<repository>
<id>thirdparty</id>
<name>Third Party</name>
<url>
[URL for the repository that holds the target JAR]
</url>
<layout>default</layout>
</repository>
</repositories>
...
<dependencies>
<dependency>
<groupId>com.foobar</groupId>
<artifactId>target-jar</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
...
<profiles>
<profile>
<id>runJARprofile</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<inherited>false</inherited>
<executions>
<execution>
<id>run-jar</id>
<phase>package</phase>
<configuration>
<target name="runJar" fork="true">
<java jar="${maven.dependency.com.foobar.target-jar.jar.path}" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
...
</project>
Exhibit B: (haven't gotten it working)
Here, we moved the dependency and repository information into the profile. Maven downloads the artifact successfully, but we no longer know how to reference it by property.
<project>
...
<profiles>
<profile>
<pluginRepositories>
<repository>
<id>thirdparty</id>
<name>Third Party</name>
<url>
[URL for the repository that holds the target JAR]
</url>
<layout>default</layout>
</repository>
</pluginRepositories>
...
<id>runJARprofile</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<inherited>false</inherited>
<dependencies>
<dependency>
<groupId>com.foobar</groupId>
<artifactId>target-jar</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>run-jar</id>
<phase>package</phase>
<configuration>
<target name="runJar" fork="true">
<java jar="${?????}" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
...
</project>
I crated a POM similar to your Exhibit B here and got the following message during a mvn package -P runJARprofile:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run
(run-jar) on project so-36848518: An Ant BuildException has occured:
Cannot execute a jar in non-forked mode. Please set fork='true'.
[ERROR] around Ant part ...<java jar="${my:test:jar}"/>...
I changed the respective line to:
<java jar="${my:test:jar} fork="true"/>
and:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

How to enable java 7 in maven of Apache Storm 0.9.3

I'm currently using Apache Storm 0.9.3 in Ubuntu 14.04 LTS. I encounter that the maven compiler in Apache Storm 0.9.3 keep on using Java 6 although I had installed Java 7.
The Java version in my Ubuntu:
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) Client VM (build 24.80-b11, mixed mode)
The Maven version in my Ubuntu:
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.7.0_80, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-52-generic", arch: "i386", family: "unix"
Below are the error I encounter:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.apache.storm:storm-starter:jar:0.9.3
[WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. # org.apache.storm:storm:0.9.3, /home/user/.m2/repository/org/apache/storm/storm/0.9.3/storm-0.9.3.pom, line 694, column 21
[WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-report-plugin is missing. # org.apache.storm:storm:0.9.3, /home/user/.m2/repository/org/apache/storm/storm/0.9.3/storm-0.9.3.pom, line 660, column 21
[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] ------------------------------------------------------------------------
[INFO] Building storm-starter 0.9.3
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-remote-resources-plugin:1.2.1:process (default) # storm-starter ---
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) # storm-starter ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 8 resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # storm-starter ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 48 source files to /home/user/storm/examples/storm-starter/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/user/storm/examples/storm-starter/src/jvm/storm/starter/bolt/PNMSTD.java:[79,19] strings in switch are not supported in -source 1.6
(use -source 7 or higher to enable strings in switch)
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.856s
[INFO] Finished at: Sun May 31 06:55:27 MYT 2015
[INFO] Final Memory: 18M/51M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project storm-starter: Compilation failure
[ERROR] /home/user/storm/examples/storm-starter/src/jvm/storm/starter/bolt/PNMSTD.java:[79,19] strings in switch are not supported in -source 1.6
[ERROR] (use -source 7 or higher to enable strings in switch)
[ERROR] -> [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
Below are part of /home/user/.m2/repository/org/apache/storm/storm/0.9.3/storm-0.9.3.pom related to maven:
<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>
<prerequisites>
<maven>3.0.0</maven>
</prerequisites>
<modules>
<module>storm-buildtools/maven-shade-clojure-transformer</module>
<module>storm-core</module>
<module>examples/storm-starter</module>
<module>external/storm-kafka</module>
<module>external/storm-hdfs</module>
<module>external/storm-hbase</module>
</modules>
<profiles>
<profile>
<id>sign</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>dist</id>
<modules>
<module>storm-dist/binary</module>
<module>storm-dist/source</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<distributionManagement>
<site>
<id>storm.maven.website</id>
<name>Storm Website</name>
<url>file:///tmp/site</url>
</site>
</distributionManagement>
<repositories>
<repository>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<url>http://repo1.maven.org/maven2/</url>
</repository>
<repository>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>clojars</id>
<url>https://clojars.org/repo/</url>
</repository>
</repositories>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5</version>
</plugin>
<plugin>
<groupId>com.theoryinpractise</groupId>
<artifactId>clojure-maven-plugin</artifactId>
<version>1.3.18</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.16</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.7</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<tagNameFormat>v#{project.version}</tagNameFormat>
</configuration>
</plugin>
<plugin>
<groupId>com.theoryinpractise</groupId>
<artifactId>clojure-maven-plugin</artifactId>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.11</version>
<reportSets>
<reportSet>
<reports>
<report>checkstyle</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.0.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<configuration>
<reportsDirectories>
<file>${project.build.directory}/test-reports</file>
<file>${project.build.directory}/surefire-reports</file>
</reportsDirectories>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>taglist-maven-plugin</artifactId>
<version>2.4</version>
<configuration>
<tagListOptions>
<tagClasses>
<tagClass>
<displayName>Todo Work</displayName>
<tags>
<tag>
<matchString>TODO</matchString>
<matchType>exact</matchType>
</tag>
<tag>
<matchString>FIXME</matchString>
<matchType>exact</matchType>
</tag>
</tags>
</tagClass>
</tagClasses>
</tagListOptions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>0.11</version>
<configuration>
<excludeSubProjects>false</excludeSubProjects>
<excludes>
<!-- exclude maven artifacts -->
<exclude>**/target/**</exclude>
<!-- exclude intellij projects -->
<exclude>**/*.iml</exclude>
<!-- exclude CHANGELOG, VERSION, AND TODO files -->
<exclude>**/CHANGELOG.md</exclude>
<exclude>**/README.md</exclude>
<exclude>**/README.markdown</exclude>
<exclude>**/DEVELOPER.md</exclude>
<exclude>**/BYLAWS.md</exclude>
<exclude>**/STORM-UI-REST-API.md</exclude>
<exclude>SECURITY.md</exclude>
<exclude>VERSION</exclude>
<exclude>TODO</exclude>
<!-- thrift-generated code -->
<exclude>**/src/py/**</exclude>
<!-- the following are in the LICENSE file -->
<exclude>**/src/ui/public/js/jquery-1.6.2.min.js</exclude>
<exclude>**/src/ui/public/js/jquery.cookies.2.2.0.min.js</exclude>
<exclude>**/src/ui/public/js/jquery.tablesorter.min.js</exclude>
<exclude>**/src/ui/public/js/moment.min.js</exclude>
<exclude>**/src/ui/public/js/jquery.blockUI.min.js</exclude>
<exclude>**/src/ui/public/js/url.min.js</exclude>
<exclude>**/src/ui/public/js/arbor.js</exclude>
<exclude>**/src/ui/public/js/arbor-graphics.js</exclude>
<exclude>**/src/ui/public/js/arbor-tween.js</exclude>
<exclude>**/src/ui/public/js/jquery.mustache.js</exclude>
<exclude>**/src/ui/public/js/purl.js</exclude>
<!-- generated by shade plugin -->
<exclude>**/dependency-reduced-pom.xml</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</reporting>
Firstly you must have installed the Java 7.
As indicated in
[WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. # org.apache.storm:storm:0.9.3, /home/user/.m2/repository/org/apache/storm/storm/0.9.3/storm-0.9.3.pom, line 694, column 21
[WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-report-plugin is missing. # org.apache.storm:storm:0.9.3, /home/user/.m2/repository/org/apache/storm/storm/0.9.3/storm-0.9.3.pom, line 660, column 21
Go to your home directory and cd to /.m2/repository/org/apache/storm/storm/0.9.3/ then nano or vi storm-0.9.3.pom.
Search for
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
modified the 1.6 to 1.7 if you intend to use java-7-oracle. If you're using nano, you can easily search using Ctrl+W <source>1.6</source>

Deploying Maven assembly ZIP to nexus

I am using the assembly plugin to build a jar with dependancies and then zip the project. The zip should then be uploaded to nexus. The clean install works and generates the zip file as expected. The deploy command fails:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Analytics Feed Auditor
[INFO] task-segment: [deploy]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [jar:jar]
[INFO] [assembly:single {execution: jar-with-dependencies}]
[INFO] Processing DependencySet (output=)
[INFO] Building jar: C:\code\imt workspaces\uat-trunk\AnalyticsAudit\target\AnalyticsAudit-1
.0-jar-with-dependencies.jar
[INFO] [assembly:single {execution: RELEASE}]
[INFO] Reading assembly descriptor: dist.xml
[INFO] Building zip: C:\code\imt workspaces\uat-trunk\AnalyticsAudit\target\AnalyticsAudit-1
.0-RELEASE.zip
[INFO] [install:install]
[INFO] Installing C:\code\imt workspaces\uat-trunk\AnalyticsAudit\target\AnalyticsAudit-1.0.
jar to C:\SVNRepository\com\dec\gbm\gb\gcf\amg\fo\AnalyticsAudit\1.0\AnalyticsAudit-1.0.jar
[INFO] Installing C:\code\imt workspaces\uat-trunk\AnalyticsAudit\target\AnalyticsAudit-1.0-
jar-with-dependencies.jar to C:\SVNRepository\com\dec\gbm\gb\gcf\amg\fo\AnalyticsAudit\1.0\Analytic
sAudit-1.0-jar-with-dependencies.jar
[INFO] Installing C:\code\imt workspaces\uat-trunk\AnalyticsAudit\target\AnalyticsAudit-1.0-
RELEASE.zip to C:\SVNRepository\com\dec\gbm\gb\gcf\amg\fo\AnalyticsAudit\1.0\AnalyticsAudit-1.0-REL
EASE.zip
[INFO] [deploy:deploy]
altDeploymentRepository = null
Uploading: https://dsnexus.uk.hibm.dec:8081/nexus/content/repositories/releases/com/dec/gbm/gb/gcf
/amg/fo/AnalyticsAudit/1.0/AnalyticsAudit-1.0.jar
6K uploaded
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error deploying artifact: Failed to transfer file: https://dsnexus.uk.hibm.dec:8081/nexus/co
ntent/repositories/releases/com/dec/gbm/gb/gcf/amg/fo/AnalyticsAudit/1.0/AnalyticsAudit-1.0.jar. Re
turn code is: 400
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6 seconds
[INFO] Finished at: Fri Aug 09 15:58:22 BST 2013
[INFO] Final Memory: 14M/35M
[INFO] ------------------------------------------------------------------------
I have a few issues here. Firstly, I want to have a custom ZIP filename rather than the default one. Secondly, only the ZIP file should be deployed to Nexus and not the jars. Thirdly, why isn't the deploy working in it's current state? And lastly, can you please tell me how I can automatically download the last release from nexus using wget maybe?
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project ....>
<modelVersion>4.0.0</modelVersion>
<groupId>com.dec.gbm.gb.gcf.amg.fo</groupId>
<artifactId>AnalyticsAudit</artifactId>
<version>1.0</version>
<name>Analytics Feed Auditor</name>
<description>Analytics Feed Auditor</description>
<packaging>jar</packaging>
<distributionManagement>
<repository>
<id>releases</id>
<name>Internal Releases</name>
<url>...</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>Internal Snapshots</name>
<url>...</url>
</snapshotRepository>
</distributionManagement>
<repositories>
<repository>
<id>releases</id>
<name>Nexus Repository</name>
<url>...</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>releases</id>
<name>Nexus Repository</name>
<url>...</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<properties>
<project.build.sourceEncoding>Cp1252</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.vicar</groupId>
<artifactId>vicar</artifactId>
<version>3.6</version>
<scope>system</scope>
<systemPath>
${project.basedir}/lib/vicar-3.6.jar
</systemPath>
</dependency>
<dependency>...
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>jar-with-dependencies</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptorRefs>
<descriptorRef>
jar-with-dependencies
</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>
lib/
</classpathPrefix>
<mainClass>
com.dec.gbm.gb.gcf.amg.fo.AnalyticsAuditor
</mainClass>
</manifest>
</archive>
</configuration>
</execution>
<execution>
<id>RELEASE</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>dist.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
dist.xml
<assembly>
<id>RELEASE</id>
<formats>
<format>zip</format>
</formats>
<files>
<file>
<source>
target/${project.artifactId}-${project.version}-jar-with-dependencies.jar
</source>
<outputDirectory>lib</outputDirectory>
</file>
<file>
<source>${project.basedir}/bin/AnalyticsAudit.cmd</source>
<outputDirectory />
</file>
<file>
<source>
${project.basedir}/resources/analytics_audit.properties
</source>
<outputDirectory>resources</outputDirectory>
</file>
<file>
<source>${project.basedir}/lib/vicar-3.6.jar</source>
<outputDirectory>lib</outputDirectory>
</file>
</files>
I've spent too long on this and tried too much. I'd be very grateful for any help.
Basically you cannot deploy a zip using a maven-assembly plugin. Assembly part is a part of packaging, while deployment happens later. Check if this link is useful
Deploying assembly package with maven-release-plugin
OR
You can use this plugin to deploy the zip or tar file maven-build-helper-plugin
When Nexus returns 400 status it means you are uploading artifact which is not allowed to be uploaded into particular repository, for example you are trying to upload snapshot into releases repository.
I guess you are trying to deploy it as a snapshot with "mvn deploy". Try "mvn release:prepare release:perform" insted to release it as stable version into "releases" repository. You should'nt get that 400 status response anymore.
<!--Make it a fat jar-->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!--this is used for inheritance merges-->
<phase>package</phase> <!--bind to the packaging phase-->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
In order to deploy a *.zip file to Nexus, you need to have proper pom.xml and assembly.xml files.
This is the pom.xml you need:
<project>
<groupId>a.b</groupId>
<artifactId>deploy-to-nexus</artifactId>
<version>1.0-SNAPSHOT</version>
<!--
it needs to be 'pom', otherwise maven will
generate an <artifactId>-<version>.jar file as well
-->
<packaging>pom</packaging>
<!-- nexus repositories -->
<distributionManagement>
<repository>
<id>deploy-to-nexus-releases</id>
<url>http://...</url>
</repository>
<snapshotRepository>
<id>deploy-to-nexus-snapshots</id>
<url>http://...</url>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
<!-- assembly plugin will be activated by 'mvn package' -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
My comments:
There are changes in configuration from v3.1.1 version of the maven-assembly-plugin.
If you do not change the type of packaging in the pom.xml then Maven will create you a *.zip plus a *.jar file as well because of the default value of this property is jar.
If the version of your pom ends with -SNAPSHOT then your zip file will be uploaded into the repository ends with snapshots, otherwise releases repository is used.
An example for assembly.xml:
<assembly>
<id>bundle</id>
<formats>
<format>zip</format>
</formats>
<fileSets>
<!-- add some files -->
<fileSet>
<directory>...</directory>
<outputDirectory>...</outputDirectory>
<includes>
<include>**</include>
</includes>
</fileSet>
</fileSets>
</assembly>
Then
mvn clean package command will create your *.zip file.
mvn clean deploy command will upload your zip to Nexus.
Usually, you are not allowed upload the same version of your artifacts into the releases repository twice. If you try to do this then you will get back status code 400:
Failed to deploy artifacts: Could not transfer artifact a.b:deploy-to-nexus:pom:1.0 from/to ..... (http://.....-releases): Failed to transfer file http://..../deploy-to-nexus/1.0/deploy-to-nexus-1.0.pom with status code 400
Hope that it helps you.

Resources