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
1
vote
1 answer

How to instruct Maven to copy compiled EAR on linux OR windows to a OS-specific directory?

I'm having a POM file which is currently copying the compiled EAR file to a linux directory. I mean to do the same for my Windows developers, without having them to manually adapt the output directory. Thus, the maven resource plugin should…
feder
  • 1,775
  • 5
  • 25
  • 36
1
vote
2 answers

Maven cannot access (existing) pom file

I am trying to compile a java project with maven. I have tried it with the right click on pom file > Maven > Maven Install in Eclipse (m2eclipse connector) Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources…
Atticus
  • 1,622
  • 7
  • 32
  • 55
1
vote
0 answers

Using common/default properties with multi-environment resource filtering?

I have a Maven project with the following properties file structure: ./clientA/ dev.properties staging.properties production.properties ./clientB/ dev.properties staging.properties production.properties and so forth and so…
1
vote
3 answers

Disable resource filtering for maven-remote-resources-plugin

I am trying to use the maven-remote-resources-plugin to share a number of resources across modules in a multi module maven project. Unfortunately the shared binary resources are being corrupted during bundlling, presumably by filtering. I am…
TaninDirect
  • 458
  • 1
  • 7
  • 15
0
votes
1 answer

maven copy bat file close to the jar

I am currently developing an maven based application. I want to make a bat file to run final jar. I've wrote bat file with call to java -jar... and put it into src/main/resources/runners folder. I also do not want to add this file to jar, so i…
madhead
  • 31,729
  • 16
  • 153
  • 201
0
votes
0 answers

Maven replaces the properties dynamically during the build

I have a project of this type: . |--- pom.xml (A) |--- pom.xml (B) | `--- pom.xml (C) `--- pom.xml (D) A: A 1.0 B: A
0
votes
0 answers

Maven resource plugin do not resolve project.parent.basedir

When I run the following command in my maven module (Spring Boot) : mvn resource:resource or even mvn install -DskipTests I expect my maven properties variables (declared in the module pom.xml) to be resolved: ${project.basedir}:…
user2668735
  • 1,048
  • 2
  • 18
  • 30
0
votes
0 answers

Unable to do resources filtering u

I was trying to use resource filtering to substiute some properties into a file but not successful. It is for a Springboot Application, in which I have the following in the pom.xml
Tom
  • 371
  • 2
  • 6
  • 15
0
votes
0 answers

Jenkins workspace as a output path in pom.xml

I am newbie to whole maven/pom.xml thing. I need help where I have a pom.xml in Repo1 and in that pom.xml I am using plugin "maven-resources-plugin". In this plugin I need to output specific file to jenkins workspace using . And in…
buttercup
  • 105
  • 1
  • 12
0
votes
1 answer

SpringBoot : possible to have dynmamic values/variables from application.properties into resources

For a SpringBoot app : I have resources in src/main/resources : it can be JSON, XML... doesn't matter Some resources are dynamic, for example : { "url": "${propA.url}" } This propA.url is defined in application.properties…
AntonBoarf
  • 1,239
  • 15
  • 31
0
votes
1 answer

File does not exist in target/classes folder of JAR, meant to be read from resources project folder

I am trying to read. a config from my resources folder in Java project from my deployed code. I am able to read from my local laptop but after deployment as JAR .manifest file, it says path does not exist. So my Java maven project str:…
Atihska
  • 4,803
  • 10
  • 56
  • 98
0
votes
0 answers

How to best copy files within a maven build?

After updating maven-resources-plugin to version 3.2.0 to get the fix for maintaining file permissions (x-bits), the copy fails when encountering a symbolic link of the form file -> ../file (and possibly other symlinks too): [ERROR] Failed to…
Bdot42
  • 11
  • 3
0
votes
1 answer

Non-java resources disappear from class package after maven packaging

I'm trying to create a Spring project structure where I have my HTML templates stored in the same src/main/java package (in Tapestry-like way), so the structure basically looks like this: src/main/java -org -example …
Pavel Polyakoff
  • 191
  • 1
  • 13
0
votes
1 answer

How to modify the contents or replace a file which resides in webapp directory of a Maven webapp project

I've a Maven webapp project. It has a default directory structure as below - |-- pom.xml `-- src `-- main |-- java | `-- com | `-- example | `-- projects | `--…
Sid
  • 145
  • 1
  • 11
0
votes
1 answer

Maven Resources plugin ignoring exclusion list

TL; DR Maven's Resources plugin doesn't seem to respect excludes elements in the resource configuration. Setting I have a large Java/Dart project where I need to deploy a WAR file that has both my UI and my backend in separate JARs. I want to cut…
Zalán Meggyesi
  • 624
  • 5
  • 19