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

copy-resource not working in maven resource plugin

I am trying to copy an xml file at build time using maven resource plugin with no success till now. . . . src/main/resources true
Naxi
  • 1,504
  • 5
  • 33
  • 72
0
votes
1 answer

how to copy jar and zip files from target to other folder in same project using maven

After I have build my project as jar and zip files in target, I would like to copy them to other folder, lets say distribution. I use following plugin configuration in my pom: maven-resources-plugin
user1167753
  • 705
  • 3
  • 7
  • 15
0
votes
0 answers

How to override include pattern of resources from CLI

I am using Maven resources plugin and want to override include pattern from CLI. Is there a way? I tried this ${project.build.outputDirectory}
0
votes
2 answers

Bind a file inside a maven built EAR

Below is my project structure. I require to copy a file from the location \MainProject\src\non-packaged-resources to the \MainProject\sub-project2\sub-project2-web\src\main\resources location on building the MainProject. Below is the build section…
sher17
  • 607
  • 1
  • 12
  • 31
0
votes
1 answer

How to use maven-resources-plugin?

I am currently working on a multi-module maven project. It has the following plugin : org.apache.maven.plugins maven-resources-plugin 2.6
Santosh Pashupati
  • 499
  • 1
  • 6
  • 16
0
votes
0 answers

copy resources with output path containing part of input path

Say two modules mod1 and mod2 have the following structure: root ├── mod1/src/main/resources/db-migrations | ├── v1 | | ├── a.sql | | └── b.sql | └── v2 | ├── c.sql | └── d.sql | └── mod2/src/main/resources/db-migrations …
Felk
  • 7,720
  • 2
  • 35
  • 65
0
votes
1 answer

Maven avoid certain files from being copied to test-classes

I'm trying to avoid that certain file types don't end copied in target/test-classes. The code I have right now in my pom file but it's not working is: org.apache.maven.plugins
republicca
  • 43
  • 1
  • 8
0
votes
0 answers

Using current file location in maven-resource-plugin

When using Maven Resources Plugin to filter resources is there a way to refer to currently processed resource file path? For example if I have a YAML resource src/main/resources/config.yml with content: app: location: ${filePath} I'd like the…
Karol Dowbecki
  • 43,645
  • 9
  • 78
  • 111
0
votes
1 answer

Kotlin build - resources not getting copied

In my kotlin project the resources (ehcache.xml & logback.xml config) were not getting copied to target/classes.
aygavras
  • 170
  • 2
  • 11
0
votes
0 answers

maven-war-plugin - changing the location of files in the output war file

I am converting existing projects to maven. My task is to just write a POM which will create an exact deployables as ANT script is producing. I have to match MAVEN output war file with ANT generated war file. Ant script is copying a.jsp, b.jsp,…
JOHND
  • 2,597
  • 6
  • 27
  • 35
0
votes
0 answers

Eclipse Maven build

I have installed Eclipse Kepler and tried to import my code. An error occurred while importing which I don't understand. The error was: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its …
Pivi R
  • 1
0
votes
1 answer

Have Maven write to file in WAR package

What is the best approach to have my maven package-deploy project write to a properties file inside of a WAR file? I currently have three separate maven projects that create their own packages: a.war, b.zip, and c.tar.gz Inside of the WAR file…
Josafoot
  • 119
  • 1
  • 5
0
votes
0 answers

Maven: Cannot delete filtered resources

Within my pom.xml, I filter some resources and set the output directory ("asciidoc-filtered") to a folder within my /target folder: /target/asciidoc-filtered. After some build steps, I want to delete this "asciidoc-filtered" folder with the…
0
votes
0 answers

How do you copy one of two web.xml files into the WEB-INF folder based on a profile?

I'm attempting to build a war with one of two different web.xml files based on the build profile. I thought it would work if I used the resource tag but it's putting the web.xml file into the target/WEB-INF/classes directory and I need it in the…
0
votes
1 answer

Maven not compiling or including Scala .class files in jar only when using resources plugin

I have a Scala application that I'm trying to package as a .jar file using Maven. There is an application.conf file that I'm trying to package into the jar as a resource. However, when I use the resources plugin, either automatically by putting the…