Questions tagged [maven-resources-plugin]

The Maven Resources Plugin handles the copying of project resources to the output directory.

There are two different kinds of resources: main resources and test resources. The difference is that the main resources are the resources associated to the main source code while the test resources are associated to the test source code. Thus, this allows the separation of resources for the main source code and its unit tests. Starting with version 2.3 this plugin uses the Maven Filtering shared component for filtering resources.

188 questions
0
votes
0 answers

Maven compile-phase bound plugin running to late.

I have two maven plugins configured. One, the exec-maven-plugin, is bound to the compile phase. The other, maven-resources-plugin, is bound to the prepare-package phase. I need exec to run before resources, and I figured this should work because the…
David
  • 14,569
  • 34
  • 78
  • 107
0
votes
1 answer

Unable to create a maven project in eclipse

I am trying to create a maven project and its showing the below error Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor…
sandywho
  • 353
  • 1
  • 7
  • 16
0
votes
1 answer

Exception while executing integration tests in maven

Getting following exception while executing integration tests using mvn verify against my webapp. The integration tests just loads the server url using HtmlUnit and checks for the status code 200. Not sure what I am missing here. It looks like the…
Nital
  • 5,784
  • 26
  • 103
  • 195
0
votes
1 answer

maven encoding resources spring messageSource

Having a spring project with this messageSource: @Bean public MessageSource messageSource() { ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource(); messageSource.setBasenames("Language",…
Ignasi
  • 5,887
  • 7
  • 45
  • 81
0
votes
1 answer

Write one plugin execution which will run for install phase but do not run on deploy phase

I have some schemas in my project . When I am running mvn deploy command. It is copying my schema to a centralized server. For unit testing of schema changes ,we have to upload it to the server first and then we can use it in our project. After…
priyas
  • 415
  • 1
  • 8
  • 29
0
votes
1 answer

Maven module dependency and resources

I have a maven Project say ProjectA, and there is a class say ClassA in this project which uses the files from resource folder, I am using following way to read from resource: String fileName =…
nIx..
  • 370
  • 1
  • 3
  • 15
0
votes
1 answer

Maven-resources-plugin how to execute the same phase and goal with different configuration

I have many subfolder in my src/test/resources and what I want to do is filter each subfolder with a specific filter file which resides in src/test/filters: I tried something like this: org.apache.maven.plugins
oussama.elhadri
  • 738
  • 3
  • 11
  • 27
0
votes
1 answer

How to specify to a resource folder which filter to use Maven?

I have two configuration properties files and two application Context xml files , ones for test and others for development and I have to specify which filter to use for each case . I tried to do this but it's not working, it's select the last…
oussama.elhadri
  • 738
  • 3
  • 11
  • 27
0
votes
1 answer

Onejar and resource loading

I have a maven project which I would like to package in an executable jar. It's using quite a few dependencies, like spring and so on. It was suggested in a few posts to use OneJar, to avoid a lot of headaches. This is what I have currently in my…
0
votes
2 answers

Excluding Resource while packaging in maven

I have a project with sample structure as : jcr_root |_apps |_A |_B |_etc |_A |_B What I need to do is while creating a package, I need to include either "apps/A & etc/A" or "apps/B & etc/B" In my pom.xml, I tried…
San7988
  • 106
  • 1
  • 7
0
votes
1 answer

Maven resources plugin, pass the list of parameters

My current plugin configuration works good and the part looks like: maven-resources-plugin .... ....
XZen
  • 225
  • 5
  • 27
  • 49
0
votes
1 answer

Getting Maven Build to include empty directories

I am trying to get maven to include an empty directory which is just used for output files created by the webapp (which is why it is empty). I have googled and the maven-resources-plugin seemed to be the best option for this, the documentation…
berimbolo
  • 3,319
  • 8
  • 43
  • 78
0
votes
1 answer

Maven not reading application property files

I am trying to introduce property files in my bundle (OSGI based with Spring Dynamic Modules). I want to keep properties like database URL, username, password etc. in that property file and want maven to read from that file. I tried to introduce…
Atul Kumar
  • 75
  • 1
  • 13
0
votes
0 answers

I do not understand why you have to use the project.build.resources for maven resources

From Maven resources plugin Copy resources for the main source code to the main output directory. Always uses the project.build.resources element to specify the resources to copy. Why? It just seems confusing to have these two ways of doing the…
smuggledPancakes
  • 9,881
  • 20
  • 74
  • 113
0
votes
1 answer

How can I configure maven resources plugin with a few copy tasks?

I have two copy tasks that I want to do with maven-resources-plugin. For example I need to copy config.yml from src/main/resources to root folder and to copy all folder contents from /src/main/resources/examples to src/examples. root /src …
rand0m86
  • 3,172
  • 4
  • 26
  • 29
1 2 3
12
13