Jenkins + Maven + TestNG = MojoFailureException - java

When I run in Eclipse, Maven and TestNG work fine and pass, but when I run in Jenkins, the following failure message appears:
MojoFailureException
Unlike many other errors, this exception is not generated by the Maven core itself but by a plugin. As a rule of thumb, plugins use this error to signal a failure of the build because there is something wrong with the dependencies or sources of a project, e.g. a compilation or a test failure.
The concrete meaning of the exception depends on the plugin so please have a look at its documentation. The documentation for many common Maven plugins can be reached via our plugin index.
This is my 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.techbeamers</groupId>
<artifactId>loadtesting</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Load Testing</name>
<description>Selenium Load Testing Example using TestNG and Maven</description>
<properties>
<selenium.version>2.53.1</selenium.version>
<testng.version>6.9.10</testng.version>
</properties>
<build>
<plugins>
<!-- Below plug-in is used to execute tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<suiteXmlFiles>
<!-- TestNG suite XML files -->
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
</plugins>
</build>
<!-- Include the following dependencies -->
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<type>maven-plugin</type>
</dependency>
</dependencies>
</project>
Please help -- I don't know what's wrong with my plugin or dependencies.

The first possible problem I see: you define the property: testng.version, set the value to: 6.9.10, but then ignore the testng.version property later in your pom.xml, and set the <version> of TestNG to: 6.8.
Try changing the definition of your TestNG <dependency> from what you curently have:
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8</version>
<scope>test</scope>
</dependency>
So that the definition is defined as follows:
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>${testng.version}</version>
<scope>test</scope>
</dependency>

Related

Intellij mvn install complains "cannot access <package>" during testComplile after adding cucumber-junit-platform-engine dependency in pom.xml

I am planning to use Cucumber Test with Junit 5 in Maven. So I followed cucumber to install different maven dependency. I added a runner class to execute my cucumber tests
package pirate;
import org.junit.platform.suite.api.ConfigurationParameter;
import org.junit.platform.suite.api.IncludeEngines;
import org.junit.platform.suite.api.SelectClasspathResource;
import org.junit.platform.suite.api.Suite;
import static io.cucumber.junit.platform.engine.Constants.GLUE_PROPERTY_NAME;
#Suite
#IncludeEngines("cucumber")
#SelectClasspathResource("pirate")
#ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "pirate")
public class Runner {}
I also created a new folder name pirate under resources folder and move all .feature files into that new folder.
But when I execute mvn clean install, the command fails at testCompile:
It seems like the compiler can't read the package name?
Below is my 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>onetwothree</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>onetwothree</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<testSourceDirectory>src/test/java</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<properties>
<configurationParameters>
cucumber.junit-platform.naming-strategy=long
</configurationParameters>
</properties>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.9.0</version>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>7.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit-platform-engine</artifactId>
<version>7.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite</artifactId>
<version>1.9.0</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
My project structure is:
but if I comment out cucumber-junit-platform-engine dependency in pom.xml, the error is gone but it won't run the cucumber tests. Did I miss something here?
Not sure if it's related, but one of the error messages is like:
[ERROR] error reading /Users/xx/.m2/repository/org/junit/platform/junit-platform-engine/1.9.1/junit-platform-engine-1.9.1.jar; zip file is empty
[ERROR] /Users/xx/Desktop/zz/src/test/java/pirate/Runner.java:[1,1] cannot access pirate
ZipException opening "junit-platform-engine-1.9.1.jar": zip END header not found
Maven : error in opening zip file when running maven
following the procedure fixes the "cannot access " problem.
did you tried with a different scope than test for the cucumber-junit-platform-engine dependency?

Unable to import any javax-servlet in Maven project in Netbeans

