I'm experiencing some strange behaviour when combining the AspectJ compiler plugin with an annotation processor that generates sources.
I have Project A, the main project with annotated classes.
I have Project B, the dependency project with aspect classes and the annotation processor.
Ideally, what should happen, is upon compilation of project A, sources generated from annotated classes in Project A, using the annotation processor in project B should be compiled and saved in target/generated-sources/annotations/...
What actually happens is, upon compilation of project A, sources are generated in target/generated-sources/annotations/... and then generated a second time at the root of project A.
Project A pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ar.com.glamit.carriersShipmentRequest</groupId>
<artifactId>carriersShipmentRequest</artifactId>
<version>1.0</version>
<name>carriersShipmentRequest</name>
<url>http://www.glamit.com.ar</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>
<aspectj.version>1.8.7</aspectj.version>
<aspectjcompiler.version>1.8</aspectjcompiler.version>
</properties>
<repositories>
<repository>
<id>glamit-repo</id>
<name>Glamit Repo</name>
<url>http://nexus.glamit.com.ar/repository/maven-releases/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.8.7</version>
</dependency>
<dependency>
<groupId>ar.com.glamit</groupId>
<artifactId>GlamitBootstrapper</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-core</artifactId>
<version>6.20.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-java</artifactId>
<version>6.20.0</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>fontbox</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>jempbox</artifactId>
<version>1.8.11</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>xmpbox</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>preflight</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox-tools</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>net.sf.barcode4j</groupId>
<artifactId>barcode4j</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>core</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>javase</artifactId>
<version>3.4.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>6.0.3</version>
<configuration>
<configFiles>src/main/resources/flyway.conf</configFiles>
</configuration>
<executions>
<execution>
<goals>
<goal>migrate</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<finalName>carriers-shipmentrequest</finalName>
<appendAssemblyId>false</appendAssemblyId>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>ar.com.glamit.carriersShipmentRequest.Entry</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.12.0</version>
<configuration>
<targetJdk>1.8</targetJdk>
<failOnViolation>true</failOnViolation>
<printFailingErrors>true</printFailingErrors>
<rulesets>
<ruleset>${pom.basedir}/pmd-exclude.xml</ruleset>
</rulesets>
<excludeRoots>
<excludeRoot>target/generated-sources/</excludeRoot>
</excludeRoots>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.8</version>
<configuration>
<aspectLibraries>
<aspectLibrary>
<groupId>ar.com.glamit</groupId>
<artifactId>GlamitBootstrapper</artifactId>
</aspectLibrary>
</aspectLibraries>
<complianceLevel>1.8</complianceLevel>
<source>8</source>
<target>8</target>
<Xlint>ignore</Xlint>
</configuration>
<executions>
<execution>
<phase>process-sources</phase>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.0.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Project B pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ar.com.glamit</groupId>
<artifactId>GlamitBootstrapper</artifactId>
<version>2.1</version>
<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>
<aspectj.version>1.8.7</aspectj.version>
<aspectjcompiler.version>1.8</aspectjcompiler.version>
</properties>
<repositories>
<repository>
<id>glamit-repo</id>
<name>Glamit Repo</name>
<url>http://nexus.glamit.com.ar/repository/maven-releases/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
</dependency>
<dependency>
<groupId>com.google.auto.service</groupId>
<artifactId>auto-service</artifactId>
<version>1.0-rc7</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.9.12</version>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>4.2.3</version>
</dependency>
<dependency>
<groupId>com.google.googlejavaformat</groupId>
<artifactId>google-java-format</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.13.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.13.0</version>
</dependency>
<dependency>
<groupId>ar.com.glamit</groupId>
<artifactId>glamitrest</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>ar.com.glamit</groupId>
<artifactId>glamitworkers</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>ar.com.glamit</groupId>
<artifactId>glamitlogger</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-core</artifactId>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.9-rc</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-core</artifactId>
<version>6.20.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-java</artifactId>
<version>6.20.0</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.7</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.8</version>
<configuration>
<source>8</source>
<target>8</target>
<Xlint>ignore</Xlint>
<complianceLevel>1.8</complianceLevel>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
<executions>
<execution>
<phase>process-sources</phase>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.12.0</version>
<configuration>
<targetJdk>1.8</targetJdk>
<failOnViolation>true</failOnViolation>
<printFailingErrors>true</printFailingErrors>
<rulesets>
<ruleset>${pom.basedir}/pmd-exclude.xml</ruleset>
</rulesets>
<excludeRoots>
<excludeRoot>target/generated-sources/</excludeRoot>
</excludeRoots>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspectj.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>
A workaround I found for this is to add <proc>none</proc> under <configuration> of the AspectJ compiler, but it's just a workaround. Am I missing something?
I've also found this question that seems to describe a similar issue.
Related
i am tryring to rerun the failed tests using maven surefire plugin using parameter "rerunFailingTestsCount=N"
i am not able to achieve retry with following POm and my runner class, tried with difference versions on maven Surefire from 2.19.1 onwards
any help around it is appreciated
***************my POM is as follow:***********************
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>OnlineTest</groupId>
<artifactId>VehicleRegistrationTest</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>${name}</name>
<properties>
<name>VehicleRegistration</name>
<maven.build.timestamp.format>yyyy-MM-dd-HHmm</maven.build.timestamp.format>
<buildNumber>${maven.build.timestamp}</buildNumber>
<reports.directory>${project.build.directory}/../reports/</reports.directory>
<selenium.enabled>true</selenium.enabled>
<test.parallel.count>2</test.parallel.count>
<surefire.maven.plugin.version>2.20.1</surefire.maven.plugin.version>
<cucumber.jvm.parallel.version>4.2.0</cucumber.jvm.parallel.version>
<parallel.scheme>SCENARIO</parallel.scheme>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-api</artifactId>
<version>2.20.1</version>
</dependency>
<dependency>
<groupId>com.github.mkolisnyk</groupId>
<artifactId>cucumber-runner</artifactId>
<version>1.3.3</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.11.0</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-junit</artifactId>
<version>2.0.0.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>3.11.0</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.mkolisnyk</groupId>
<artifactId>cucumber-report-generator</artifactId>
<version>1.3.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.mkolisnyk</groupId>
<artifactId>cucumber-runner</artifactId>
<version>1.3.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.mkolisnyk</groupId>
<artifactId>cucumber-runner</artifactId>
<version>1.3.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.mkolisnyk</groupId>
<artifactId>cucumber-report-generator</artifactId>
<version>1.3.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.mkolisnyk</groupId>
<artifactId>cucumber-runner</artifactId>
<version>1.3.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.mkolisnyk</groupId>
<artifactId>cucumber-report-generator</artifactId>
<version>1.3.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.mkolisnyk</groupId>
<artifactId>cucumber-report-generator</artifactId>
<version>1.3.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.5</version>
<scope>test</scope>
</dependency>
</dependencies>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>hindsighttesting.release</id>
<name>Hindsight Software Release Repository</name>
<url>http://repo.hindsightsoftware.com/public-maven</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.20.1</version>
<configuration>
<forkCount>${test.parallel.count}</forkCount>
<reuseForks>true</reuseForks>
<workingDirectory>parallel-tests-fork-${surefire.forkNumber}</workingDirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20.1</version>
<configuration>
<skip>true</skip>
<includes>
<include>**/*testRunner.java</include>
</includes>
<rerunFailingTestsCount>3</rerunFailingTestsCount>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.5</version>
</plugin>
<plugin>
<groupId>com.github.temyers</groupId>
<artifactId>cucumber-jvm-parallel-plugin</artifactId>
<version>${cucumber.jvm.parallel.version}</version>
<executions>
<execution>
<id>generateRunners</id>
<phase>generate-test-sources</phase>
<goals>
<goal>generateRunners</goal>
</goals>
<configuration>
<glue>
<package>stepDefinition.Hooks</package>
<package>webDriver</package>
<package>stepDefinitions</package>
</glue>
<featuresDirectory>src/test/resources/featureFiles/</featuresDirectory>
<cucumberOutputDir>target/json-reports</cucumberOutputDir>
<format>json</format>
<parallelScheme>${parallel.scheme}</parallelScheme>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>report.donut</groupId>
<artifactId>donut-maven-plugin</artifactId>
<version>0.0.6</version>
<executions>
<execution>
<id>execution</id>
<phase>post-integration-test</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<sourceDirectory>${project.build.directory}/json-reports</sourceDirectory>
<outputDirectory>reports/testReports</outputDirectory>
<prefix>rcf-test-${maven.build.timestamp}</prefix>
<timestamp>${maven.build.timestamp}</timestamp>
<template>default</template>
<projectName>${project.name}</projectName>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<compilerArgument>-Werror</compilerArgument>
</configuration>
</plugin>
</plugins>
</build>
</project>
***************my testRunner class is as follow:*******************
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;
#RunWith(Cucumber.class)
#CucumberOptions(
features = {"featureFiles"},
glue = {"stepDefinitions"},
plugin ={"rerun:target/rerun.txt"}
)
public class testRunner { }
I was having a similar issue running cucumber tests using approximately the same versions, where scenarios were not getting retried.
Solution was to bump the fail-safe plugin version to 2.21.0 as well as bump the cucumber versions.
The hint is provided in the following page: https://maven.apache.org/surefire/maven-failsafe-plugin/examples/rerun-failing-tests.html
Since of 2.21.0 the provider surefire-junit47 can rerun scenarios
created by cucumber-jvm 2.0.0 and higher.
So change the group info.cukes to io.cucumber and set version appropriately, e.g.:
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>2.3.1</version>
<scope>test</scope>
</dependency>
and the fail-safe plugin:
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.21.0</version>
<executions>
<execution>
<id>integration-tests</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<systemProperties combine.children="append" />
<rerunFailingTestsCount>2</rerunFailingTestsCount>
</configuration>
</execution>
</executions>
</plugin>
Note that the rerunFailingTestsCount parameter worked both in the configuration as shown here or as a property (e.g. mvn clean verify -Dfailsafe.rerunFailingTestsCount=2).
I want to remove struts dependency from my repository.It is being auto imported by some other dependency.
I think it is org.apache.velocity but after putting exclusion as well, Maven imports struts. Please help me identify which dependency auto imports struts.
http://maven.apache.org/maven-v4_0_0.xsd">
<!-- <packaging>jar</packaging> -->
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<profiles>
<profile>
<!-- Used only when invoking release:perform so as not to re-run tests as part of the deployment-->
<id>release</id>
<activation>
<property>
<name>env</name>
<value>release</value>
</property>
</activation>
<properties>
<skipTests>true</skipTests>
</properties>
</profile>
</profiles>
<distributionManagement>
<repository>
<id>veda.releases</id>
<name>veda.releases</name>
<url> http://etp-binrepo.corp.dmz/repository/internal</url>
</repository>
<snapshotRepository>
<id>veda.snapshots</id>
<name>veda.snapshots</name>
<url>http://etp-binrepo.corp.dmz/repository/snapshots</url>
<uniqueVersion>true</uniqueVersion>
</snapshotRepository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-decisiontables</artifactId>
<version>5.0.1</version>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-templates</artifactId>
<version>5.0.1</version>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-api</artifactId>
<version>5.0.1</version>
</dependency>
<dependency>
<groupId>org.mvel</groupId>
<artifactId>mvel</artifactId>
<version>2.0-dp4</version>
</dependency>
<dependency>
<groupId>net.sourceforge.cobertura</groupId>
<artifactId>cobertura</artifactId>
<version>1.9.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.9.1</version>
</dependency>
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.13</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>3.0.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.0.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>3.0.4.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jexcelapi</groupId>
<artifactId>jxl</artifactId>
<version>2.4.2</version>
</dependency>
<dependency>
<groupId>xpp3</groupId>
<artifactId>xpp3_min</artifactId>
<version>1.1.3.4.O</version>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.castor</groupId>
<artifactId>castor-codegen</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.codehaus.castor</groupId>
<artifactId>castor-xml-schema</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>2.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.6.2</version>
<exclusions>
<exclusion>
<groupId>org.apache.struts</groupId>
<artifactId>struts-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.struts</groupId>
<artifactId>struts-tiles</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.struts</groupId>
<artifactId>struts-taglib</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-tools</artifactId>
<version>2.0</version>
<exclusions>
<exclusion>
<groupId>org.apache.struts</groupId>
<artifactId>struts-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.struts</groupId>
<artifactId>struts-tiles</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.struts</groupId>
<artifactId>struts-taglib</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
<version>1.5.3</version>
</dependency>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
<version>3.4.4</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>com.veda.evs.app.biz.decision.util.DecisionDriver</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.8</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<inherited>true</inherited>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.1.2</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changelog-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.3</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jdepend-maven-plugin</artifactId>
<version>2.0-beta-1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jxr-maven-plugin</artifactId>
<version>2.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>checkstyle.xml</configLocation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8</version>
<configuration>
<additionalparam>-source 1.6</additionalparam>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Xms256m -Xmx512m</argLine>
<excludes xmlns="http://maven.apache.org/POM/4.0.0"/>
<systemProperties xmlns="http://maven.apache.org/POM/4.0.0">
<property>
<name>net.sourceforge.cobertura.datafile</name>
<value>target/cobertura/cobertura.ser</value>
</property>
</systemProperties>
<excludes/>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.1</version>
<configuration>
<tagBase>http://subversion/repos/ntp/IDMatrix/tags/release/IDM-Decisioning/</tagBase>
<goals>deploy -P release</goals>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>castor-maven-plugin</artifactId>
<version>2.1</version>
<configuration>
<!-- schemaDirectory>${basedir}/src/main/resources/xsd</schemaDirectory-->
<schema>src/main/resources/xsd/veda-decisioning-schema1.xsd</schema>
<packaging>com.veda.evs.app.biz.decision.schema</packaging>
<dest>${basedir}/src/main/java</dest>
<properties>${basedir}/src/main/resources/xsd/castorbuilder.properties</properties>
<bindingfile>src/main/resources/xsd/bindings.xml</bindingfile>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.1</version>
<reportSets>
<reportSet>
<reports>
<report>cim</report>
<report>index</report>
<report>modules</report>
<report>summary</report>
<report>mailing-list</report>
<report>cim</report>
<report>issue-tracking</report>
<report>license</report>
<report>scm</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<!-- JavaDoc - API-documentation -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8</version>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
<show>public</show>
<charset>utf-8</charset>
<docencoding>utf-8</docencoding>
<encoding>utf-8</encoding>
</configuration>
</plugin>
<!-- Surefire - JUnit testing-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.5</version>
<configuration>
<!-- Required to properly link JXR -->
<xrefLocation>${project.reporting.outputDirectory}/../xref-test</xrefLocation>
</configuration>
</plugin>
<!-- Cobertura - Test code coverage report. -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.3</version>
<configuration>
<formats>
<format>xml</format>
</formats>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<xmlOutput>true</xmlOutput>
<xmlOutputDirectory>target</xmlOutputDirectory>
</configuration>
</plugin>
</plugins>
</reporting>
I can't give you a pom.xml file with the correct exclusions, but you may try running the following command from your project root folder:
man dependency:tree
Then, copy the output into a text editor and do a search for struts. If one or more of the other dependencies is bringing it in, you should see that happening. Then, once you have identified the dependencies which are including it, you may exclude it:
<dependency>
<groupId>sample.ProjectA</groupId>
<artifactId>Project-A</artifactId>
<version>1.0</version>
<exclusions>
<exclusion>
<groupId>org.apache.struts</groupId>
<artifactId>struts-core</artifactId>
</exclusion>
</exclusions>
</dependency>
It's possible that Maven is downloading Struts for its own purposes. I know that until fairly recently, the maven-dependency-plugin and the maven-javadoc-plugin both had Struts as a dependency.
Try temporarily removing all of your own dependencies from the project and see if the problem still happens.
On that point, it would help with answering your question if you could tell us what Maven command reproduces the problem.
I am new to eclipse java and I am having an issue with my POM file and would like guidance in knowing how to deal with this error I am obtaining.
I have an error that seems to be pointing to the the maven compiler plugin and I am not sure what is the best approach to fix the following error:
Description Resource Path Location Type Cannot read lifecycle mapping
metadata for artifact
org.apache.maven.plugins:maven-compiler-plugin:maven-plugin:3.2:runtime
Cause: invalid END header (bad central directory
offset) pom.xml /StudentApp line 1 Maven Project Build Lifecycle
Mapping Problem
Below is my POM file:
<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>StudentApp</groupId>
<artifactId>StudentApp</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>StudentApp Serenity BDD</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<serenity.version>1.4.1-rc.6</serenity.version> <!-- https://bintray.com/serenity/maven/serenity-core/ -->
<serenity.maven.version>1.4.1-rc.6</serenity.maven.version>
<serenity.cucumber.version>1.1.6</serenity.cucumber.version> <!-- https://bintray.com/serenity/maven/serenity-cucumber/ -->
</properties>
<!-- Define the Bintray repos for convenience -->
<repositories>
<repository>
<id>serenity</id>
<name>bintray</name>
<url>http://dl.bintray.com/serenity/maven</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>serenity</id>
<name>bintray-plugins</name>
<url>http://dl.bintray.com/serenity/maven</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-core</artifactId>
<version>${serenity.version}</version>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-junit</artifactId>
<version>${serenity.version}</version>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-rest-assured</artifactId>
<version>${serenity.version}</version>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-cucumber</artifactId>
<version>${serenity.cucumber.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>1.8.6</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.5.4</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.googlecode.lambdaj</groupId>
<artifactId>lambdaj</artifactId>
<version>2.3.3</version>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>1.7.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<id>enforce</id>
<configuration>
<rules>
<requireUpperBoundDeps />
</rules>
</configuration>
<goals>
<goal>enforce</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.18</version>
<configuration>
<includes>
<include>**/studentapp/**/*.java</include>
<include>**/studentapp/*.java</include>
</includes>
<forkCount>4</forkCount>
<reuseForks>true</reuseForks>
<!-- <parallel>methods</parallel> -->
<!-- <threadCount>10</threadCount> -->
<argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>net.serenity-bdd.maven.plugins</groupId>
<artifactId>serenity-maven-plugin</artifactId>
<version>${serenity.maven.version}</version>
<dependencies>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-core</artifactId>
<version>${serenity.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>serenity-reports</id>
<phase>post-integration-test</phase>
<goals>
<goal>aggregate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
I am getting the below message in eclipse
Project build error: Non-resolvable parent POM: Could not transfer
artifact org.apache:apache:pom:9 from/to central
(http://repo1.maven.org/maven2): connection timed out and 'parent.relativePath'
points at wrong local POM
My pom.xml file is..
<?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>org.apache.mahout</groupId>
<artifactId>mahout</artifactId>
<version>0.5</version>
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>9</version>
</parent>
<packaging>pom</packaging>
<name>Apache Mahout</name>
<url>http://mahout.apache.org</url>
<inceptionYear>2008</inceptionYear>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<organization>
<name>The Apache Software Foundation</name>
<url>http://www.apache.org/</url>
</organization>
<mailingLists>
<mailingList>
<name>User list</name>
<subscribe>user-subscribe#mahout.apache.org</subscribe>
<unsubscribe>user-unsubscribe#mahout.apache.org</unsubscribe>
<post>user#mahout.apache.org</post>
<archive>http://mail-archives.apache.org/mod_mbox/mahout-user/</archive>
<otherArchives>
<otherArchive>http://mahout.apache.org/mail/user/</otherArchive>
<otherArchive>http://mahout.markmail.org/</otherArchive>
<otherArchive>http://www.nabble.com/Mahout-User-List-f32042.html</otherArchive>
</otherArchives>
</mailingList>
<mailingList>
<name>Developers List</name>
<subscribe>dev-subscribe#mahout.apache.org</subscribe>
<unsubscribe>dev-unsubscribe#mahout.apache.org</unsubscribe>
<post>mahout-dev#mahout.apache.org</post>
<archive>http://mail-archives.apache.org/mod_mbox/mahout-dev/</archive>
<otherArchives>
<otherArchive>http://mahout.apache.org/mail/dev/</otherArchive>
<otherArchive>http://mahout.markmail.org/</otherArchive>
<otherArchive>http://www.nabble.com/Mahout-Developer-List-f32041.html</otherArchive>
</otherArchives>
</mailingList>
<mailingList>
<name>Commit notifications</name>
<subscribe>commits-subscribe#mahout.apache.org</subscribe>
<unsubscribe>commits-unsubscribe#mahout.apache.org</unsubscribe>
<archive>http://mail-archives.apache.org/mod_mbox/mahout-commits/</archive>
<otherArchives>
<otherArchive>http://mahout.apache.org/mail/commits/</otherArchive>
</otherArchives>
</mailingList>
</mailingLists>
<properties>
<skipTests>false</skipTests>
<maven.clover.multiproject>true</maven.clover.multiproject>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<issueManagement>
<system>Jira</system>
<url>https://issues.apache.org/jira/browse/MAHOUT</url>
</issueManagement>
<dependencyManagement>
<dependencies>
<!-- our modules -->
<dependency>
<artifactId>mahout-core</artifactId>
<groupId>${project.groupId}</groupId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<version>${project.version}</version>
<artifactId>mahout-core</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<artifactId>mahout-math</artifactId>
<groupId>${project.groupId}</groupId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<version>${project.version}</version>
<artifactId>mahout-math</artifactId>
<type>test-jar</type>
</dependency>
<dependency>
<artifactId>mahout-utils</artifactId>
<groupId>${project.groupId}</groupId>
<version>${project.version}</version>
</dependency>
<dependency>
<artifactId>mahout-buildtools</artifactId>
<groupId>${project.groupId}</groupId>
<version>${project.version}</version>
</dependency>
<!-- sibling projects -->
<dependency>
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-collections</artifactId>
<version>1.0</version>
</dependency>
<!-- 3rd party -->
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-benchmark</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-commons-csv</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>2.5.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymockclassextension</artifactId>
<version>2.5.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-core</artifactId>
<version>0.20.2</version>
<exclusions>
<exclusion>
<groupId>net.sf.kosmosfs</groupId>
<artifactId>kfs</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-util</artifactId>
</exclusion>
<exclusion>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
</exclusion>
<exclusion>
<groupId>commons-el</groupId>
<artifactId>commons-el</artifactId>
</exclusion>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
<exclusion>
<groupId>oro</groupId>
<artifactId>oro</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-2.1</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-api-2.1</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>servlet-api-2.5</artifactId>
</exclusion>
<exclusion>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
</exclusion>
<exclusion>
<groupId>tomcat</groupId>
<artifactId>jasper-runtime</artifactId>
</exclusion>
<exclusion>
<groupId>tomcat</groupId>
<artifactId>jasper-compiler</artifactId>
</exclusion>
<exclusion>
<groupId>xmlenc</groupId>
<artifactId>xmlenc</artifactId>
</exclusion>
<exclusion>
<groupId>net.java.dev.jets3t</groupId>
<artifactId>jets3t</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.jdt</groupId>
<artifactId>core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jcl</artifactId>
<version>1.6.0</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>org.uncommons.maths</groupId>
<artifactId>uncommons-maths</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>org.uncommons.watchmaker</groupId>
<artifactId>watchmaker-framework</artifactId>
<version>0.6.2</version>
</dependency>
<dependency>
<groupId>org.uncommons.watchmaker</groupId>
<artifactId>watchmaker-swing</artifactId>
<version>0.6.2</version>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>r03</version>
</dependency>
<dependency>
<groupId>org.apache.mahout.commons</groupId>
<artifactId>commons-cli</artifactId>
<version>2.0-mahout</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.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.java.dev.jets3t</groupId>
<artifactId>jets3t</artifactId>
<version>0.7.1</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<defaultGoal>install</defaultGoal>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.1.2</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>verify</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.8</version>
<configuration>
<outputDirectory>${eclipse.outputDirectory}</outputDirectory>
<buildcommands>
<java.lang.String>org.eclipse.jdt.core.javabuilder</java.lang.String>
<java.lang.String>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</java.lang.String>
<java.lang.String>net.sourceforge.pmd.eclipse.plugin.pmdBuilder</java.lang.String>
</buildcommands>
<projectnatures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature>
<nature>net.sourceforge.pmd.eclipse.plugin.pmdNature</nature>
</projectnatures>
<additionalConfig>
<file>
<name>.checkstyle</name>
<location>/mahout-eclipse-checkstyle</location>
</file>
<file>
<name>.pmd</name>
<location>/mahout-eclipse-pmd</location>
</file>
<file>
<name>.ruleset</name>
<location>/mahout-pmd-ruleset.xml</location>
</file>
</additionalConfig>
</configuration>
<!-- the 'location' elements above refer to classpath -->
<dependencies>
<dependency>
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-eclipse-support</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.1</version>
<configuration>
<useReleaseProfile>true</useReleaseProfile>
<releaseProfiles>release,mahout_release</releaseProfiles>
<remoteTagging>true</remoteTagging>
<goals>deploy</goals>
<autoVersionSubmodules>true</autoVersionSubmodules>
<allowTimestampedSnapshots>true</allowTimestampedSnapshots>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.6</source>
<target>1.6</target>
<optimize>true</optimize>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.6</version>
<dependencies>
<dependency>
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-buildtools</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>2.5</version>
<dependencies>
<dependency>
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-buildtools</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<configuration>
<rulesets>
<!-- classpath -->
<ruleset>../eclipse/src/main/resources/mahout-pmd-ruleset.xml</ruleset>
</rulesets>
<sourceEncoding>UTF-8</sourceEncoding>
<targetJdk>1.5</targetJdk>
<linkXRef>false</linkXRef>
<includeTests>true</includeTests>
<verbose>true</verbose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.8.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-remote-resources-plugin</artifactId>
<version>1.1</version>
<configuration>
<skipTests>${skipTests}</skipTests>
<appendedResourcesDirectory>./src/main/appended-resources</appendedResourcesDirectory>
<resourceBundles>
<resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>
</resourceBundles>
<supplementalModels>
<supplementalModel>supplemental-models.xml</supplementalModel>
</supplementalModels>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkMode>once</forkMode>
<argLine>-Xms256m -Xmx512m</argLine>
<testFailureIgnore>false</testFailureIgnore>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-remote-resources-plugin</artifactId>
<inherited>false</inherited>
<configuration>
<resourceBundles>
<resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>
</resourceBundles>
<supplementalModels>
<supplementalModel>supplemental-models.xml</supplementalModel>
</supplementalModels>
</configuration>
</plugin>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-clover2-plugin</artifactId>
<version>2.6.3</version>
</plugin>
</plugins>
</build>
<modules>
<module>buildtools</module>
<module>eclipse</module>
<module>math</module>
<module>core</module>
<module>taste-web</module>
<module>examples</module>
<module>utils</module>
<module>distribution</module>
</modules>
<profiles>
<profile>
<id>fastinstall</id>
<properties>
<skipTests>true</skipTests>
<pmd.skip>true</pmd.skip>
<checkstyle.skip>true</checkstyle.skip>
</properties>
</profile>
<profile>
<id>nochecks</id>
<properties>
<pmd.skip>true</pmd.skip>
<checkstyle.skip>true</checkstyle.skip>
</properties>
</profile>
<profile>
<!-- most of this profile lives in other places, like distribution -->
<id>release.prepare</id>
<properties>
<skipTests>true</skipTests>
<pmd.skip>true</pmd.skip>
<checkstyle.skip>true</checkstyle.skip>
</properties>
</profile>
<profile>
<id>release</id>
<properties>
<skipTests>true</skipTests>
<pmd.skip>true</pmd.skip>
<checkstyle.skip>true</checkstyle.skip>
</properties>
<build>
<plugins>
<plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>sourcecheck</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<compilerArgument>${compile.flags}</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>set.eclipse.output</id>
<properties>
<eclipse.outputDirectory>${basedir}/eclipse-classes</eclipse.outputDirectory>
</properties>
</profile>
<profile>
<id>setup.eclipse</id>
<build>
<defaultGoal>process-test-sources</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.8</version>
<executions>
<execution>
<id>setup.eclipse.project</id>
<phase>process-test-sources</phase>
<goals>
<goal>eclipse</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<scm>
<connection>scm:svn:https://svn.apache.org/repos/asf/mahout/tags/mahout-0.5</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/mahout/tags/mahout-0.5</developerConnection>
<url>https://svn.apache.org/repos/asf/mahout/tags/mahout-0.5</url>
</scm>
<distributionManagement>
<site>
<id>Website</id>
<url>scp://people.apache.org/home/isabel/public_html/mahout_site</url>
</site>
</distributionManagement>
<reporting>
<plugins>
<!-- surefire runs unit tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.8.1</version>
</plugin>
<!-- checkstyle -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.6</version>
<configuration>
<configLocation>${project.build.directory}/../../eclipse/src/main/resources/mahout-checkstyle.xml</configLocation>
<consoleOutput>true</consoleOutput>
</configuration>
</plugin>
<!-- test coverage plugin -->
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-clover2-plugin</artifactId>
<version>2.6.3</version>
<configuration>
<generateHistorical>true</generateHistorical>
<licenseLocation>buildtools/clover.license</licenseLocation>
<generatePdf>false</generatePdf>
<generateXml>true</generateXml>
<generateHtml>true</generateHtml>
</configuration>
</plugin>
<!-- generate java doc -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.7</version>
</plugin>
<!-- code duplication - copy and paste detection -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>2.5</version>
<configuration>
<rulesets>
<ruleset>../eclipse/src/main/resources/mahout-pmd-ruleset.xml</ruleset>
</rulesets>
<sourceEncoding>UTF-8</sourceEncoding>
<targetJdk>1.5</targetJdk>
<linkXRef>false</linkXRef>
<includeTests>true</includeTests>
<verbose>true</verbose>
</configuration>
</plugin>
[rest of pom omitted]
Can u please help me resolve this issue..
I don't think the problem is with the pom.xml - it looks like the standard Mahout 0.5 one. You need to explain what you are trying to do in Eclipse. In general, to use Maven projects in Eclipse, you need to install the M2Eclipse plugin. Then in Eclipse select
File->Import->Maven->Existing Maven Project
and select the Mahout project on the filesystem.
I checked out Mahout 0.5
svn checkout http://svn.apache.org/repos/asf/mahout/tags/mahout-0.5/
then imported into Eclipse as I describe above. I did get some errors but different to you e.g.
maven-dependency-plugin (goals "copy-dependencies", "unpack") is not supported
by m2e. pom.xml /mahout-examples line 54 Maven Project Build Lifecycle Mapping
Problem
this is a known issue and can be solved by putting <pluginManagement> tags around <plugins> in <build>. However it is not the problem you describe.
I solved this issue after setting proxy in Maven setting.xml
In Eclipse try following steps:
Right click the project->Maven->Update Project
Check checkbox "Force Update of Snapshots/Releases"
Click OK.
Hello I'm trying to use groovy with java, on java maven project, I think I provided every artifacts and plugins needed to run it well, here is my pom :
pom content
and here is the exception caught after trying to build
I linked it to pastebin cause I enabled -X option to get full stack trace trace
Finally I found a way to get a pom working with gmaven 1.4, groovy 2.0 and java 7, inspired by this project "primefaces-groovy-cassandra"
here is a simple pom of a war type application :
`<?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>office</groupId>
<artifactId>gmOffice</artifactId>
<name>gmOffice</name>
<version>0.0.1</version>
<packaging>war</packaging>
<properties>
<!-- Configuration -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.7</java.version>
<!-- Dependencies -->
<javax.servlet.api.version>3.0.1</javax.servlet.api.version>
<primefaces.version>3.2</primefaces.version>
<myfaces.version>2.1.7</myfaces.version>
<!-- Maven plugins -->
<maven.compiler.version>2.4</maven.compiler.version>
<maven.enforcer.version>1.0.1</maven.enforcer.version>
<maven.war.version>2.2</maven.war.version>
<maven.gmaven.version>1.4</maven.gmaven.version>
<netbeans.hint.deploy.server>Tomcat</netbeans.hint.deploy.server>
<slf4j.version>1.6.1</slf4j.version>
</properties>
<repositories>
<repository>
<id>sonatype-releases</id>
<name>Sonatype Releases Repository</name>
<url>http://oss.sonatype.org/content/repositories/releases/</url>
</repository>
<repository>
<id>primefaces-releases</id>
<name>PrimeFaces Releases Repository</name>
<url>http://repository.primefaces.org</url>
</repository>
</repositories>
<prerequisites>
<maven>3.0.0</maven>
</prerequisites>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>${primefaces.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.19</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.3.164</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.2.0.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.1.7</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1.7</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${maven.enforcer.version}</version>
<executions>
<execution>
<id>enforce-versions</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>[3.0.0,)</version>
</requireMavenVersion>
<requireJavaVersion>
<version>[1.6.0,)</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>${maven.gmaven.version}</version>
<configuration>
<source>src/main/groovy</source>
<providerSelection>2.0</providerSelection>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>generateStubs</goal>
<goal>compile</goal>
<goal>generateTestStubs</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<configLocation>config/sun_checks.xml</configLocation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>${maven.war.version}</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<Implementation-Version>${project.version}</Implementation-Version>
<Implementation-Timestamp>${maven.build.timestamp}</Implementation-Timestamp>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>