hi,

well the targetPath was actually all that i needed. i couldn't find that one anywhere in the resource plugin page, might be worth adding it somewhere (e.g. in the examples)

cheers,
severin


Paul Copeland wrote:
The problem I ran into with this is that targetPath is relative to the classes directory for jar and war packing types. So if you want your xml files to go anywhere else Maven is just going to be way too helpful and not let you. I gave up and used an ant task for copying. If there is a way to use the resources plugin I be interested in knowing the undocumented trick.

On 7/8/2007 7:54 AM, Tim Kettler wrote:
Hi,

no need to configure the resource plugin to add additional resources. Just add a new resource specification to your pom like this:

<project>
  <build>
    <resources>
      <resource>
        <targetPath>mydir</targetPath>
        <directory>src/main/xsd</directory>
      </resource>
    </resources>
  </build>
</project>

-Tim

Severin Ecker schrieb:
Hi,

I seem to just can't figure out how i can copy files from an arbitrary location to an arbitrary location. I have some XML schema files in my source directory and since i'm using these as source they clearly don't fit in the resource directory. so i guess to have them automatically copied to the target dir i should just add the location they're in as a resource directory right?

(i've tried some different configurations but couldn't even get that working... could someone please enlighten me what's wrong with this, because it's being ignored and only the default resource directory is being processed?
<build>
 <plugins>
   <!-- .... -->
   <plugin>
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-resources-plugin</artifactId>
     <configuration>
       <resources>
         <resource>
           <directory>src/main/xsd</directory>
         </resource>
       </resources>
     </configuration>
   </plugin>
 </plugins>
</build>
)

anyway. i need those resources in some specific directory in the output, not just in target/classes but target/classes/mydir. what i don't want is to reflect this specific output need in the source directories.

in short.. is there any way in maven to copy files or do i have to write an ant task for that?

thanks in advance!
cheers,
severin


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to