Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-users] Resource files not copied to target folder

Hi!

Using m2eclipse 0.11/0.10 (last release for Eclipse Helios, from the official site*, before the 0.12)
in Eclipse Helios SR-1 I noticed, that sometimes the resource files are not copied ti the target folder.

I have a txt (or xml, it does not seem to matter) file under src/main/resource
Sometimes it is not copied to the target/classes folder

I think it happens after I make a change to the POM.xml file (like add a new dependency).

If I edit one of such resource file and save it, it gets copied to the target/classes folder (but the other resource
file is not, until I don't edit it too).

If I do a Project / Clean (with rebuild), all resource files are copied.

I vaguely remember sometimes they are not copied even after a Clean/Rebiuld.

Can someone sched some on this?

When I run apps in Eclipse by alt-shift X, J I get FileNotFound exceptions for this eresource files.
Before I "fixed" it by calling menu Run / Configurations and adding project/src/main/resources to the classpath.
Now I noticed that is not necessary, I just have to make sure the files get to the target/class folder...

I attach my pom file.

* - http://m2eclipse.sonatype.org/sites/m2e

Regards,
David Balažic
<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>test.stein</groupId>
  <artifactId>gui</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>gui</name>
  <url>http://maven.apache.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <build>
  	<plugins>
  		<plugin>
  			<groupId>org.apache.maven.plugins</groupId>
  			<artifactId>maven-compiler-plugin</artifactId>
  			<version>2.3.2</version>
  		</plugin>
  	</plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
    	<groupId>org.springframework</groupId>
    	<artifactId>spring-context</artifactId>
    	<version>3.0.5.RELEASE</version>
    	<type>jar</type>
    	<scope>compile</scope>
    </dependency>
    <dependency>
    	<groupId>ch.qos.logback</groupId>
    	<artifactId>logback-classic</artifactId>
    	<version>0.9.26</version>
    	<type>jar</type>
    	<scope>compile</scope>
    </dependency>
    <dependency>
    	<groupId>cglib</groupId>
    	<artifactId>cglib</artifactId>
    	<version>2.2</version>
    	<type>jar</type>
    	<scope>compile</scope>
    </dependency>
  </dependencies>
</project>

Back to the top