Maven install not copying resources folder to target directory.

Answered

Hi,

I have very straight forward maven project with two idea project modules. When I perform maven install, resources folder is not copied in target output directory.

Note- my resources directory contains hibernate.cfg.xml file.

 

Thanks,

Jayadip

6 comments
Comment actions Permalink

If `mvn install` doesn't copy the resources, maybe the issue is with your pom.xml and not with IntelliJ IDEA?

In case you are using non-standard resource folders, please refer to https://maven.apache.org/plugins/maven-resources-plugin/examples/resource-directory.html.

0
Comment actions Permalink

I've one parent pom for the project and two separate pom files for two idea modules. child pom contains

<build>
<!-- Tweaked normal Maven project directory structure to add .fxml files
in src folder. -->
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.fxml</include>
</includes>
</resource>
<resource>
<directory>src/main/java/resources</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
</build>
0
Comment actions Permalink

So, if you run `mvn install` in the terminal, resources from src/main/java/resources are not copied to output?

0
Comment actions Permalink

from terminal, if I run `mvn install` still resources from src/main/java/resources are not copied to output.

however, if I remove <build><resources>.....</resources></build> portion from all three poms, output is copied

0
Comment actions Permalink

http://stackoverflow.com/ might be a better place to get help with Maven issues.

0
Comment actions Permalink

yes, u was right, the issue was with pom file....fixed it...thanks a lot !

 

0

Please sign in to leave a comment.