Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing package property files in war build

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.

like image 358
steve217 Avatar asked Nov 02 '25 12:11

steve217


1 Answers

Put your property files where Application/Library resources belong, i.e. in src/main/resources:

src/main/resources/mypackage/MyProperties.properties 

And it will get copied properly.

like image 116
Pascal Thivent Avatar answered Nov 04 '25 09:11

Pascal Thivent



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!