I am making a Maven project it is my first time with Maven. I'm using Netbeans and Tomcat server and I am not able to import any javax.servlet e.g. import javax.servlet.RequestDispatcher; etc. It looks like that:
There is info: javax.servlet does not exist and a solution proposed by Netbeans is for example: "Search Dependency at Maven Repository for javax.servlet.RequestDispatcher. When I click it then there is a pop-up window without anything to do:
I have the pom.xml file located in C://pathToNetbeansProjects/myProject/pom.xml
and I added a dependency for javax-servlet now my pom.xml looks like this:
<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>org.glassfish.jersey.archetypes</groupId>
<artifactId>ParkingSystem</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>ParkingSystem</name>
<build>
<finalName>ParkingSystem</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<inherited>true</inherited>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.glassfish.jersey</groupId>
<artifactId>jersey-bom</artifactId>
<version>${jersey.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<!-- use the following artifactId if you don't need servlet 2.x compatibility -->
<!-- artifactId>jersey-container-servlet</artifactId -->
</dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
</dependency>
<!-- uncomment this to get JSON support -->
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-binding</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
<properties>
<jersey.version>2.27</jersey.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
I have no more ideas if I am doing something wrong with my pom.xml or maybe I need to do something in Netbeans to make it work. But I don't know really what.
The problem is 99% caused by a different import done by Maven on that library.
Maven imports your libs following a hierarchical manner, so probably there's some lib that you have imported that contains the javax.servlet, but it's not the version that you need.
First I suggest you to looking for which one is doing that for resolving the conflict by looking into maven hierarchy, you can achieve this with console command mvn dependency:tree -Dverbose ( look here for an example).
Then you can omit the unwanted libraries by a specific maven command inside your library:
<dependency>
....
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
This is an explanation useful for understanding "why" is happening this, so you can understand it.
Btw a quick fix, that you can try as first instance, is moving the import you wanted
javax.servlet as first element of your pom.
Force update your maven project or run
mvn clean install
on your project's directory to download all dependency of pom.xml. Build your project then and javax-servlet will be available.

Maven TinyB failure: package tinyb does not exist

I am trying to do a program where I need using Aws sdk and TinyB library. FOr that reason I have decided to use maven to create the project and resolve the dependencies. However, I have been trying to compile the project with the package TinyB for more than a week without success. I would be very grateful if someone could teach me what I am doing wrong.
The failure message I am receving is the following:
C:/Users/fran/Desktop/RSSI_AWS_PROJECT/BleDistanceMeasurement/src/main/java/org/tfm/app/BleMng.java:[7,1]
package tinyb does not exist
And my 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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.tfm.app</groupId>
<artifactId>BleDistanceMeasurement</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>BleDistanceMeasurement</name>
<url>http://maven.apache.org</url>
<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>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>1.11.327</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-iot</artifactId>
<version>1.10.34</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-iot-device-sdk-java</artifactId>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-iot-device-sdk-java-samples</artifactId>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.kura</groupId>
<artifactId>tinyb</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>tinyb</id>
<url>https://repo.eclipse.org/content/groups/releases/</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
I have opened the project with Eclipse IDE to know what is happening but I have seen that eclipse is recognizing the dependencies correctly.
TinyB dependencie scan
Project dependencies
TinyB library I have downloaded and compiled the source from here:
https://github.com/intel-iot-devkit/tinyb
But there is no maven repositories directly from intel so I have added the one form eclipse kura:
<!-- https://mvnrepository.com/artifact/org.sputnikdev/bluetooth-manager-tinyb -->
<dependency>
<groupId>org.sputnikdev</groupId>
<artifactId>bluetooth-manager-tinyb</artifactId>
<version>1.0</version>
</dependency>
This one gives me problems when compiling, it seems as if the repository hasn't been downloaded. But the foder with the jar exists (it shows the error quoted previously).
I have made some little programs with TinyB and they are working perfectly, so the program is compiled and installed correctly. The problem is I am not using maven in this little programs (I just add the import and point to the .jar when executing). Like this:
sudo java -cp examples/java/HelloTinyB.jar:/usr/lib/lib/java/tinyb.jar HelloTinyB
I have also try this other maven repository:
<!-- https://mvnrepository.com/artifact/org.sputnikdev/bluetooth-manager-tinyb -->
<dependency>
<groupId>org.sputnikdev</groupId>
<artifactId>bluetooth-manager-tinyb</artifactId>
<version>1.3.2</version>
</dependency>
In this case it recognizes the dependencies and compiles. The problem is it gives error when I try to execute the program:
java.lang.RuntimeException: Native library is out of date. Please update the native library.
at tinyb.BluetoothManager.getBluetoothManager (BluetoothManager.java:317)
Thank you very much for your help.
I see you are trying to use eclipse Kura too.
Did you achieve making it work?
I have the same issue.
By the way, I see that maybe your dependencies are not really valid, as sputnikdev has a library over tinyB, but, finally I have the same problem than you. These are my main dependencies:
<!-- https://mvnrepository.com/artifact/org.sputnikdev/org.eclipse.smarthome.binding.bluetooth.transport.tinyb -->
<dependency>
<groupId>org.sputnikdev</groupId>
<artifactId>bluetooth-manager</artifactId>
<version>1.5.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/intel-iot-devkit/tinyb -->
<dependency>
<groupId>intel-iot-devkit</groupId>
<artifactId>tinyb</artifactId>
<version>0.5.1</version>
</dependency>
<dependency>
<groupId>org.sputnikdev</groupId>
<artifactId>bluetooth-manager-tinyb</artifactId>
<version>1.3.3</version>
</dependency>

set up an application with a database - tapestry-hibernate fail

I'm trying to set up an pom.xml for my web app to connect with database. The problem occurs, when I change <artifactId>tapestry-core</artifactId> to <artifactId>tapestry-hibernate</artifactId>.
Here is output when I try to build:
The POM for org.apache.tapestry:tapestry-hibernate:jar:5.4-beta-24 is missing, no dependency information available
The POM for unknown.binary:hibernate-jpa-2.1-api-1.0.0.Final:jar:SNAPSHOT is missing, no dependency information available
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 2.177s
Finished at: Mon Mar 30 20:18:00 CEST 2015
Final Memory: 6M/15M
------------------------------------------------------------------------
Failed to execute goal on project TapestryApp: Could not resolve dependencies for project com.rile:TapestryApp:war:1.0-SNAPSHOT: Failure to find org.apache.tapestry:tapestry-hibernate:jar:5.4-beta-24 in https://repository.apache.org/content/groups/staging/ was cached in the local repository, resolution will not be reattempted until the update interval of apache-staging has elapsed or updates are forced -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
I'm using latest version of NetBeans IDE.
Here is full pom.xml file:
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>com.rile</groupId>
<artifactId>TapestryApp</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>TapestryApp</name>
<dependencies>
<!-- To set up an application with a database, change the artifactId below to
tapestry-hibernate, and add a dependency on your JDBC driver. You'll also
need to add Hibernate configuration files, such as hibernate.cfg.xml. -->
<dependency>
<groupId>org.apache.tapestry</groupId>
<artifactId>tapestry-hibernate</artifactId>
<version>${tapestry-release-version}</version>
</dependency>
<!-- Include the Log4j implementation for the SLF4J logging framework -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j-release-version}</version>
</dependency>
<!--
<dependency>
<groupId>org.apache.tapestry</groupId>
<artifactId>tapestry-hibernate</artifactId>
<version>${tapestry-release-version}</version>
</dependency>
-->
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.3.2</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.34</version>
</dependency>
<!-- Uncomment this to add support resource minification and runtime compilation -->
<!--
<dependency>
<groupId>org.apache.tapestry</groupId>
<artifactId>tapestry-yuicompressor</artifactId>
<version>${tapestry-release-version}</version>
</dependency>
-->
<!-- Uncomment this to add support for file uploads: -->
<!--
<dependency>
<groupId>org.apache.tapestry</groupId>
<artifactId>tapestry-upload</artifactId>
<version>${tapestry-release-version}</version>
</dependency>
-->
<!-- A dependency on either JUnit or TestNG is required, or the surefire plugin (which runs the tests)
will fail, preventing Maven from packaging the WAR. Tapestry includes a large number
of testing facilities designed for use with TestNG (http://testng.org/), so it's recommended. -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>${testng-release-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>${easymock-release-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.tapestry</groupId>
<artifactId>tapestry-test</artifactId>
<version>${tapestry-release-version}</version>
<scope>test</scope>
</dependency>
<!-- Provided by the servlet container, but sometimes referenced in the application
code. -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servlet-api-release-version}</version>
<scope>provided</scope>
</dependency>
<!-- Provide dependency to the Tapestry javadoc taglet which replaces the Maven component report -->
<dependency>
<groupId>org.apache.tapestry</groupId>
<artifactId>tapestry-javadoc</artifactId>
<version>${tapestry-release-version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.3.1.Final</version>
</dependency>
<dependency>
<groupId>unknown.binary</groupId>
<artifactId>hibernate-jpa-2.1-api-1.0.0.Final</artifactId>
<version>SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<finalName>TapestryApp</finalName>
<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>
<optimize>true</optimize>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7.2</version>
<configuration>
<systemPropertyVariables>
<tapestry.execution-mode>Qa</tapestry.execution-mode>
</systemPropertyVariables>
</configuration>
</plugin>
<!-- Run the application using "mvn jetty:run" -->
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.16</version>
<configuration>
<!-- Log to the console. -->
<requestLog implementation="org.mortbay.jetty.NCSARequestLog">
<!-- This doesn't do anything for Jetty, but is a workaround for a Maven bug
that prevents the requestLog from being set. -->
<append>true</append>
</requestLog>
<systemProperties>
<systemProperty>
<name>tapestry.execution-mode</name>
<value>development</value>
</systemProperty>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
<reporting/>
<repositories>
<!-- This repository is only needed when the Tapestry version is a preview release, rather
than a final release. -->
<repository>
<id>apache-staging</id>
<url>https://repository.apache.org/content/groups/staging/</url>
</repository>
<repository>
<id>unknown-jars-temp-repo</id>
<name>A temporary repository created by NetBeans for libraries and jars it could not identify. Please replace the dependencies in this repository with correct ones and delete this repository.</name>
<url>file:${project.basedir}/lib</url>
</repository>
</repositories>
<properties>
<tapestry-release-version>5.4-beta-24</tapestry-release-version>
<servlet-api-release-version>2.5</servlet-api-release-version>
<testng-release-version>6.5.2</testng-release-version>
<easymock-release-version>3.0</easymock-release-version>
<slf4j-release-version>1.7.7</slf4j-release-version>
</properties>
</project>
This version of tapestry-hibernate is not available in the maven central repository neither in Apache staging repository (you refer to it in your POM file).
If you want to go with the beta version then I suggest you to take the latest available (for example this one).
EDIT:
in the end of your POM file you have a property:
<tapestry-release-version>5.4-beta-24</tapestry-release-version>
change it to:
<tapestry-release-version>5.4-beta-28</tapestry-release-version>
EDIT2:
BTW, you define the following dependency twice:
<dependency>
<groupId>org.apache.tapestry</groupId>
<artifactId>tapestry-hibernate</artifactId>
<version>${tapestry-release-version}</version>
</dependency>
which does no harm at the moment but you'd better clean it up.

Unable to update snapshots or run the install goal with Maven

Does anyone have an idea how to resolve this Maven error? I get the following when I attempt to update my project's snapshots:
Build errors for my-projects-name;
org.apache.maven.lifecycle.LifecycleExecutionException:
Internal error in the plugin manager
executing goal
'org.apache.maven.plugins:maven-dependency-plugin:2.0:unpack':
Mojo execution failed.
And then when I try running "mvn install":
[INFO] [assembly:single {execution:default}] [INFO]
---------------------------------------------------------
[ERROR] BUILD ERROR [INFO]
---------------------------------------------------------
[INFO] Error reading assemblies: No assembly descriptors found.
I'm running Maven 2.1.0. Can anyone shed some light as to why it's balking at me? Other team members are able to perform the above actions with the exact same copy of the code from SVN.
Thanks!
Edit: Here's the POM:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.company.group</groupId>
<artifactId>the-project-parent</artifactId>
<version>1.0</version>
</parent>
<groupId>com.company.group.project</groupId>
<artifactId>project-root</artifactId>
<packaging>pom</packaging>
<name>Project Name</name>
<version>1.0.2-SNAPSHOT</version>
<description>This artifact contains the common settings for the Project.</description>
<url>http://maven.dev.companyName.com/sites/projectGroup/project</url>
<scm>
<connection>scm:svn:https://sourceforge.companyname.com/svn/repos/group/tags/projGroup/my-project-name</connection>
<developerConnection>scm:svn:https://sourceforge.companyname.com/svn/repos/group/tags/projGroup/my-project-name</developerConnection>
</scm>
<modules>
<module>module-1</module>
<module>module-2</module>
<module>module-3</module>
<module>module-4</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>net.sourceforge.jtds.jdbc</groupId>
<artifactId>jtds</artifactId>
<version>1.2.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.unitils</groupId>
<artifactId>unitils</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>2.3</version>
<scope>test</scope>
</dependency>
<!-- I cut most dependencies for brevity -->
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.0-beta-5</version>
<inherited>false</inherited>
<configuration>
<preparationGoals>clean install</preparationGoals>
<tagBase>https://sourceforge.companyname.com/svn/repos/projects/tags/projGroup/my-project-name</tagBase>
</configuration>
</plugin>
</plugins>
</build>
</project>
You have no assembly plugin configuration shown in the pom you pasted. Perhaps it's in the parent? If there's no config then the assembly plugin will complain because you haven't configured it with a descriptor that tells it what to do. run mvn help:effective-pom and then paste those results (make sure to scrub any passwords) so I can see your full pom after inheritence.
I finally got it to run the install goal by downgrading Maven to 2.0.9.
EDIT:
I tried executing mvn clean install and mvn clean install assembly:assembly using Maven 2.1.0 and it duplicated the above error: > "No Assembly descriptors found."
It still works with Maven 2.0.9. I'm wholly convinced that at minimum something has changed between versions which is causing this this discrepancy...
EDIT:
From what I've been able to find out, it appears there's likely some kind of version conflict between Maven 2.1.0 and the version of this plugin we use:
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.0-beta-5</version>

Categories