Hi all - Iâm having problems building web apps on Eclipse â Juno SR2 with m2e 1.3.1 and m2e-wtp 0.17 on windows. My WTP project is called âSSORest Test Webappâ. It includes another maven project which creates a jar (i.e. itâs not a WTP project), called âSSORest Common Toolsâ.
 
Whenever I run mvn install from Eclipse on SSORest Test Webapp project, I get:
 
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project testweb: Failed to copy file for artifact [com.idfconnect.ssorest:common-tools:jar:1.0.2-SNAPSHOT:compile]: D:\dev\workspace\SSORest Common Tools\target\classes (Access is denied) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project testweb: Failed to copy file for artifact [com.idfconnect.ssorest:common-tools:jar:1.0.2-SNAPSHOT:compile]
â¦
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to copy file for artifact [com.idfconnect.ssorest:common-tools:jar:1.0.2-SNAPSHOT:compile]
â¦
Caused by: java.io.FileNotFoundException: D:\dev\workspace\SSORest Common Tools\target\classes (Access is denied)
 
Needless to say, that the path it is complaining about is the target classes folder for the project, not a file, but I canât figure out what the problem is. 
 
Anyone have any suggestions for me?
 
For reference here is the .classpath file:
 
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
       <classpathentry kind="src" output="target/classes" path="src/main/java">
             <attributes>
                    <attribute name="optional" value="true"/>
                    <attribute name="maven.pomderived" value="true"/>
             </attributes>
       </classpathentry>
       <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
             <attributes>
                    <attribute name="maven.pomderived" value="true"/>
             </attributes>
       </classpathentry>
       <classpathentry kind="src" output="target/test-classes" path="src/test/java">
             <attributes>
                    <attribute name="optional" value="true"/>
                    <attribute name="maven.pomderived" value="true"/>
             </attributes>
       </classpathentry>
       <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v7.0"/>
       <classpathentry combineaccessrules="false" kind="src" path="/SSORest Common Tools"/>
       <classpathentry combineaccessrules="false" kind="src" path="/SSORest Servlet Filter Agent"/>
       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
             <attributes>
                    <attribute name="maven.pomderived" value="true"/>
             </attributes>
       </classpathentry>
       <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
             <attributes>
                    <attribute name="maven.pomderived" value="true"/>
                    <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
             </attributes>
       </classpathentry>
       <classpathentry kind="output" path="target/classes"/>
</classpath>
 
And here is my pom.xml:
 
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.idfconnect.ssorest.test</groupId>
  <artifactId>testweb</artifactId>
  <packaging>war</packaging>
  <version>0.0.1-SNAPSHOT</version>
  <name>testweb Maven Webapp</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>1.0.9</version>
    </dependency>
    <dependency>
      <groupId>com.idfconnect.ssorest</groupId>
      <artifactId>common-tools</artifactId>
    </dependency>
  </dependencies>
  <build>
    <finalName>testweb</finalName>
            <plugins>
                  <plugin>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>2.3.2</version>
                        <configuration>
                              <source>1.6</source>
                              <target>1.6</target>
                        </configuration>
                  </plugin>
                  <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-war-plugin</artifactId>
                        <version>2.2</version>
                        <configuration>
                        </configuration>
                  </plugin>
      </plugins>
  </build>
  <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  <dependencyManagement>
      <dependencies>
            <dependency>
                  <groupId>com.idfconnect.ssorest</groupId>
                  <artifactId>common-tools</artifactId>
                  <version>1.0.2-SNAPSHOT</version>
            </dependency>
      </dependencies>
  </dependencyManagement>
</project>
 
Have I hit a bug or is something misconfigured? Appreciate any advice!
 
Best regards,
 
Richard Sand | Managing Director 
PO Box 91824 | Austin | Texas 78709-1824 | USA 
Office: +1 888 612 8820 ext 02 | Fax: +1 866 304 3754
Mobile: +1 267 984 3651

Â