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

Maven archetype - Velocity error because of a colon

I am having trouble creating a Maven archetype because of the presence of a colon character (':') in one of the resources. I have a Spring XML that includes that symbol: When launching…
codependent
  • 23,193
  • 31
  • 166
  • 308
7
votes
3 answers

maven-resources-plugin breaks the resource copy to test-classes

Normally, my POM file is working fine and all unit tests pass and all artifacts are packaged properly. However, once I've added this maven-resources-plugin to create specific configuration depending upon profile all my tests fail because nothing in…
TemarV
  • 317
  • 1
  • 4
  • 12
7
votes
1 answer

Error loading property file Maven

i get this error from eclipse marker , when i try to load a filter file from pom.xml. it display the message below. Error loading property file 'src/main/filters/filter.properties'…
oussama.elhadri
  • 738
  • 3
  • 11
  • 27
6
votes
1 answer

Can Maven 'import' resource dependencies?

Across several projects I have some resources (specifically Flyway database migration scripts) that I'd like to be shared. Is it possible to have these shared resources exist as a Maven artifact, and prior to a build have Maven resolve that…
DeejUK
  • 12,891
  • 19
  • 89
  • 169
6
votes
1 answer

what is the difference between maven-resources-plugin and the project.build.resources tag?

I am having a difficulty to understand the difference between the maven-resources-plugin and the project.build.resources tag, in maven. Both seem to have the same purpose. The different goals of the maven-resources-plugin [resources, testResources…
r9891
  • 3,163
  • 1
  • 14
  • 12
5
votes
2 answers

Maven default Resources not copying resources

this is my project directory structure: And this is my pom.xml:
Luke
  • 1,633
  • 3
  • 23
  • 37
5
votes
2 answers

What is the syntax to run a maven plugin from the command line.

I see that this has already been asked over here: How to execute maven plugin from command line? but I don't really understand the answer. It looks like the syntax is of the form: mvn foo:bar But I'm not really sure what foo and bar are supposed…
David
  • 14,569
  • 34
  • 78
  • 107
5
votes
0 answers

Errors running builder 'Maven Project Builder' when trying to create new project

Can any one please help me solve this issue? Errors occurred during the build. Errors running builder 'Maven Project Builder' on project 'SAD_spring_maven_restful'. Could not calculate build plan: Plugin…
nas
  • 2,289
  • 5
  • 32
  • 67
5
votes
1 answer

Want to set value in property file from pom build using maven resource plugin

I have one property file called environment.properties. In this file I have one entry: applicationUrl = ${applicationUrlFromPom} I want to use maven resource plugin setting in pom file, so that this value could be set at build time and I can use…
sumit
  • 189
  • 3
  • 11
5
votes
4 answers

intellij flags properties set by maven-resources-plugin as "cannot resolve symbol"

In my project's POM, I use maven-resources-plugin to set some properties from a file. However, Intellij flags these property references in the POM with the error "cannot resolve symbol", presumably because it cannot see them being defined anywhere.…
Andy Dennie
  • 6,012
  • 2
  • 32
  • 51
4
votes
1 answer

Strange NullPointerException in maven-resources-plugin

About twice a day we get a NullPointerException in our build: [06:44:23]: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources (default-resources) on project spring-lib: Execution default-resources of goal…
Eran Harel
  • 2,325
  • 19
  • 28
4
votes
2 answers

Could not find artifact org.apache.maven.plugins:maven-resources-plugin

I'm trying to build maven project, but not at all its working fine. Here is my POM.xml <
Nele
  • 77
  • 2
  • 2
  • 9
4
votes
2 answers

Could not transfer artifact from/to central because of InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

When I try to install the pom.xml of maven project, I get the following error. Please help. Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources (default-resources) on project pm: Execution default-resources of goal…
4
votes
3 answers

maven filtering replace multiple tokens during build?

I am able to replace the token with patter ${..} under src/main/resources. I want to also replace the tokens with pattern @{} under specific file src/main/webapp/WEB-INF/content/test.jsp or directory src/main/webapp/WEB-INF/content. I tried adding…
user3198603
  • 5,528
  • 13
  • 65
  • 125
4
votes
1 answer

How to stop backslashes being escaped when filtering with maven-resources-plugin?

I'd like to use the Maven Resources Plugin to set the XML schema location within an XML resource file: This works except for one thing - the substituted path has double backslashes instead…
Steve Chambers
  • 37,270
  • 24
  • 156
  • 208
1
2
3
12 13