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

Troubles with Russian symbols in Maven resource filtering

I'm trying to send some russian text to *.properties file with Maven resource filtering(maven-resources-plugin) from profiles in pom. So, when i'm sending English symbols it works well, but when i'm trying to get values in Russian from…
cat-ninja
  • 39
  • 12
0
votes
1 answer

Uber jar not reading external properties files

I am creating an uber jar i.e. jar with dependencies for my project. I have a bunch of properties files that the project uses. I want to be able to change these properties files before running my project so i want them to be outside of the jar. Here…
AbtPst
  • 7,778
  • 17
  • 91
  • 172
0
votes
1 answer

Generating filtered resources from the maven sources:jar execution

I would like to generate a sources jar file for my project, so I have included the maven-source-plugin. However, I am also using the resource filtering plugin to set a version number in a property file for my project. When I generate a final jar…
0
votes
1 answer

maven-resources-plugin + profiles

I am moving an existing project (legacy) to maven. It has the following structure: ParentProject - EARModule - src - target - pom.xml (ear) - WARModule - src - main - java - (java packages and classes) -…
0
votes
1 answer

Why isn't mvn resources:resources picking up buildNumber?

I've got a maven project that uses the buildnumber-maven-plugin. If I run mvn validate I see it's working: [INFO] --- buildnumber-maven-plugin:1.3:create (default) @ myproject --- [INFO] Executing: /bin/sh -c cd /Users/rob/Workspace/myproject && git…
Rob N
  • 15,024
  • 17
  • 92
  • 165
0
votes
0 answers

How do you filter integers in source files

Anyone know how to filter text outside of quotes in a java file via the resource plugin? I have a resource filter set with a delimiter of @ but I only see the version.designator replaced. This makes me think there's a trick to filtering text…
Peter Kahn
  • 12,364
  • 20
  • 77
  • 135
0
votes
1 answer

Custom file filter (maven-resource-plugin)

I`ve got some (html) files which eventually have to be included to a WAR file. The files look like: .. .. html mark-up I want to keep... .. I`d like to transform content of each file…
Shake
  • 61
  • 1
0
votes
1 answer

maven post build copy files

I am currently working with a specific project structure. All the jar files inside project\WEB-INF\lib which is prepared to create a WAR in target folder should be copied into project\lib Can we run such script either using maven-antrun or…
Dickens A S
  • 3,824
  • 2
  • 22
  • 45
0
votes
1 answer

maven-resources-plugin:2.5 /checkRar.resource (Permission denied)

I'm trying to build Maven project on my Mac by using Netbeans. But I have some strange problems with maven-resources-plugin It's returning "permission denied" on all my .resources…
Alex91ckua
  • 87
  • 1
  • 9
0
votes
1 answer

Maven package only includes file in second run

I am creating a non-java Maven artifact. In the pom.xml I resolve some dependencies and then run a custom script using exec plugin. Some files are created in a directory, but Maven does not see them when packaging them in a jar. When I run mvn…
Martin Melka
  • 7,177
  • 16
  • 79
  • 138
0
votes
1 answer

Java GWT: File becomes invalid when deployed to Tomcat

I am using a *.p12 (private key) File to connect to my google analytics data as follows. GoogleCredential credential = new GoogleCredential.Builder() .setTransport(httpTransport) .setJsonFactory(jsonFactory) …
Iam Riz
  • 117
  • 1
  • 14
0
votes
0 answers

spring-boot-maven-plugin reverts the property files after run

This is the build configuration of my project in pom.xml, When I pack the project, the property files already changed with the selected profile properties, but when I run the project using maven-boot-plugin:run in Intellij IDEA, the property files…
0
votes
1 answer

Maven resource plugin expose an image from a different path

I have an immage accessible from /resources/gfx/loading.gif I would like to have it accessible from /img/immage.gif I tried with maven-resources-plugin with the following config, but actualy nothing happens. I'm curretnly building the app from…
simonC
  • 4,101
  • 10
  • 50
  • 78
0
votes
1 answer

getClassLoader().getResource("Configuration.xml").getPath() does not work inside a jar

I've created a maven based java project which has resources directory (src/java/resources) and in it some xml files and maven copies them into target/classes/resources (target/classes is my classpath). To know the content of an xml file, I use: new…
Matoy
  • 1,738
  • 3
  • 22
  • 53