changing to:

        <build>
                <resources>
                        <resource>
                                <directory>${basedir}</directory>
                        </resource>
                </resources>
       </build>

works. But when I unpack the folder I only wants its content. I have tried:

        <includes>root</includes>
        <includes>**/root/**</includes>
        <includes>root/**</includes>

what are the notation for this?



On Thu, Nov 3, 2011 at 3:05 PM, motes motes <[email protected]> wrote:
> During build I would like to unpack a specific folder from a
> dependency to my project. The structure of the project/artifact
> containing the folder is:
>
> com.resources
>  |-> root
>        | -> subfolder
>        | -> test.txt
>  |-> some-other-folder
>  |-> pom.xml
>
> and its pom:
>
>        <build>
>                <resources>
>                        <resource>
>                                <directory>root</directory>
>                        </resource>
>                </resources>
>        </build>
>
> Here is the project that wants to extract the 'root' folder to its own 
> basedir:
>
>                        <plugin>
>                                <groupId>org.apache.maven.plugins</groupId>
>                                
> <artifactId>maven-dependency-plugin</artifactId>
>                                <executions>
>                                        <execution>
>                                                <id>unpack-dependencies</id>
>                                                <phase>generate-sources</phase>
>                                                <goals>
>                                                        
> <goal>unpack-dependencies</goal>
>                                                </goals>
>                                                <configuration>
>                                                        <includeArtifactIds>
>                                                                com.resources
>                                                        </includeArtifactIds>
> <!--                                                    
> <excludes>**/META-INF/**</excludes>             works if I omit the
> includes tag, but I only want the content of the root folder..           -->
>                                                        
> <includes>**/root/**</includes>
>                                                        
> <outputDirectory>${basedir}/tmp</outputDirectory>
>                                                </configuration>
>                                        </execution>
>                                </executions>
>                        </plugin>
>
> but the tmp folder is empty in the project - how do I extract a
> specific folder from a dependency?
>

Reply via email to