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
4
votes
1 answer

Maven resource filtering not replacing property

Here's my properties file: version = ${maven.build.timestamp} Here's how my pom.xml file looks like: yyyyMMddHHmmss
Ben
  • 193
  • 1
  • 11
4
votes
2 answers

Maven Copy Folder Before War File Generation

I have two Git repositories. One repositary is java services (maven web project) and another repository consists of UI {HTML, JS, CSS}(non maven), At the time of java services repository build I want to include the latest UI (master) into the war…
Srinivasu
  • 1,215
  • 14
  • 32
4
votes
4 answers

Maven-resources-plugin won't copy .metadata folder

I'm trying to copy a folder or following structure with maven-resources-plugin: root |- .metadata |- Project \- .gitignore Project directory and .gitignore files are copied, but .metadata directory is left out for some reason. How do I…
Basilevs
  • 22,440
  • 15
  • 57
  • 102
4
votes
1 answer

maven assembly plugin and profiles

I have a Maven (3.0.4) project in which process some external resources, and filtering them using some properties defined in a profile. When I launch the assembly plugin (either manually or hooked to a phase) it seems that maven-resource-plugin does…
Marco
  • 1,642
  • 3
  • 16
  • 29
4
votes
3 answers

android-maven-plugin and resource filtering

I'm newbie in maven and trying to configure it to build my android project with android-maven-plugin. I have an application.properties file in assets directory which contains different application settings. And i want to obtain this values from my…
3
votes
1 answer

Maven EAR plugin: Adding generated resources

In a custom Maven plugin, I add a file as resource by using the addResource of MavenProject. This works well for JAR projects, but for EARs, I see that the relevant file is copied to target/classes and then ignored. It is not present in the…
J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142
3
votes
1 answer

Override a Maven filter value with an environment variable or command-line parameter

We use Maven to build our java projects, with different profiles (testing, staging, production etc). Each profile has a its own filter, declared like : src/main/filters/filter-${env}.properties (with ${env}…
3
votes
1 answer

Maven - maven-remote-resources-plugin - resources end up in final build

I am using maven-remote-resources-plugin to import resources from another JAR: org.apache.maven.plugins maven-remote-resources-plugin
3
votes
1 answer

Maven - maven-remote-resources-plugin not including all resource directories

I have a project with multiple resource directories: src/main/resources src/main/generator src/main/generator2 I declare these resource directories as following:
3
votes
1 answer

Best practice for packaging resource files and classes with Maven

Currently I have a sample maven project with the following build part where I specify a second resource location directory: ... src/main/second-resources
tmarwen
  • 15,750
  • 5
  • 43
  • 62
3
votes
2 answers

How to filter resources with Maven for an Android project?

I want to use the Maven Resources Filtering plugin to externally define sensitive configuration data for an Android project. Therefore I created a .properties file which contains the sensitive data. It is excluded from version control. #…
JJD
  • 50,076
  • 60
  • 203
  • 339
3
votes
1 answer

Maven specific filters for tests

I found the following JIRA, where it is described, that it is possible to use different filter files for normal execution and for testing. The problem is I don't get how this has to be…
dag
  • 1,133
  • 12
  • 25
3
votes
1 answer

maven-compiler-plugin 3.0 not compiling resources folder under maven

I'm porting a project form Maven 2 to Maven 3. I've taken the opportunity to also update the version of some plugins, namely maven-compiler-plugin, from 2.1 to 3.0, and maven-resources-plugin, to 2.6. I have an interface under resources as…
halfwarp
  • 1,780
  • 5
  • 24
  • 41
3
votes
1 answer

Generating OSGi bundles distribution with maven-assembly-plugin

I have a multi-module project, where each module is packaged as an OSGi bundle using the Apache Felix maven-bundle-plugin. The whole project is built using a parent POM that lists the above-mentioned modules. Some modules contain configuration…
2
votes
0 answers

Why does maven-resources-plugin copy files multiple times (appfuse-basic-spring-archetype v2.1.0)

When successfully running >mvn package on an appfuse-basic-spring-archetype v2.1.0 project, the console output displays: [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ ScanillionAppTier02 --- [debug] execute…
cdhabecker
  • 1,693
  • 1
  • 14
  • 23
1 2
3
12 13