maven-resources-plugin

Maven build is not filtering properties in Intellij

╄→гoц情女王★ 提交于 2019-12-04 05:34:18
I am having an issue where when I run by Maven build from Intellij 15.0.2 the Maven Resources Plugin is not filtering my properties into my files. It does work when I run mvn compile from the Windows command line. My plugin config is: <properties> <prop1>aaa</prop1> <prop2>bbb</prop2> </properties> ... <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>2.7</version> <configuration> <resources> <resource> <directory>src/main/resources</directory> <includes> <include>file1</include> <include>file2</include> </includes> <filtering>true<

Keep permissions on files with Maven resources:testResources

守給你的承諾、 提交于 2019-12-03 09:30:14
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. wjans 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 something like this: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun

Maven archetype - Velocity error because of a colon

蹲街弑〆低调 提交于 2019-12-01 18:19:42
问题 I am having trouble creating a Maven archetype because of the presence of a colon character (':') in one of the resources. I have a Spring XML that includes that symbol: <property name="maxSize" value="${ws.client.pool.maxSize:5}"/> When launching the archetype I get this error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project standalone-pom: org.apache.maven.archetype.exception.ArchetypeGenerationFailure: Error merging

android-maven-plugin and resource filtering

回眸只為那壹抹淺笑 提交于 2019-11-30 22:59:03
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> ... <resources> <resource> <directory>${project.basedir}/assets</directory> <filtering>true</filtering> </resource

How do I filter test resources in maven?

断了今生、忘了曾经 提交于 2019-11-28 20:24:10
I have the following pom.xml . When I run mvn clean resources:testResources , my test resources aren't being filtered (replacing placeholders in resources before they are put, in their modified form, into the output folder). Why? <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.example</groupId> <artifactId>foo</artifactId> <version>0.0.1</version>

Maven: how to place resource file together with jar?

佐手、 提交于 2019-11-28 03:50:21
I have \src\main\resources\logback.xml file. When I run mvn package it is placed into the jar by default. How do I make Maven place it next to jar, not inside? So, well, I just want Maven to copy the resource to the same folder where jar will be. No plugin definitions needed , just edit the build resources: <build> <resources> <!-- regular resource processsing for everything except logback.xml --> <resource> <directory>src/main/resources</directory> <excludes> <exclude>logback.xml</exclude> </excludes> </resource> <!-- resource processsing with a different output directory for logback.xml -->

Maven: how to place resource file together with jar?

梦想与她 提交于 2019-11-27 05:13:01
问题 I have \src\main\resources\logback.xml file. When I run mvn package it is placed into the jar by default. How do I make Maven place it next to jar, not inside? So, well, I just want Maven to copy the resource to the same folder where jar will be. 回答1: No plugin definitions needed , just edit the build resources: <build> <resources> <!-- regular resource processsing for everything except logback.xml --> <resource> <directory>src/main/resources</directory> <excludes> <exclude>logback.xml<