maven-resources-plugin

android-maven-plugin and resource filtering

拜拜、爱过 提交于 2019-12-12 07:18:16
问题 I'm newbie in maven and trying to configure it to build my android project with android-maven-plugin. I have an application.properties file in assets directory which contains different application settings. And i want to obtain this values from my pom. In properties file i define one property as myFilteredProperty=${helloFromPOM} and also define the same property in POM: <properties> <helloFromPOM>MY PROPERTY</helloFromPOM> </properties> Switched on filtering on assets dir <build> ...

Onejar and resource loading

自古美人都是妖i 提交于 2019-12-12 04:17:42
问题 I have a maven project which I would like to package in an executable jar. It's using quite a few dependencies, like spring and so on. It was suggested in a few posts to use OneJar, to avoid a lot of headaches. This is what I have currently in my pom.xml: <plugin> <groupId>org.dstovall</groupId> <artifactId>onejar-maven-plugin</artifactId> <version>1.4.4</version> <executions> <execution> <configuration> <mainClass>com.cool.project.Application</mainClass> <onejarVersion>0.97</onejarVersion>

Maven: copy file from workspace to folder which is outside of target

倾然丶 夕夏残阳落幕 提交于 2019-12-12 02:55:06
问题 During build, I need to copy 5 properties files from my project workspace src/main/resources/my , to the folder C:\my (I develop on Windows 7). C:\my exists but empty. I am using the following code in my pom.xml file, but the files are not copied. During the build, I do not get any error, but I am getting the following output: [INFO] --- maven-resources-plugin:2.5:copy-resources (copy-my-resources) @ my-webapp --- [debug] execute contextualize [WARNING] Using platform encoding (Cp1252

copy-resource not working in maven resource plugin

你说的曾经没有我的故事 提交于 2019-12-11 16:54:04
问题 I am trying to copy an xml file at build time using maven resource plugin with no success till now. <profile> . . <build> . <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> </resource> <resource> <directory>src/test/resources</directory> <filtering>true</filtering> </resource> </resources> . . <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <configuration> <encoding>UTF-8</encoding> <

Apache Maven Resources Plugin exclude a directory

时间秒杀一切 提交于 2019-12-10 17:39:19
问题 I'm trying to copy some resources from one point to an other during the build process. Therefore I use the Apache Maven Resources Plugin. Actually I exclude some files, I don't need. But I want also to exclude a directory. I tried serveral ways but it didn't work. <artifactId>maven-resources-plugin</artifactId> <version>2.5</version> <executions> <execution> <id>copy-client-product</id> <phase>verify</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>$

Maven-resources-plugin won't copy .metadata folder

丶灬走出姿态 提交于 2019-12-10 16:08:42
问题 I'm trying to copy a folder or following structure with maven-resources-plugin: root |- .metadata |- Project \- .gitignore Project directory and .gitignore files are copied, but .metadata directory is left out for some reason. How do I copy all contents of root folder? Here is configuration I tried: <plugin> <artifactId>maven-resources-plugin</artifactId> <version>2.5</version> <executions> <execution> <id>copy-resources</id> <phase>validate</phase> <goals> <goal>copy-resources</goal> </goals

Keep permissions on files with Maven resources:testResources

回眸只為那壹抹淺笑 提交于 2019-12-09 07:36:27
问题 Is it possible to keep permissions on file with Maven resources:testResources? My use case is a Selenium binary driver that I put in /src/test/resources that I would like to be able to use from my tests. My -rwxr-xr-x is however changed to -rw-r--r-- in target/test-classes. 回答1: This seems to be a bug in the Maven Resource Plugin If you are using the Maven Assembly Plugin, you can configure the file permissions there. If not, you might consider a workaround. You could do this via Ant by doing

What is the syntax to run a maven plugin from the command line.

让人想犯罪 __ 提交于 2019-12-06 08:23:25
I see that this has already been asked over here: How to execute maven plugin from command line? but I don't really understand the answer. It looks like the syntax is of the form: mvn foo:bar But I'm not really sure what foo and bar are supposed to be. Specifically I have configured the maven-resource-plugin like this: <plugin> <artifactId>maven-resources-plugin</artifactId> <version>2.5</version> <executions> <execution> <id>copy-resources</id> <phase>prepare-package</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <!--configuration here--> </configuration> </execution> <

Strange NullPointerException in maven-resources-plugin

时间秒杀一切 提交于 2019-12-05 17:59:21
About twice a day we get a NullPointerException in our build: [06:44:23]: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources (default-resources) on project spring-lib: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources failed. NullPointerException -> [Help 1] [06:44:23]: org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources (default-resources) on project spring-lib: Execution default-resources of goal org.apache.maven

Error loading property file Maven

半城伤御伤魂 提交于 2019-12-04 12:01:59
i get this error from eclipse marker , when i try to load a filter file from pom.xml. it display the message below. Error loading property file 'src/main/filters/filter.properties' (org.apache.maven.plugins:maven-resources-plugin:2.6:resources:default-resources:process-resources) pom.xml: <execution> <id>default-resources</id> <phase>process-resources</phase> <goals> <goal>resources</goal> </goals> <configuration> <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> </resource> </resources> <filters> <filter>src/main/filters/filter.properties</filter> <