XML : Error in eclipse validation with goal default-cli in maven-war-plugin

I have a problem in my project configuration in Eclipse IDE. I managed a NetBeans Java EE Project (version 8.0.2) using Maven as build tool, but when I want to migrate to Eclipse IDE (Kepler version), I get a error validation, It says as follows:

  An error ocurred where Filtering Resources  Execution default-cli of goal org.apache.maven.plugins:maven-resources-plugin:2.4:copy-resources failed. (org.apache.maven.plugins:maven-war-plugin:2.4:war:default-war:package)    pom.xml /myproject-web  line 119    Maven Build Problem    

My project is based in four project layouts: ejb (myproject-ejb), web (myproject-web), commons (myproject-commons) and ear(myproject-ear). In adition It exists a configuration global parent project (myproject). The pom.xml that I'm using are as follows:

myproject (pom.xml)

  <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">  <modelVersion>4.0.0</modelVersion>  <groupId>com.myproject</groupId>  <artifactId>myproject</artifactId>  <version>1.1.0.1-SNAPSHOT</version>  <packaging>pom</packaging>    <profiles>      <profile>          <id>development</id>          <activation>              <activeByDefault>true</activeByDefault>          </activation>          <properties>              <javax.faces.PROJECT_STAGE>Development</javax.faces.PROJECT_STAGE>              <dbMaintainer.includedQualifiers>dev,all</dbMaintainer.includedQualifiers>              <dbMaintainer.excludedQualifiers>pro</dbMaintainer.excludedQualifiers>          </properties>      </profile>      <profile>          <id>production</id>          <properties>              <javax.faces.PROJECT_STAGE>Production</javax.faces.PROJECT_STAGE>              <dbMaintainer.includedQualifiers>pro,all</dbMaintainer.includedQualifiers>              <dbMaintainer.excludedQualifiers>dev</dbMaintainer.excludedQualifiers>          </properties>      </profile>  </profiles>    <properties>      <maven.compiler.plugin>3.2</maven.compiler.plugin>      <maven.compiler.target>1.7</maven.compiler.target>      <maven.compiler.source>1.7</maven.compiler.source>      <maven.ear.plugin>2.9</maven.ear.plugin>      <maven.ejb.plugin>2.4</maven.ejb.plugin>      <maven.war.plugin>2.6</maven.war.plugin>      <maven.resources.plugin>2.7</maven.resources.plugin>      <project.encoding>UTF-8</project.encoding>      <ear.version>7</ear.version>      <ejb.version>3.1</ejb.version>      <war.version>2.3</war.version>      <commons.lang.version>3.3.2</commons.lang.version>      <commons.io.version>1.3.2</commons.io.version>      <commons.beanutils.version>1.9.2</commons.beanutils.version>      <log4j.version>1.2.17</log4j.version>      <javaee.version>7.0</javaee.version>      <junit.version>4.12</junit.version>      <javax.validation.version>1.1.0.Final</javax.validation.version>      <myproject.portal.version>${project.version}</myproject.portal.version>      <mockito.version>1.9.5</mockito.version>      <h2.version>1.4.185</h2.version>      <hibernate.jpa.version>1.0.0.Final</hibernate.jpa.version>      <hibernate.em.version>4.3.9.Final</hibernate.em.version>      <hibernate.annotations.version>3.5.6-Final</hibernate.annotations.version>      <hibernate.validator.version>5.1.2.Final</hibernate.validator.version>      <xadisk.version>1.2.2</xadisk.version>      <el.version>2.2</el.version>      <messagebox.version>2.0.7</messagebox.version>      <scripts.location>${project.basedir}/../database/scripts</scripts.location>      <netbeans.compile.on.save>all</netbeans.compile.on.save>  </properties>    <modules>      <module>../myproject-ejb</module>      <module>../myproject-web</module>      <module>../myproject-ear</module>      <module>../myproject-commons</module>  </modules>    <dependencies>        <!-- Java EE -->      <dependency>          <groupId>javax</groupId>          <artifactId>javaee-api</artifactId>          <version>${javaee.version}</version>          <scope>provided</scope>      </dependency>        <!-- Another dependencies... -->    </dependencies>    

myproject-web (pom.xml)

