Missing package property files in war build

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Missing package property files in war build

steves217
Littered throughout my project are various property files located in packages that are not being included when the package goal is run from a Maven build.

Using the 0.10.2 m2eclipse plugin and the default "package" goal.

In the project:
src->main->java->mypackage->MyProperties.java
src->main->java->mypackage->MyProperties.properties

In expanded war directory after the "package" goal is run:
target->classes->mypackage->MyProperties.class
-- no property file --
:(

I'm trying to get the group to adopt Maven and resolving this issue is going to be a deal maker. Moving the properties files isn't going to be practical. Any help is much appreciated.

Thanks,
Steve
Reply | Threaded
Open this post in threaded view
|

Re: Missing package property files in war build

Some Guy
Ideally you'd move the resources to /src/main/resources so Maven would automatically pick them up.

If that is not possible try something like this:

  <build>
    <resources>
      <resource>
        <directory>src/main/java</directory>
  <excludes>
          <exclude>**/*.java</exclude>
        </excludes>
      </resource>
    </resources>
  </build>