While building the project getting error , Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.4:jar (attach-javadocs) - spring-boot

<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.example.commons</groupId>
<artifactId>commons-parent</artifactId>
<version>0.0.68-SNAPSHOT</version>
<packaging>pom</packaging>
<name>commons-parent</name>
<description>commons-parent</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.6.RELEASE</version>
</parent>
<modules>
<module>commons-it</module>
<module>commons-client</module>
<module>commons-error</module>
<module>commons-ssm</module>
<module>commons-cache</module>
<module>commons-model</module>
<module>commons-mq</module>
<module>commons-jsonb-gson</module>
<module>commons-util</module>
</modules>
<distributionManagement>
<repository>
<uniqueVersion>false</uniqueVersion>
<id>Nexus</id>
<name>example release repository</name>
<!-- We can not use vc.example.com here because it is not visible for Jenkins running on AWS. -->
<url>nexus url</url>
<layout>default</layout>
</repository>
<snapshotRepository>
<uniqueVersion>false</uniqueVersion>
<id>nexus-snapshots</id>
<name>example snapshot repository</name>
<!-- We can not use vc.example.com here because it is not visible for Jenkins running on AWS. -->
<url>nexus url</url>
<layout>default</layout>
</snapshotRepository>
</distributionManagement>
<!-- FIXME: Update with the correct settings -->
<ciManagement>
<url>ci-url</url>
</ciManagement>
<scm>
<url>https://github.com/example/abc-backend-commons</url>
<connection>scm:git:git://github.com/example/abc-backend-commons.git</connection>
<developerConnection>scm:git:git#github.com:example/abc-backend-commons.git</developerConnection>
<tag>HEAD</tag>
</scm>
<inceptionYear>2017</inceptionYear>
<organization>
<name>example Inc</name>
<url>https://www.example.com/</url>
</organization>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<!-- JMeter properties (defaulted - can be override via command line
args) -->
<host>localhost</host>
<port>8080</port>
<!-- CI settings -->
<ci.build>${BUILD_NUMBER}</ci.build>
<ci.url>${BUILD_URL}</ci.url>
<org.apache.commons.lang3.version>3.4</org.apache.commons.lang3.version>
<org.hibernate.javax.persistence>1.0.0.Final</org.hibernate.javax.persistence>
<org.flywaydb.version>4.2.0</org.flywaydb.version>
<com.github.docker-java.version>3.0.13</com.github.docker-java.version>
<com.amazonaws.version>1.11.225</com.amazonaws.version>
<apache.httpclient.version>4.5.5</apache.httpclient.version>
<spring.framework.version>4.3.10.RELEASE</spring.framework.version>
<gson.version>2.8.4</gson.version>
<spring.jms.version>4.3.10.RELEASE</spring.jms.version>
<apache.activemq.pool.version>5.15.8</apache.activemq.pool.version>
<swagger.annotation.version>1.5.13</swagger.annotation.version>
<javax.validation.version>1.1.0.Final</javax.validation.version>
<postgresql.version>42.2.2</postgresql.version>
<hibernate.version>5.4.23.Final</hibernate.version>
</properties>
<dependencyManagement>
<dependencies>
<!-- Manage local dependencies -->
<dependency>
<groupId>com.example.commons</groupId>
<artifactId>commons-it</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.example.commons</groupId>
<artifactId>commons-client</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.example.commons</groupId>
<artifactId>commons-error</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.example.commons</groupId>
<artifactId>commons-ssm</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.example.commons</groupId>
<artifactId>commons-cache</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.example.commons</groupId>
<artifactId>commons-model</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.example.commons</groupId>
<artifactId>commons-mq</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.example.commons</groupId>
<artifactId>commons-jsonb-gson</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.example.commons</groupId>
<artifactId>commons-util</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>2.7.8</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>${org.flywaydb.version}</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
<version>${com.amazonaws.version}</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-ssm</artifactId>
<version>${com.amazonaws.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${org.apache.commons.lang3.version}</version>
</dependency>
<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java</artifactId>
<version>${com.github.docker-java.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${apache.httpclient.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
<version>${spring.jms.version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-pool</artifactId>
<version>${apache.activemq.pool.version}</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger.annotation.version}</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>${javax.validation.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<version>1.3.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<additionalparam>${javadoc.opts}</additionalparam>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
<configuration>
<reportPlugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalparam>${javadoc.opts}</additionalparam>
</configuration>
</plugin>
</reportPlugins>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<!-- JUnit tests -->
<!-- exclude integration tests from normal build -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/*IT.java</exclude>
<exclude>**/*IntegrationTest.java</exclude>
<exclude>**/*ST.java</exclude>
<exclude>**/*SpecTest.java</exclude>
<exclude>**/*SpecificationTest.java</exclude>
<exclude>**/*Spec.java</exclude>
<exclude>**/*Specification.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<useReleaseProfile>false</useReleaseProfile>
<releaseProfiles>release</releaseProfiles>
<autoVersionSubmodules>true</autoVersionSubmodules>
</configuration>
</plugin>
<!-- JavaDoc -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Manifest -->
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<!-- Manifest -->
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addClasspath>false</addClasspath>
<classpathPrefix>lib</classpathPrefix>
</manifest>
<manifestEntries>
<Specification-Title>${project.name}</Specification-Title>
<Specification-Version>${project.version}</Specification-Version>
<Implementation-Version>${project.version}</Implementation-Version>
</manifestEntries>
</archive>
</configuration>
</plugin>
<!-- This plug in is needed if jdk 11 is installed to avoid error 'The code being
documented uses modules but the packages defined in
http://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.'-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<source>8</source>
</configuration>
</plugin>
</plugins>
</build>
<!-- Maven site reports -->
<reporting>
<plugins>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.4</version>
</plugin>
<plugin>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.5</version>
</plugin>
<plugin>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.8</version>
</plugin>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.9</version>
<configuration>
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
</configuration>
<!-- To view the maven site, mvn site (-o if too slow), to
deploy to a repo mvn site-deploy, to check all modules locally site:stage -->
<reportSets>
<reportSet>
<reports>
<report>index</report>
<report>summary</report>
<report>cim</report>
<report>dependencies</report>
<report>dependency-convergence</report>
<report>dependency-info</report>
<report>dependency-management</report>
<report>distribution-management</report>
<report>issue-tracking</report>
<report>license</report>
<report>mailing-list</report>
<report>project-team</report>
<report>scm</report>
<report>modules</report>
<report>plugins</report>
<report>help</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- When the app runs outside of a CI server then we don't have
access to certain properties, so we just give defaults -->
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
<property>
<name>default-property-setter</name>
</property>
</activation>
<!-- default values, please adjust or use the spring Value default -->
<properties>
<ci.build>unknown</ci.build>
<ci.url>unknown</ci.url>
</properties>
</profile>
<profile>
<id>java8-doclint-disabled</id>
<activation>
<jdk>[1.8,)</jdk>
</activation>
<properties>
<javadoc.opts>-Xdoclint:none</javadoc.opts>
</properties>
</profile>
</profiles>
</project>
getting error(Using java 1.8 to build)
Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.4:jar (attach-javadocs) on project commons-parent: Execution attach-javadocs of goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.4:jar failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-javadoc-plugin:2.10.4:jar: java.lang.ExceptionInInitializerError: null
tried many things nothing is working could anyone look and help.

First, try upgrading the maven-javadoc-plugin version.
If that doesn't work...
(1) Make sure the project builds without the maven-javadoc-plugin.
mvn -Dmaven.javadoc.skip=true verify
(2) Disable strict linting.
This is for version 3.0.0+.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>...</version>
<configuration>
<additionalOptions>
<additionalOption>-Xdoclint:none</additionalOption>
</additionalOptions>
</configuration>
</plugin>
If (2) works, then there is most likely a problem with your Javadoc. Is there more to the build logs that may indicate where?

Related

IntelliJ does not find pom.xml file

I'm new to this weird Maven thing and unsure how it works. My project contains a valid pom.xml file, but I am unable to do anything with it. Basically, I go to File -> Project Structure -> Libraries -> From Maven... and write pom.xml in this search field, but it does not find anything! I'm pretty sure I am doing something wrong. In general, I just want to know how to download all the libraries into a .jar format.
I use IntelliJand 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.corundumstudio.socketio</groupId>
<artifactId>netty-socketio</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>ConnectFour</name>
<description>A connectfour website</description>
<inceptionYear>2018</inceptionYear>
<scm>
<url>scm:git:git#github.com:mrniko/netty-socketio.git</url>
<connection>scm:git:git#github.com:mrniko/netty-socketio.git</connection>
<developerConnection>scm:git:git#github.com:mrniko/netty-socketio.git</developerConnection>
<tag>HEAD</tag>
</scm>
<licenses>
<license>
<name>Apache v2</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
<distribution>manual</distribution>
</license>
</licenses>
<developers>
<developer>
<id>mrniko</id>
<name>Nikita Koksharov</name>
<email>abracham.mitchell#gmail.com</email>
<roles>
<role>Architect</role>
<role>Developer</role>
</roles>
<timezone>+4</timezone>
</developer>
</developers>
<distributionManagement>
<repository>
<id>repo1</id>
<name>Release</name>
<url>file://C:/123</url>
</repository>
</distributionManagement>
<properties>
<skipTests>true</skipTests>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<profiles>
<profile>
<id>release-sign-artifacts</id>
<activation>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-buffer</artifactId>
<version>4.1.22.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-common</artifactId>
<version>4.1.22.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport</artifactId>
<version>4.1.22.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
<version>4.1.22.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-http</artifactId>
<version>4.1.22.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec</artifactId>
<version>4.1.22.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<version>4.1.22.Final</version>
</dependency>
<dependency>
<groupId>org.jmockit</groupId>
<artifactId>jmockit</artifactId>
<version>1.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.21</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.7.9</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.7.9.2</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>[2.5,)</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>[2.5,)</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson</artifactId>
<version>2.11.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast-client</artifactId>
<version>3.4.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-async</artifactId>
<version>3.6.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
<configuration>
<downloadSources>true</downloadSources>
<forceRecheck>true</forceRecheck>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>pmd</goal>
<goal>cpd</goal>
</goals>
</execution>
</executions>
<configuration>
<minimumTokens>100</minimumTokens>
<targetJdk>1.8</targetJdk>
<verbose>true</verbose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.11</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>checkstyle</goal>
</goals>
</execution>
</executions>
<configuration>
<consoleOutput>true</consoleOutput>
<enableRSS>false</enableRSS>
<configLocation>/checkstyle.xml</configLocation>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<optimize>true</optimize>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20.1</version>
<configuration>
<argLine>-Dfile.encoding=utf-8</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.5.0</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-Name>${project.artifactId}</Bundle-Name>
<Import-Package>
org.springframework.*;resolution:=optional,com.hazelcast.*;resolution:=optional,org.redisson.*;resolution:=optional,*
</Import-Package>
<Export-Package>
com.corundumstudio.socketio;version="${project.version}",
com.corundumstudio.socketio.annotation;version="${project.version}",
com.corundumstudio.socketio.listener;version="${project.version}",
com.corundumstudio.socketio.protocol;version="${project.version}",
com.corundumstudio.socketio.store;version="${project.version}",
com.corundumstudio.socketio.store.pubsub;version="${project.version}",
</Export-Package>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>2.6</version>
<configuration>
<basedir>${basedir}</basedir>
<header>${basedir}/header.txt</header>
<quiet>false</quiet>
<failIfMissing>true</failIfMissing>
<aggregate>false</aggregate>
<includes>
<include>src/**</include>
</includes>
<excludes>
<exclude>target/**</exclude>
</excludes>
<useDefaultExcludes>true</useDefaultExcludes>
<mapping>
<java>JAVADOC_STYLE</java>
</mapping>
<strictCheck>true</strictCheck>
<useDefaultMapping>true</useDefaultMapping>
<encoding>UTF-8</encoding>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Thank you in advance.
There are a number of things that could be going here but try this first:
Try ctrl-shift-a -> "Reimport All Maven Projects"
OR
Views -> Tool Windows -> Maven Projects -> click top left button (looks like a refresh icon)
First of all be sure that your project it is using Maven ?! maybe it is using Gradle so on
For a Maven project, pom.xml file:
For a Gradle project, build.gradle file:
Alternatives to Apache Maven. Jira, Jenkins, Gradle, Apache Ant, and Apache Tomcat

Cannot attach spring cloud contract maven plugin to lifecycle phase

I could not manage to run spring-cloud-contract:generateTests to run without explicitly specifying the goal in maven command line. Here is the plugin configuration of pom.xml:
<!-- Contract Driven Testing -->
<plugin>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-maven-plugin</artifactId>
<version>${spring-cloud-contract.version}</version>
<!-- Don't forget about this value !! -->
<extensions>true</extensions>
<configuration>
<!-- Provide the base class for your auto-generated tests -->
<packageWithBaseClasses>cdc</packageWithBaseClasses>
</configuration>
<executions>
<execution>
<id>spring-cloud-generateTests</id>
<goals>
<goal>generateTests</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-verifier</artifactId>
<version>${spring-cloud-contract.version}</version>
</dependency>
</dependencies>
</plugin>
When I run mvn clean install the tests are not generated, although explicitly specifying the goal fulfills the goal.
Here is the full 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.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.1.RELEASE</version>
</parent>
<groupId>tr.gov.tubitak.bilgem.yte.maliye</groupId>
<artifactId>maliye-muhasebeislemleri</artifactId>
<packaging>jar</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>maliye-muhasebeislemleri Maven Webapp</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Database Dependencies -->
<h2.version>1.4.190</h2.version>
<!-- Testing Dependencies -->
<postgresql.version>9.4.1207</postgresql.version>
<start-class>tr.gov.tubitak.bilgem.yte.maliye.Application</start-class>
<spring-cloud-contract.version>1.0.4.BUILD-SNAPSHOT</spring-cloud-contract.version>
</properties>
<distributionManagement>
<repository>
<id>nexus</id>
<name>Internal Releases</name>
<url>http://yte-nexus:8081/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>nexus</id>
<name>Internal Releases</name>
<url>http://yte-nexus:8081/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
<dependencyManagement>
<dependencies>
<!-- If you're adding this dependency explicitly you have to add it *BEFORE*
the Release Train BOM -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-dependencies</artifactId>
<version>${spring-cloud-contract.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- Testing Dependencies -->
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
<version>1.6.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jmockit</groupId>
<artifactId>jmockit</artifactId>
<version>1.8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>tr.gov.tubitak.bilgem.yte.maliye</groupId>
<artifactId>mb-testutils</artifactId>
<version>0.1.6-RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-contract-verifier</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-wiremock</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-contract-stub-runner</artifactId>
<scope>test</scope>
</dependency>
<!-- Required by contract tests -->
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
<version>3.3.9</version>
<scope>test</scope>
</dependency>
<!-- MGM-CORE Dependencies -->
<dependency>
<groupId>tr.gov.tubitak.bilgem.yte.maliye</groupId>
<artifactId>mb-core</artifactId>
<version>0.10.2-RELEASE</version>
</dependency>
<!-- Database Dependencies -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2.version}</version>
<scope>test</scope>
</dependency>
<!-- POSTGRES -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.6.201602180812</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>maliye-muhasebeislemleri</finalName>
<resources>
<resource>
<directory>${basedir}/src/main/java</directory>
</resource>
<resource>
<directory>${basedir}/src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<testResources>
<testResource>
<directory>${project.basedir}/src/test/java</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</testResource>
<testResource>
<directory>${project.basedir}/src/test/resources</directory>
</testResource>
<testResource>
<directory>${project.basedir}/target/generated-test-sources</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</testResource>
</testResources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springloaded</artifactId>
<version>${spring-loaded.version}</version>
</dependency>
</dependencies>
<configuration>
<mainClass>${start-class}</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>tr.gov.tubitak.bilgem.yte.maliye</groupId>
<artifactId>mb-automatic-file-creator</artifactId>
<version>0.0.1-RELEASE</version>
<dependencies>
<dependency>
<groupId>tr.gov.tubitak.bilgem.yte.maliye</groupId>
<artifactId>mb-automatic-file-creator</artifactId>
<version>0.0.1-RELEASE</version>
</dependency>
</dependencies>
<configuration>
<fName>${packageName}</fName>
<directory>${directory}</directory>
</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>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
<plugin>
<groupId>tr.gov.tubitak.bilgem.yte.maliye</groupId>
<artifactId>mb-veriaktarim-maven-plugin</artifactId>
<version>0.2.8-SNAPSHOT</version>
<configuration>
<driver>${db.driver}</driver>
<datasetDir>db-changelog/veri/</datasetDir>
<jdbcUrl>${db.url}</jdbcUrl>
<dbUser>${db.username}</dbUser>
<dbPass>${db.password}</dbPass>
<schema>${db.schema}</schema>
<ignoredTables>
<table>databasechangelog</table>
<table>databasechangeloglock</table>
<table>cerceve_hesap_kodu</table>
<table>hesap_grubu</table>
</ignoredTables>
<noTruncateTables>
<table>kamu_idaresi</table>
<table>harcama_birimi</table>
<table>muhasebe_birimi</table>
<table>muhasebe_fisi</table>
<table>ortak_hesap_plani</table>
<table>ortak_hesap_kodu</table>
<table>kurum_hesap_plani</table>
<table>kurum_hesap_kodu</table>
<table>son_fis_bilgisi</table>
<table>harcama_birimi_devir_bilgisi</table>
<table>kurum_hesap_plani_devir_bakiye_bilgisi</table>
<table>kurum_hesap_kodu_devir_bakiye_bilgisi</table>
<table>ortak_hesap_kodu_grubu_kod</table>
<table>ortak_hesap_kodu_grubu</table>
<table>ortak_hesap_kodu_iliskisi</table>
</noTruncateTables>
</configuration>
<dependencies>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>cleanAndTransferData</id>
<phase>prepare-package</phase>
<goals>
<goal>cleanAndTransferData</goal>
</goals>
</execution>
<execution>
<id>exportData</id>
<phase>prepare-package</phase>
<goals>
<goal>exportData</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.15</version>
<configuration>
<properties>
<argLine>-Dfile.encoding=UTF-8</argLine>
</properties>
<includes>
<include>**/*Tests.java</include>
<include>**/*Test.java</include>
<include>**/Test*.java</include>
</includes>
<excludes>
<exclude>**/Abstract*.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>3.3.2</version>
<configuration>
<promptOnNonLocalDatabase>false</promptOnNonLocalDatabase>
<changeLogFile>db-changelog/db.changelog-master.xml</changeLogFile>
<driver>${db.driver}</driver>
<url>${db.url}</url>
<username>${db.username}</username>
<password>${db.password}</password>
<defaultSchemaName>${db.schema}</defaultSchemaName>
<contexts>${db.context}</contexts>
<migrationSqlOutputFile>db-setting/muhasebe.sql</migrationSqlOutputFile>
</configuration>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>update</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- JACOCO -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.6.201602180812</version>
<configuration>
<sourceEncoding>UTF-8</sourceEncoding>
<outputEncoding>UTF-8</outputEncoding>
</configuration>
<executions>
<execution>
<id>jacoco-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>jacoco-prepare-package</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- JACOCO -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.14</version>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>tr.gov.tubitak.bilgem.yte.maliye</groupId>
<artifactId>maliye-kullaniciaktarim-maven-plugin</artifactId>
<version>0.2.2-RELEASE</version>
<configuration>
<securityUrl>${kullaniciAktarim.url}</securityUrl>
<mnemonicCode>MHS</mnemonicCode>
<clientServicePath>${kullaniciAktarim.istemciUrl}</clientServicePath>
<serviceName>muhasebe_islemleri</serviceName>
<userRoleFile>src/main/resources/security/UserRole.xml</userRoleFile>
<rolePermissionFile>src/main/resources/security/RolePermission.xml</rolePermissionFile>
<sqlOutFile>db-setting/kullanici.sql</sqlOutFile>
</configuration>
</plugin>
<!-- Contract Driven Testing -->
<plugin>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-maven-plugin</artifactId>
<version>${spring-cloud-contract.version}</version>
<!-- Don't forget about this value !! -->
<extensions>true</extensions>
<configuration>
<!-- Provide the base class for your auto-generated tests -->
<packageWithBaseClasses>cdc</packageWithBaseClasses>
</configuration>
<executions>
<execution>
<id>spring-cloud-generateTests</id>
<phase>compile</phase>
<goals>
<goal>generateTests</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-verifier</artifactId>
<version>${spring-cloud-contract.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>development</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<spring.profiles.active>development</spring.profiles.active>
<build.profile.id>dev</build.profile.id>
<db.url>jdbc:postgresql://localhost:5432/maliye_muhasebeislemleri</db.url>
<db.driver>org.postgresql.Driver</db.driver>
<db.username>maliye_muhasebeislemleri</db.username>
<db.password>Aa123456</db.password>
<db.schema>public</db.schema>
<db.context>development</db.context>
<kullaniciAktarim.url>http://localhost:8080/maliye-kullanici/kullanici/kullanicilariGuncelle</kullaniciAktarim.url>
<kullaniciAktarim.istemciUrl>http://localhost:8080/muhasebe</kullaniciAktarim.istemciUrl>
</properties>
</profile>
<profile>
<id>test</id>
<properties>
<spring.profiles.active>test</spring.profiles.active>
<build.profile.id>test</build.profile.id>
<db.url>jdbc:postgresql://mgm-01:5432/maliye?current=maliye_muhasebeislemleri</db.url>
<db.driver>org.postgresql.Driver</db.driver>
<db.username>maliye_muhasebeislemleri</db.username>
<db.password>Aa123456</db.password>
<db.schema>maliye_muhasebeislemleri</db.schema>
<db.context>test</db.context>
<kullaniciAktarim.url>http://mgm-10:8080/maliye-kullanici/kullanici/kullanicilariGuncelle</kullaniciAktarim.url>
<kullaniciAktarim.istemciUrl>http://mgm-09:80/muhasebe</kullaniciAktarim.istemciUrl>
</properties>
</profile>
</profiles>
I tried to run your example but it fails to compile due to missing dependencies. Anyways what #khmarbaise said is perfectly valid. With Maven you have to set a plugin in the <build><plugins> section. If you have it only in the <pluginManagement> section then it won't work. You can check out the Spring Cloud Contract Samples where everything works fine and is well setup - https://github.com/spring-cloud-samples/spring-cloud-contract-samples/blob/master/producer/pom.xml#L73-L103

AEM DependencyResolutionException

I have a problem with single node project
http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
1) POM is OK (I think)
2) I don't have settings.xml in .m2
3) ...
4) ...
5) I haven't configured Maven to perform strict checksum
6) It's not LocalRepositoryNotAccessibleException
POM file:
<?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>com.scd</groupId>
<artifactId>single-node</artifactId>
<packaging>pom</packaging>
<name>Node Example</name>
<version>1.0</version>
<description>Single Node Pluralsight sample</description>
<modules>
<module>application</module>
</modules>
<properties>
<aem.host>localhost</aem.host>
<aem.port>4502</aem.port>
<aem.publish.host>localhost</aem.publish.host>
<aem.publish.port>4503</aem.publish.port>
<sling.user>admin</sling.user>
<sling.password>admin</sling.password>
<vault.user>admin</vault.user>
<vault.password>admin</vault.password>
</properties>
<build>
<plugins>
<!-- Maven Release Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<scmCommentPrefix>[maven-scm] :</scmCommentPrefix>
<preparationGoals>clean install</preparationGoals>
<goals>install</goals>
<releaseProfiles>release</releaseProfiles>
</configuration>
</plugin>
<!-- Maven Source Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
<inherited>true</inherited>
</plugin>
<!-- Maven Resources Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<!-- Maven Jar Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.5</version>
</plugin>
<!-- Maven Enforcer Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>[2.2.1,)</version>
</requireMavenVersion>
<requireJavaVersion>
<message>Project must be compiled with Java 6 or higher</message>
<version>1.6.0</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<!-- Maven Compiler Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<!-- Maven IntelliJ IDEA Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-idea-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<jdkLevel>1.6</jdkLevel>
<linkModules>true</linkModules>
<downloadSources>true</downloadSources>
</configuration>
</plugin>
<!-- Maven Eclipse Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
<configuration>
<downloadSources>true</downloadSources>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!-- Maven Clean Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.6.1</version>
</plugin>
<!-- Maven Resources Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
</plugin>
<!-- Maven Compiler Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
</plugin>
<!-- Apache Felix SCR Plugin -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-scr-plugin</artifactId>
<version>1.20.0</version>
<executions>
<execution>
<id>generate-scr-scrdescriptor</id>
<goals>
<goal>scr</goal>
</goals>
<configuration>
<!-- Private service properties for all services. -->
<properties>
<service.vendor>Adobe</service.vendor>
</properties>
</configuration>
</execution>
</executions>
<configuration>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</configuration>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.5.11</version>
</dependency>
</dependencies>
</plugin>
<!-- Maven Installer Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<!-- Maven Surefire Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
</plugin>
<!-- Maven Failsafe Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.18.1</version>
</plugin>
<!-- Maven Deploy Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<!-- Apache Sling Plugin -->
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>maven-sling-plugin</artifactId>
<version>2.1.0</version>
<executions>
<execution>
<goals>
<goal>install</goal>
</goals>
</execution>
</executions>
<configuration>
<slingUrl>http://${aem.host}:${aem.port}/crx/repository/crx.default</slingUrl>
<usePut>true</usePut>
<failOnError>true</failOnError>
</configuration>
</plugin>
<!-- Content Package Plugin -->
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>content-package-maven-plugin</artifactId>
<version>0.0.24</version>
<configuration>
<targetURL>http://${aem.host}:${aem.port}/crx/packmgr/service.jsp</targetURL>
<failOnError>true</failOnError>
<failOnMissingEmbed>true</failOnMissingEmbed>
</configuration>
</plugin>
<!-- Apache Felix Bundle Plugin -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.5.3</version>
<inherited>true</inherited>
</plugin>
<!-- Maven Enforcer Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4</version>
</plugin>
<!-- Maven Dependency Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
</plugin>
<!-- Build Helper Maven Plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.9.1</version>
</plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<versionRange>[1.0.0,)</versionRange>
<goals>
<goal>enforce</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-dependency-plugin
</artifactId>
<versionRange>
[2.2,)
</versionRange>
<goals>
<goal>copy-dependencies</goal>
<goal>unpack</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.codehaus.mojo
</groupId>
<artifactId>
build-helper-maven-plugin
</artifactId>
<versionRange>
[1.5,)
</versionRange>
<goals>
<goal>
reserve-network-port
</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<!-- ====================================================================== -->
<!-- D E P E N D E N C I E S -->
<!-- ====================================================================== -->
<dependencyManagement>
<dependencies>
<!-- OSGi Dependencies -->
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.scr</artifactId>
<version>1.6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.scr.annotations</artifactId>
<version>1.9.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>biz.aQute</groupId>
<artifactId>bndlib</artifactId>
<version>1.50.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<version>4.2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
<version>4.2.0</version>
<scope>provided</scope>
</dependency>
<!-- Logging Dependencies -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.5.11</version>
<scope>provided</scope>
</dependency>
<!-- Apache Sling Dependencies -->
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>aem-api</artifactId>
<version>6.0.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.models.api</artifactId>
<version>1.0.0</version>
<scope>provided</scope>
</dependency>
<!-- Servlet API -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<!-- JCR -->
<dependency>
<groupId>javax.jcr</groupId>
<artifactId>jcr</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<!-- Taglibs -->
<dependency>
<groupId>com.day.cq.wcm</groupId>
<artifactId>cq-wcm-taglib</artifactId>
<version>5.7.4</version>
<scope>provided</scope>
</dependency>
<!-- Testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.5.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit-addons</groupId>
<artifactId>junit-addons</artifactId>
<version>1.4</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
I tried to run educational projects in 2 different PC, but still ran with this error
Could you help me with that?
P.S. Windows 10, AEM 6.2
Provide dependency for scd.webapp and try doing a build .
<dependency>
<groupId></groupId>
<artifactId></artifactId>
<version>${name.version}</version>
<scope>provided</scope>
</dependency>
The issue is most likely as the maven is unable to find the corresponding repository to fetch the relevant jar files to resolve the dependencies.
In your settings.xml, add the Adobe Public profile. It defines the repository that maven has to access to resolve various dependencies:
<!-- ====================================================== -->
<!-- A D O B E P U B L I C P R O F I L E -->
<!-- ====================================================== -->
<profile>
<id>adobe-public</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>adobe</id>
<name>Nexus Proxy Repository</name>
<url>http://repo.adobe.com/nexus/content/groups/public/</url>
<layout>default</layout>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>adobe</id>
<name>Nexus Proxy Repository</name>
<url>http://repo.adobe.com/nexus/content/groups/public/</url>
<layout>default</layout>
</pluginRepository>
</pluginRepositories>
</profile>
Just remove the dependency block for scd.webapp which you might have added inside the child pom.xml file inside the main project. Scd.webapp may be your parent project groupId which maven is trying to search it inside the adobe public repository which is obviously not present over there.

