Maven: copy the file from the workspace to a folder outside the target

During the build, I need to copy 5 propertiesfiles from the project workspace src/main/resources/myto the folder C:\my(I'm developing in Windows 7). C:\myexists but empty.

I use the following code in my pom.xml file, but the files are not copied.

During the build, I get no errors, but I get the following output:

[INFO] --- maven-resources-plugin:2.5:copy-resources (copy-my-resources) @ my-webapp ---
[debug] execute contextualize
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 5 resources

Please note that he does not say [INFO] Copying 5 resources to somewhere, as is usually the case with successful copying.

However, files are not copied to at C:\myall.

Could you see what I should change in my XML?

Here is the relevant code:

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-resources-plugin</artifactId>
    <version>2.5</version>
    <executions>
            <execution>
                    <id>copy-my-resources</id>

                    <phase>process-resources</phase>

                    <goals>
                            <goal>copy-resources</goal>
                    </goals>
                    <configuration>

                            <!-- overwrite! -->
                            <overwrite>true</overwrite>

                            <outputDirectory>${env.HOMEDRIVE}/my</outputDirectory>
                            <resources>
                                    <resource>
                                            <directory>src/main/resources/my</directory>
                                            <filtering>false</filtering>
                                            <includes>
                                                <include>**/*.properties</include>
                                            </includes>
                                    </resource>
                            </resources>
                    </configuration>
            </execution>
    </executions>
</plugin>
0
source share
2 answers

run mvn -X ..., .

, ${env.HOMEDRIVE} ${env.HOMEDRIVE}/ .

+1

, pom:

<properties>
  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

, - , homedrive .., . , .zip, .

+2

All Articles