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

Angular /assets/ not found on serving maven webapp in tomcat

My maven webapp has the following structure -webapp -dist -errors -WEB-INF The 'dist' folder has all the angular build files. In pom.xml I am using maven-resources plugin to copy the content of dist to the root of my .war When I am running the…
1
vote
1 answer

Maven skip copy of test resources

I want to skip copying the test resources during build. I tried the following plugin configuration: org.apache.maven.plugins maven-resources-plugin
Martin
  • 852
  • 7
  • 20
1
vote
0 answers

Unstable maven-dependency-plugin (specific folder is not always generated/included in .jar file)

We currently use a Jenkins pipeline for an Angular 7 and Spring Boot project, in which, among other things, the maven-dependency-plugin is in use. Unfortunately, we have the problem that the "coverage" folder, which is generated automatically after…
1
vote
1 answer

Maven and npm build

I have a hybrid application : Spring Boot and ReactJS. While running/building/generating WAR, I have set the pom.xml to copy the npm run build generated files from dist folder to template(spring) folder. But while running mvn clean install, file are…
SudeepShakya
  • 571
  • 3
  • 14
  • 34
1
vote
1 answer

Maven: How to manage dependency from one child module to another child module

I have maven parent-child project where parent has multiple child modules. One of the child module is generating a jar and other one is depending on that jar. Project structure is like: One parent module which has three child modules. Each one has…
Pravin
  • 195
  • 1
  • 4
  • 15
1
vote
2 answers

generated file in the wrong place

I'm using the maven resources plugin to generate a plain file via filtering within a war file. I have the template file with variables in a the folder src/main/webapp/app ...
jmann
  • 375
  • 1
  • 5
  • 17
1
vote
0 answers

Maven resources plugin filtering properties file with multiline value

I am using the Maven resources plugin to insert lines of code into a specific file. There are several lines of code so I need multiline support. This is only working, if I add those lines to the pom directly inbetween my properties tag and…
YourReflection
  • 375
  • 7
  • 22
1
vote
2 answers

Maven release not calling resources:resources plugin

I'm trying to deploy a maven project and upgrade the versions by executing the maven release plugin on TeamCity. I am able to successfully do this - however, the resources:resources plugin is no longer executed. Or more accurately, it is executed…
1
vote
1 answer

Maven package resources folder under src/main in final jar

By default Maven checks for the resources folder based on Standard Directory Layout . Though there is a problem with the final jar. It finally adds all the resources outside the src/main folder which is making my JavaFX application crass . Caused…
GOXR3PLUS
  • 6,877
  • 9
  • 44
  • 93
1
vote
1 answer

Maven build to include file in root folder of jar

I am using spring boot applications for my project. In one of the project, I need to include one config.properties file in the jar root path. enter image description here Because In my project, one of external jar is expecting this property file…
1
vote
2 answers

Maven delete resources after testing

I recently read you can have a logback.xml and a logback-test.xml in your classpath, where the test file has higher priority. Logback tries to find a file called logback-test.xml in the classpath. If no such file is found, logback tries to find a…
Impulse The Fox
  • 2,638
  • 2
  • 27
  • 52
1
vote
1 answer

Why is maven-war-plugin ignoring my configured filters for web resources?

I have a filter file in src/main/filters/base.properties with contents: testProperty=testValue My POM has resources, filtering, and additional web resources defined (using maven-war-plugin). It also overrides the default filtering…
Matt
  • 23,363
  • 39
  • 111
  • 152
1
vote
2 answers

How to include filtered resources into WEB-INF/classes using maven-resources-plugin?

I'm using the maven-resources-plugin because I need to use a custom delimiter when doing my filtering. My artifact is a WAR. I have some resources in my src/main/resources directory. Normally, when packaging a WAR, anything in this directory ends up…
Matt
  • 23,363
  • 39
  • 111
  • 152
1
vote
2 answers

When filtering, how can I use default filter file when specified file does not exist?

In my POM, I have: ${basedir}/src/main/props/${environment}-${flavor}.properties Where environment and flavor can be provided at command line: mvn clean install…
Matt
  • 23,363
  • 39
  • 111
  • 152
1
vote
1 answer

how to use maven resource plugin correcly

There was a build failure when the project clean and install, i think reason to build failure is maven resource plugin. i have gotten the following error during the build the project [DEBUG] Configuring mojo…
Buddhika Alwis
  • 373
  • 14
  • 23