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

Maven, relative path to local directory

I want to copy files in ".jenkins" or in "Temp" direcotry. maven-resources-plugin 2.7 copy-resource-one install
Lino556
  • 133
  • 1
  • 9
2
votes
1 answer

Explanation of an execution of maven-resources-plugin

I have inherited a project from another developer and there is a bit in the pom.xml that I don't quite understand. It's as follows: org.apache.maven.plugins maven-resources-plugin
El Guapo
  • 5,581
  • 7
  • 54
  • 82
2
votes
3 answers

Howto copy README.md into src/main/resources?

I want to show README.md file like help page in my web application. In order not to create duplicate, I need to copy by mvn from project path into resources. How can I do so? Any idea? I have tried:
Valijon
  • 12,667
  • 4
  • 34
  • 67
2
votes
3 answers

Maven exec-maven-plugin and maven-resources-plugin not running, not sure why

I have added a couple of new plugins to a maven pom.xml file. I have not been able to figure out why exec-maven-plugin and maven-resources-plugin they aren't running when I issue the command: mvn install. The other maven plugins do execute as…
bguiz
  • 27,371
  • 47
  • 154
  • 243
2
votes
0 answers

Maven project src/main/resources/myfolder not being created on deployment

I have this set, and everything working fine on a Windows box during tests, Deployment to unix box for testing, the folder is missing and is not created : org.apache.maven.plugins
NimChimpsky
  • 46,453
  • 60
  • 198
  • 311
2
votes
2 answers

How to stop Maven from overwriting if the destination exists

I have a directory in a dependency, that I want copied in src/main/webapp/mypath during the initialize phase. But I want it to be copied exactly and only once, meaning that: if src/main/webapp/mypath doesn't exist, then copy from dependency if…
2
votes
2 answers

How to use / in maven-remote-resources-plugin

I am trying to use the maven-remote-resources-plugin as per this example to selectively share common resources between multiple maven modules and I'm having a lot of difficulty getting the selective import of the resources to work. I am trying to…
TaninDirect
  • 458
  • 1
  • 7
  • 15
1
vote
0 answers

How to execute or update files stored in resources folder (intelliJ plugin)

I am trying to make a customized IntelliJ plugin and run a shell script file stored in src/main/resources folder from a java code file in the main folder. I need Help with a way to execute and change the contents of files in the resources folder…
1
vote
1 answer

maven does not copy property file to specified destination in tomcat

I am trying to copy property file in my project which is at the same level of pom.xml to a specific folder in tomcat. I am using the maven-resources-plugin. My maven version is apache-maven-3.8.6 Following is the folder structure of where the…
Avinash Reddy
  • 2,204
  • 3
  • 25
  • 44
1
vote
1 answer

getResourceAsStream returns null under Thread.currentThread.getContextClassLoader().getClass()

So The currently the loading configuration used by the library is ClassLoader loader = Thread.currentThread().getContextClassLoader(); InputStream in = loader.getClass().getResourceAsStream("/properties/a.properties") // null But when I tried to…
1
vote
0 answers

Copy resources into sepparate folders in the jar with maven

I'm new to maven and I've been trying to include some assets such as images and sounds in my exported .jar, but it doesn't seem to work. I'm trying to copy them in 2 separate folders one in ${basedir}/resources/Textures and the other in…
Moshu
  • 11
  • 1
1
vote
1 answer

CodenameOne - accessing images from nested folder hierarchy in app bundled resources

My CodenameOne app needs that some buttons have special icons. ScaleImageButton is the component that is suitable. The icons to be used are from the material icons repository, but some are modified, so the CN font is not suitable. I created the icon…
P5music
  • 3,197
  • 2
  • 32
  • 81
1
vote
0 answers

how to generate a maven property and use it later, in the maven-resources-plugin?

In my project I want to generate a property (essentially a username:password string, base64-encoded) and then use it when the maven-resources-plugin is executed. The property is correctly generated and visible outside the plugin (I've already tested…
Ionut
  • 103
  • 9
1
vote
1 answer

Spring Boot not working with dependent application.properties

I'm working with the Spring Boot 2.2.9.RELEASE. I have the main app and some plain starter (which just uses spring-actuator functionality) with some properties in its some-starter/src/main/resources/application.properties…
1
vote
0 answers

Spring Boot - how to include src/main/resources sub-directory to classpath

I have file src/main/resources/dev/important.properties where in fact 'dev' is one of Spring profile names I use. Somewhere in application this file is referenced as: @PropertySource(value = "classpath:important.properties") When I run in…
user3848246
  • 127
  • 1
  • 5