http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 com.myproject myproject-web war

  <name>myproject-web</name>    <properties>      <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>      <netbeans.hint.deploy.server>gfv3ee6</netbeans.hint.deploy.server>  </properties>    <dependencies>      <dependency>          <groupId>javax</groupId>          <artifactId>javaee-web-api</artifactId>          <version>6.0</version>          <scope>provided</scope>      </dependency>      <dependency>          <groupId>com.myproject</groupId>          <artifactId>myproject-ejb</artifactId>          <version>${project.portal.version}</version>          <scope>provided</scope>          <type>ejb</type>      </dependency>  </dependencies>    <build>      <resources>          <resource>              <directory>src/main/resources</directory>              <filtering>true</filtering>          </resource>      </resources>      <testResources>          <testResource>              <directory>src/test/resources</directory>              <filtering>true</filtering>          </testResource>      </testResources>        <plugins>          <plugin>              <groupId>org.apache.maven.plugins</groupId>              <artifactId>maven-compiler-plugin</artifactId>              <version>2.3.2</version>              <configuration>                  <source>1.7</source>                  <target>1.7</target>                  <compilerArguments>                      <endorseddirs>${endorsed.dir}</endorseddirs>                  </compilerArguments>              </configuration>          </plugin>            <plugin>              <artifactId>maven-resources-plugin</artifactId>              <version>2.4</version>              <executions>                  <execution>                      <id>copy-common-resources</id>                      <phase>generate-resources</phase>                      <goals>                          <goal>copy-resources</goal>                      </goals>                      <configuration>                          <outputDirectory>${project.build.directory}/classes/</outputDirectory>                          <overwrite>true</overwrite>                          <resources>                              <resource>                                  <directory>../myproject-commons/src/main/resources/</directory>                                  <includes>                                      <include>ValidationMessages_de.properties</include>                                      <include>ValidationMessages_en.properties</include>                                      <include>ValidationMessages_es.properties</include>                                  </includes>                              </resource>                          </resources>                      </configuration>                  </execution>              </executions>          </plugin>            <plugin>              <groupId>org.apache.maven.plugins</groupId>              <artifactId>maven-war-plugin</artifactId>              <version>2.4</version>              <configuration>                  <failOnMissingWebXml>true</failOnMissingWebXml>                  <webResources>                      <resource>                          <directory>src/main/webapp/WEB-INF</directory>                          <targetPath>WEB-INF</targetPath>                          <includes>                              <include>web.xml</include>                          </includes>                          <filtering>true</filtering>                      </resource>                  </webResources>              </configuration>          </plugin>          <plugin>              <groupId>org.apache.maven.plugins</groupId>              <artifactId>maven-dependency-plugin</artifactId>              <version>2.1</version>              <executions>                  <execution>                      <phase>validate</phase>                      <goals>                          <goal>copy</goal>                      </goals>                      <configuration>                          <outputDirectory>${endorsed.dir}</outputDirectory>                          <silent>true</silent>                          <artifactItems>                              <artifactItem>                                  <groupId>javax</groupId>                                  <artifactId>javaee-endorsed-api</artifactId>                                  <version>6.0</version>                                  <type>jar</type>                              </artifactItem>                          </artifactItems>                      </configuration>                  </execution>              </executions>          </plugin>        </plugins>  </build>    <parent>      <groupId>com.myproject</groupId>      <artifactId>myproject</artifactId>      <version>1.1.0.1-SNAPSHOT</version>      <relativePath>../myproject</relativePath>  </parent>    

What am I doing wrong? Somebody knows what can be the cause of this issue? I tried changing this block

  <plugin>              <groupId>org.apache.maven.plugins</groupId>              <artifactId>maven-war-plugin</artifactId>              <version>2.4</version>              <configuration>                  <failOnMissingWebXml>true</failOnMissingWebXml>                  <webResources>                      <resource>                          <directory>src/main/webapp/WEB-INF</directory>                          <targetPath>WEB-INF</targetPath>                          <includes>                              <include>web.xml</include>                          </includes>                          <filtering>true</filtering>                      </resource>                  </webResources>              </configuration>          </plugin>    

With this one (deleting filtering tag)

  <plugin>              <groupId>org.apache.maven.plugins</groupId>              <artifactId>maven-war-plugin</artifactId>              <version>2.4</version>              <configuration>                  <failOnMissingWebXml>true</failOnMissingWebXml>                  <webResources>                      <resource>                          <directory>src/main/webapp/WEB-INF</directory>                          <targetPath>WEB-INF</targetPath>                          <includes>                              <include>web.xml</include>                          </includes>                      </resource>                  </webResources>              </configuration>          </plugin>    

And I achieve functionality, however, I will need the filtering functionality in my project in a future, so that is not a valid solution. Also I tried run Maven -> Update Project and deleting all .m2 repository, with no success.

I am grateful to anyone who can help me. Thanks.

No comments:

Post a Comment