maven resources not placed in jar file

Viewed 41145

I want to add to a jar file some resources. I "profiled" it and added them in the build section.

But the resources aren't in the final jar file.

Here it goes the profile section of my pom.xml:

<profile>
  <id>myProfile</id>
  <build>
    <finalName>name</finalName>
    <resources>
      <resource>
        <targetPath>.</targetPath>
        <filtering>false</filtering>
        <directory>${basedir}/profiles/myFolder</directory>
        <includes>
          <include>file.txt</include>
          <include>file.xml</include>
        </includes>
      </resource>
    </resources>
  </build>
</profile>

And here the command I issue:

mvn clean install -PmyProfile

What's wrong?

4 Answers
Related