1

When I build a module using Maven, I get the following error: Can anyone please let me know what this error means exactly?

[ERROR] Failed to execute goal com.dsths.common:container-maven-plugin:1.2.1:dis t (build-distributions) on project pmDist: Unable to create distribution: Could not resolve artifact: com.dsths.awdprovidermatching:pmConfig:jar:default-externa l-jetty:1.0.2-SNAPSHOT:COMPILE -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit ch. [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 rea d the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE xception 

For reference, here is the pom file of pmConfig 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 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <artifactId>pmConfig</artifactId> <name>${project.artifactId}</name> <packaging>pom</packaging> <parent> <groupId>com.dsths.awdprovidermatching</groupId> <artifactId>AWDProviderMatching</artifactId> <version>1.0.2-SNAPSHOT</version> </parent> <description>A POM-based project for filtering and collecting the various configurations for AWDProviderMatching.</description> <build> <plugins> <plugin> <artifactId>maven-resources-plugin</artifactId> <executions> <execution> <id>dev-localhost-make-assembly</id> <phase>generate-resources</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${project.build.directory}/generated-resources/dev-localhost</outputDirectory> <resources> <resource> <directory>${project.basedir}/src/main/assembly</directory> <includes> <include>*.xml</include> </includes> <filtering>true</filtering> </resource> </resources> <filters> <filter>${project.basedir}/src/main/filters/default.properties</filter> <filter>${project.basedir}/src/main/filters/hostenv/localhost.properties</filter> <filter>${project.basedir}/src/main/filters/appenv/dev.properties</filter> </filters> <overwrite>true</overwrite> </configuration> </execution> <execution> <id>turnkey-external-make-assembly</id> <phase>generate-resources</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${project.build.directory}/generated-resources/turnkey-external</outputDirectory> <resources> <resource> <directory>${project.basedir}/src/main/assembly</directory> <includes> <include>*.xml</include> </includes> <filtering>true</filtering> </resource> </resources> <filters> <filter>${project.basedir}/src/main/filters/default.properties</filter> <filter>${project.basedir}/src/main/filters/hostenv/external.properties</filter> <filter>${project.basedir}/src/main/filters/appenv/turnkey.properties</filter> </filters> <overwrite>true</overwrite> </configuration> </execution> <execution> <id>vcloud-vcloud-make-assembly</id> <phase>generate-resources</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${project.build.directory}/generated-resources/vcloud-vcloud</outputDirectory> <resources> <resource> <directory>${project.basedir}/src/main/assembly</directory> <includes> <include>*.xml</include> </includes> <filtering>true</filtering> </resource> </resources> <filters> <filter>${project.basedir}/src/main/filters/default.properties</filter> <filter>${project.basedir}/src/main/filters/hostenv/vcloud.properties</filter> <filter>${project.basedir}/src/main/filters/appenv/vcloud.properties</filter> </filters> <overwrite>true</overwrite> </configuration> </execution> </executions> </plugin> <plugin> <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <id>dev-localhost-zip</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <descriptors> <descriptor>${project.build.directory}/generated-resources/dev-localhost/template-zip-assembly.xml</descriptor> </descriptors> <filters> <filter>${project.basedir}/src/main/filters/default.properties</filter> <filter>${project.basedir}/src/main/filters/hostenv/localhost.properties</filter> <filter>${project.basedir}/src/main/filters/appenv/dev.properties</filter> </filters> </configuration> </execution> <execution> <id>dev-localhost-jboss-jar</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <descriptors> <descriptor>${project.build.directory}/generated-resources/dev-localhost/template-jboss-jar-assembly.xml</descriptor> </descriptors> <filters> <filter>${project.basedir}/src/main/filters/default.properties</filter> <filter>${project.basedir}/src/main/filters/hostenv/localhost.properties</filter> <filter>${project.basedir}/src/main/filters/appenv/dev.properties</filter> </filters> </configuration> </execution> <execution> <id>dev-localhost-jetty-jar</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <descriptors> <descriptor>${project.build.directory}/generated-resources/dev-localhost/template-jetty-jar-assembly.xml</descriptor> </descriptors> <filters> <filter>${project.basedir}/src/main/filters/default.properties</filter> <filter>${project.basedir}/src/main/filters/hostenv/localhost.properties</filter> <filter>${project.basedir}/src/main/filters/appenv/dev.properties</filter> </filters> </configuration> </execution> <execution> <id>vcloud-jetty-jar</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <descriptors> <descriptor>${project.build.directory}/generated-resources/vcloud-vcloud/template-jetty-jar-assembly.xml</descriptor> </descriptors> <filters> <filter>${project.basedir}/src/main/filters/default.properties</filter> <filter>${project.basedir}/src/main/filters/hostenv/vcloud.properties</filter> <filter>${project.basedir}/src/main/filters/appenv/vcloud.properties</filter> </filters> </configuration> </execution> <execution> <id>default-jetty-jar</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <descriptors> <descriptor>${project.build.directory}/generated-resources/turnkey-external/template-jetty-jar-assembly.xml</descriptor> </descriptors> <filters> <filter>${project.basedir}/src/main/filters/default.properties</filter> <filter>${project.basedir}/src/main/filters/hostenv/external.properties</filter> <filter>${project.basedir}/src/main/filters/appenv/turnkey.properties</filter> </filters> </configuration> </execution> <execution> <id>mdwise-properties-conf-zip</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <descriptors> <descriptor>${project.basedir}/src/main/assembly/template-zip-assembly-properties-mdwise.xml</descriptor> </descriptors> </configuration> </execution> <execution> <id>dbscripts-zip</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <descriptors> <descriptor>${project.basedir}/src/main/assembly/template-zip-assembly-dbscripts.xml</descriptor> </descriptors> </configuration> </execution> </executions> </plugin> </plugins> </build> </project> 

The below is the pom file of the failing module:

<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"> <parent> <groupId>com.dsths.awdprovidermatching</groupId> <artifactId>AWDProviderMatching</artifactId> <version>1.0.2-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>pmDist</artifactId> <!-- using POM packaging since all artifacts are produced by the container-maven-plugin plugin --> <packaging>pom</packaging> <dependencies> <!-- Dependencies listed here are not used in the build. They only exist to force maven to build the dependent projects before this one. You only need to add your project's war module and the configuration module. If your project produces multiple WAR files, they should both be included. --> <dependency> <groupId>${project.groupId}</groupId> <artifactId>${war.artifactId}</artifactId> <version>${project.version}</version> <type>war</type> </dependency> <dependency> <groupId>${project.groupId}</groupId> <artifactId>${config.artifactId}</artifactId> <version>${project.version}</version> <classifier>${config.classifier}</classifier> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>com.dsths.common</groupId> <artifactId>container-maven-plugin</artifactId> <version>${dstcontainer.version}</version> <executions> <execution> <id>build-distributions</id> <phase>package</phase> <goals><goal>dist</goal></goals> </execution> </executions> <configuration> <artifacts> <!-- configuration artifact --> <artifact> <groupId>${project.groupId}</groupId> <artifactId>${config.artifactId}</artifactId> <version>${project.version}</version> <classifier>${config.classifier}</classifier> <unpack>true</unpack> <targetDir>conf</targetDir> </artifact> <!-- war artifact --> <artifact> <groupId>${project.groupId}</groupId> <artifactId>${war.artifactId}</artifactId> <version>${project.version}</version> <type>war</type> <targetDir>deploy/tenanted</targetDir> </artifact> </artifacts> </configuration> </plugin> </plugins> </build> <properties> <config.artifactId>pmConfig</config.artifactId> <config.classifier>default-external-jetty</config.classifier> <war.artifactId>pmWeb</war.artifactId> </properties> </project> 
6
  • Does your pmConfig project really have a classifier default-external-jetty? Maybe you should also show us the POM of that project. Commented May 29, 2015 at 11:29
  • There is no classifier default-external-jetty mentioned in the pom file of pmConfig module. I am unable to add the entire pom file due to size issues. Commented May 29, 2015 at 11:40
  • Then this is your problem: You are referring to an artifact com.dsths.awdprovidermatching:pmConfig:jar:default-external-jetty:1.0.2-SNAPSHOT:COMPILE, which simply does not exist (as you just told us). Commented May 29, 2015 at 11:42
  • The same configuration is working fine for another project. default-external-jetty is getting added to the template-jetty-jar-assembly.xml file which generated in target folder of pmConfig Commented May 29, 2015 at 11:52
  • You need to have a project that generates the above mentioned artifact (with the classifier) and also installs/deploys it. Or your project should have the possibility to add that artifact as an additional one to install/deploy it. Otherwise it will not be resolvable. If another project has this also as a dependency and thus "is working fine", I can only guess that it is not the same. Please carefully compare them (the declared dependencies). Commented May 29, 2015 at 11:55

2 Answers 2

1

This is due to your Maven version. You need to downgrade to Maven 3.0.5 and it will work fine.

Source: I work at the same place :)

Sign up to request clarification or add additional context in comments.

Comments

0

You specified somewhere in your pom (explicitly or not) a dependency on the artifact with the id pmConfig and groupId com.dsths.awdprovidermatching. It cannot be found in any of your repositories (be it local or remote).

If you show us the pom or maven dependency tree we may even pintpoint where this artifact is being used.

This indicates that the module you are compiling may depend upon the mentioned artificat. Which, if my guess is right is one you are developing. In this case you need to compile that one first.

4 Comments

I have six modules out of which all modules are building properly except one module named pmDist. The module pmConfig is also building properly.
I am using the command mvn clean install -Dmaven.test.skip.exec=true . I have also added the pom files to the question for your reference.
Why should he import that dependency? This is nonsense.
@LaurentiuL. No use the same problem persists though I import.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.