Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] No packaging of resources into jar

Hi all,
I've a project which contains some resources under /src/main/resources.
Now I want to pack these resources into my jar file. But it doesn't
work. The resources are copied to /classes/resources, but the resulting
jar file is empty!

I have the following configuration:

build.properties:
bin.includes = META-INF/,\
               src/main/resources/

pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd";
xmlns="http://maven.apache.org/POM/4.0.0";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.mycompany.myapp</groupId>
    <artifactId>MyApp-Parent</artifactId>
    <version>2.0.0-SNAPSHOT</version>
  </parent>
  <artifactId>com.mycompany.myapp.resources.templates</artifactId>
  <version>2.0.0-SNAPSHOT</version>
  <packaging>eclipse-plugin</packaging>
      <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <targetPath>resources</targetPath>
                <!-- filtering>true</filtering -->
                <includes>
                    <include>**/*</include>
                </includes>
            </resource>
        </resources>
</build>
</project>

I've tried it with a pom-less  build, but this didn't work, too. How can
I pack the resource files into the jar file?

TIA,
Ralf



Back to the top