maven: specify package output location

I have a pom file with a custom profile like this:
<profile>
<id>openshift</id>
<build>
<finalName>pomtest</finalName>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<outputDirectory>webapps</outputDirectory>
<warName>ROOT</warName>
</configuration>
</plugin>
</plugins>
</build>
</profile>
when I execute
mvn war:war -Popenshift
it correctly generates a ROOT.war in the webapps folder
but when I execute
mvn package -Popenshift
it generates the war file in /home/sas/Ubuntu
(Ubuntu is not a folder, is the name of ht ROOT.war file)
how can I tell package the output location of the package output?
--
edit: I tried with wemu anser with no luck
just in case someone finds it useful, I'm posting the whole pom file here
it's just the pom generated by grails with grails pom-generate xxx
plus the openshift profile
--
<?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>com.pomtest</groupId>
<artifactId>pomtest</artifactId>
<packaging>grails-app</packaging>
<version>0.1</version>
<name>pomtest</name>
<description>pomtest</description>
<properties>
<grails.version>2.1.1</grails.version>
</properties>
<dependencies>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-dependencies</artifactId>
<version>${grails.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-plugin-testing</artifactId>
<version>${grails.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>tomcat</artifactId>
<version>${grails.version}</version>
<scope>provided</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>cache</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>resources</artifactId>
<version>1.1.6</version>
<scope>runtime</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>database-migration</artifactId>
<version>1.1</version>
<scope>runtime</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>jquery</artifactId>
<version>1.8.0</version>
<scope>runtime</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>hibernate</artifactId>
<version>2.1.1</version>
<scope>runtime</scope>
<type>zip</type>
</dependency>
</dependencies>
<build>
<!-- trying to set output to webapps/ROOT.war... with no luch so far -->
<directory>${project.basedir}/webapps</directory>
<outputDirectory>${basedir}/webapps</outputDirectory>
<pluginManagement />
<plugins>
<!-- Disables the Maven surefire plugin for Grails applications, as we have our own test runner -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
<executions>
<execution>
<id>surefire-it</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>false</skip>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<filesets>
<fileset>
<directory>plugins</directory>
<includes>
<include>**/*</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.grails</groupId>
<artifactId>grails-maven-plugin</artifactId>
<version>${grails.version}</version>
<configuration>
<!-- Whether for Fork a JVM to run Grails commands -->
<fork>true</fork>
</configuration>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>grails</id>
<name>grails</name>
<url>http://repo.grails.org/grails/core</url>
</repository>
<repository>
<id>grails-plugins</id>
<name>grails-plugins</name>
<url>http://repo.grails.org/grails/plugins</url>
</repository>
</repositories>
<profiles>
<profile>
<id>tools</id>
<activation>
<property>
<name>java.vendor</name>
<value>Sun Microsystems Inc.</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>${java.version}</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</profile>
<profile>
<id>openshift</id>
<build>
<finalName>pomtest</finalName>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<outputDirectory>webapps</outputDirectory>
<warName>ROOT</warName>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
--
I think you need to reconfigure the build.directory folder:
<build>
<directory>${project.basedir}/target</directory>
</build>
Note that not all directories can be changed within profiles: http://maven.apache.org/pom.html#Directories
But it may be enough to use available properties or own ones http://docs.codehaus.org/display/MAVENUSER/MavenPropertiesGuide to configure the build to work it the way you want it to.
The default value of warName is already: ${project.build.finalName} - so instead of using pomtest in your example you could use ROOT there as well.
Why stuff ends up in "/home/sas/Ubuntu" at all is hard to tell from the plugin config only.
regards
werner

different objects between my server and locally for maven deployment

I use maven and the weblogic-maven-plugin 2.8.0-SNAPSHOT to deploy a .war on a weblogic server (8.1).
<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>***</groupId>
<artifactId>myAppli</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>myAppli</name>
<parent>
<artifactId>****</artifactId>
<groupId>***</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>2.1.0</version>
</dependency>
<dependency>
<groupId>axis</groupId>
<artifactId>axis-saaj</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis-ant</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>jdbc2_0-stdext</groupId>
<artifactId>jdbc2_0-stdext</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
<version>1.5.1</version>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>2.0</version>
<classifier>rc2</classifier>
</dependency>
<dependency>
<groupId>sybase</groupId>
<artifactId>jconnect</artifactId>
<version>5.5</version>
</dependency>
<dependency>
<groupId>jaxrpc</groupId>
<artifactId>jaxrpc</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
<version>0.2</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.8</version>
</dependency>
<dependency>
<groupId>javamail</groupId>
<artifactId>javamail</artifactId>
<version>win.1.0</version>
</dependency>
</dependencies>
<pluginRepositories>
<pluginRepository>
<id>webvision</id>
<name>nexus</name>
<layout>default</layout>
<url>nexusAddress</url>
</pluginRepository>
<pluginRepository>
<id>weblogicRepo</id>
<name>weblogic</name>
<layout>default</layout>
<url>http://snapshots.repository.codehaus.org</url>
</pluginRepository>
</pluginRepositories>
<build>
<finalName>appli-war-V${application.version}-${application.date}</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>weblogic-maven-plugin</artifactId>
<version>2.8.0-SNAPSHOT</version>
<configuration>
<name>myAppli</name>
<adminServerHostName>myAddress</adminServerHostName>
<adminServerPort>myPort</adminServerPort>
<adminServerProtocol>http</adminServerProtocol>
<userId>id</userId>
<password>pwd</password>
<packageName>pa-86a-myappl-${application.version}.war</packageName>
</configuration>
<dependencies>
<dependency>
<groupId>weblogic</groupId>
<artifactId>weblogic</artifactId>
<version>8.1</version>
</dependency>
<dependency>
<groupId>weblogic</groupId>
<artifactId>webservices</artifactId>
<version>8.1</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>axistools-maven-plugin</artifactId>
<version>1.4</version>
<configuration>
<sourceDirectory>${basedir}/src/main/webapp/WEB-INF</sourceDirectory>
<outputDirectory>${basedir}/src/main/java</outputDirectory>
<wsdlFiles>
<wsdlFile>myApply.wsdl</wsdlFile>
</wsdlFiles>
<serverSide>true</serverSide>
<typeMappingVersion>1.2</typeMappingVersion>
<wrapArrays>false</wrapArrays>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
<version>0.2</version>
</dependency>
<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis-jaxrpc</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>axis</groupId>
<artifactId>axis-wsdl4j</artifactId>
<version>1.5.1</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>generated-axis-wsdl2java-resource</id>
<phase>generate-sources</phase>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.4</source>
<target>1.4</target>
</configuration>
</plugin>
<!-- The ant plugin is used to update the server-config.wsdd -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>copy-serverconfig-wsdd-resource</id>
<goals>
<goal>run</goal>
</goals>
<phase>process-classes</phase>
<configuration>
<tasks>
update src/main/webapp/WEB-INF/server-config.wsdd
<java classname="org.apache.axis.utils.Admin" fork="true" classpathref="maven.compile.classpath"
dir="${basedir}/src/main/webapp/WEB-INF">
<arg value="server" />
<arg value="${basedir}/src/main/java/myApply/deploy.wsdd" />
</java>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<webResources>
<resource>
<directory>${basedir}\src\main\webapp</directory>
<filtering>true</filtering>
</resource>
</webResources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>make shared resources</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<finalName>myApply-${application.version}</finalName>
<descriptors>
<descriptor>myapplyLib.xml</descriptor>
</descriptors>
<encoding>UTF-8</encoding>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.7</version>
<configuration>
<doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
<!-- <docletPath>/path/to/UmlGraph.jar</docletPath> -->
<docletArtifact>
<groupId>org.umlgraph</groupId>
<artifactId>doclet</artifactId>
<version>5.1</version>
</docletArtifact>
<additionalparam>
-inferrel
-inferdep
-quiet
-hide java.*
-collpackages
java.util.*
-constructors
-inferrel
-qualify
-postfixpackage
-nodefontsize 9
-nodefontpackagesize 7
-attributes
-operations
-enumerations
-enumconstants
-visibility
-link
"http://java.sun.com/j2se/1.5/docs/api/"
</additionalparam>
<show>private</show>
<nohelp>true</nohelp>
<useStandardDocletOptions>true</useStandardDocletOptions>
</configuration>
</plugin>
<!-- FileBugs plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.0.1</version>
<configuration>
<findbugsXmlOutput>true</findbugsXmlOutput>
<findbugsXmlWithMessages>true</findbugsXmlWithMessages>
<xmlOutput>true</xmlOutput>
<excludeFilterFile>${project.build.directory}/../src/quality/findbugs-exclude.xml
</excludeFilterFile>
<includeFilterFile>${project.build.directory}/../src/quality/findbugs-include.xml
</includeFilterFile>
</configuration>
</plugin>
<!-- Eclipse plugin enforces download of source and JavaDoc jars -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.7</version>
<configuration>
<wtpversion>2.0</wtpversion>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<!-- Covertura plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jdepend-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.4</source>
<target>1.4</target>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
But I'm confronted with this problem:
javax.management.ObjectName; local class incompatible: stream classdesc serialVersionUID = -5467795090068647408, local class serialVersionUID = 1081892073854801359
I understand that the version of ObjectName are different between the server and in local, but I don't know how can I change this.
Thanks.
Paste your complete pom.xml, as well as: what version of java you're using, what version of Java that Weblogic supports. Have you defined a source/target level to use for your compiled classes? By default Maven uses 1.4, if I recall correctly. BEA 8 uses 1.4.x as well (though JRockit). If the SDK you're using is different that the one for WL, then that might be the cause.

Resources