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
2
votes
2 answers

maven resources plugin flat copy of resources

Given a folder 'database' containing JAR-connectors for different RDBMS. Each JAR is located in its own folder: +---database +---db2 +---db2.jar +---derby +---derby.jar +---h2 +---h2.jar +---mysql …
Jay
  • 3,445
  • 2
  • 24
  • 29
2
votes
1 answer

maven resources plugin has issues with filtering if there are odd number of '@' present in the filtered file

The maven resources plugin has issues with handling '@' characters inside the files it needs to filter. Here is the JIRA related to the same http://jira.codehaus.org/browse/MRESOURCES-104 http://jira.codehaus.org/browse/MRESOURCES-129 The issue…
Neeraj
  • 8,408
  • 8
  • 41
  • 69
2
votes
1 answer

How to trigger a specific execution of a Maven plugin?

I am trying to figure out whether it is possible to define executions of a Maven plugin in a section of a parent pom and pick a specific execution, and only that one, in a child project. To be more specific, I have several…
AbVog
  • 1,435
  • 22
  • 35
2
votes
1 answer

Maven resource plugin doesn't filter out customized delimiters nested in ${}

I have a properties file: property.a=$[value] I am using maven-resources-plugin with filtering on this property file enabled in order to substitute build variables in there: maven-resources-plugin
skapral
  • 1,128
  • 9
  • 26
2
votes
1 answer

How to overwrite resource file with less priority via Maven?

in our maven module we have multiple resource folders src/main/prod/sql and src/main/dev/sql. In prod we have scripts for production where are a lot of data inserts. We need overwrite some files in prod/sql directory with files in dev/sql when…
Denis Stephanov
  • 4,563
  • 24
  • 78
  • 174
2
votes
1 answer

Maven copy resources executed twice once for profile once default

I have a maven project where I have defined a profile based build including a custom maven-resource-plugin configuration. ... docker
Chief Peter
  • 343
  • 5
  • 11
2
votes
0 answers

Filter dependency ressource files inside a child maven pom.xml

I have a parent pom.xml which loads an assembly xml file (build.xml) from a build-tools module : maven-assembly-plugin 3.1.0
louis amoros
  • 2,418
  • 3
  • 19
  • 40
2
votes
0 answers

P2.inf filtering in Maven/Tycho during build phase of RCP

I'm trying to replace a variable in my p2.inf during the build phase using the maven-resources-plugin. According to this post I copied the p2.inf to another directory using filtering to replace my variable and in a later phase copy the filtered…
Vincent
  • 199
  • 1
  • 14
2
votes
1 answer

Can I update file content using Maven Plugin?

I would like to update the content of my context.xml and web.xml files based on the value of property files. I want to setup database connections the can be used by my web app. Is it possible to add thhis content in a dynamic way? I currently have…
2
votes
1 answer

Maven, exclude folder of resources from packaged jar

I'm trying to achieve the following distribution for my application, and I'm following this question as guideline dist/ |-- application-1.0.jar |-- conf/ |-- application.properties |-- log4j.properties |-- lib/ |-- *.jar My…
Tuomas Toivonen
  • 21,690
  • 47
  • 129
  • 225
2
votes
1 answer

maven-remote-resources-plugin vs maven-resources-plugin

I am creating a multi module maven project and want to keep resources (property files, json) in a separate module. Now to import this resource module in other modules, I have two option - either to use maven-resources-plugin or to use…
jayant
  • 366
  • 4
  • 14
2
votes
1 answer

How to escape backslashes in a filtered properties files with Maven?

My pom.xml file looks like this: src/test/resources true env.properties My env.properties looks like…
Stephan
  • 41,764
  • 65
  • 238
  • 329
2
votes
1 answer

Why maven-resources-plugin ignores my charset encoding setting?

I have a java artifact dual-built for both linux & IBM mainframe, all the dependent shell scripts (in /sbin dir) are initially written in ASCII but are copied to another directory (in /sbin-ebcdic). So I configure the maven-resources-plugin to do it…
tribbloid
  • 4,026
  • 14
  • 64
  • 103
2
votes
1 answer

Move resource files to target and exclude from jar

I have a maven project set up like this: \src \--main \--java \--fu \--bar \--AppMain.java \--resources \--log4j.xml With a pom using the maven-resources-plugin to move my resource files…
Zack
  • 3,819
  • 3
  • 27
  • 48
2
votes
1 answer

Why are my resources not getting copied in the "validate" phase?

I am trying to make sure that the correct resources are moved to WEB-INF/config/ no matter if I call mvn gcloud:deploy or mvn tomcat7:run which is why I am enforcing -Dpackage-mode= to be set. I am using the maven-resource-plugin for the…
Stefan Falk
  • 23,898
  • 50
  • 191
  • 378