Thank you!
I expected at least that maven copies /src/main/config or ...resource folder to the target/test/ or binds it to the classpath for testing. But no. Do I have to specify /src/main/config classpath in the pom?

thanks again
roland

[EMAIL PROTECTED] schrieb:
I dont know if this is the best approach, but here's what I did (POM follows):

Create filters to filter into my configuration files
Put the start scripts and other resources external to the jar into the resource folder
Use the maven assembly plugin to create my tar.gz containing both.

Note, the actual JAR is built and installed in a different project. In this case, I simply make reference to the jar as a dependency to get this pom to pull it and all its dependencies into the tar.gz.

To get the whole thing to work run:

mvn resources:resources assembly:assembly -Denv=<dev|sit|uat|prod>

Thanks,
Brian Yoffe

<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";>
  <parent>
    <groupId>com.jpmorgan.pat.fi</groupId>
    <artifactId>fixed-income</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>configuration</artifactId>
  <packaging>pom</packaging>
  <name>Pat Fixed Income Packaging</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
      <groupId>${pom.groupId}</groupId>
      <artifactId>fi-strategies</artifactId>
      <version>${pom.version}</version>
      <scope>runtime</scope>
    </dependency>
  </dependencies>
  <build>
    <filters>
      <filter>src/main/filters/${env}/filter_default.properties</filter>
    </filters>
    <resources>
      <resource>
        <directory>src/main/resources/common</directory>
        <filtering>true</filtering>
      </resource>
      <resource>
        <directory>src/main/resources/${env}</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
    <plugins>
       <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <configuration>
            <finalName>${project.build.finalName}-${env}</finalName>
            <descriptors>
               <descriptor>src/main/assembly/conf.xml</descriptor>
               <descriptor>src/main/assembly/bin.xml</descriptor>
            </descriptors>
          </configuration>
        </plugin>
    </plugins>
  </build>
</project>





Roland Kofler <[EMAIL PROTECTED]>
02/06/2006 09:05 AM
Please respond to "Maven Users List"

To: Maven Users List <users@maven.apache.org> cc: Subject: How to handle Property Files?


Hello,
I would like to have certain property files outside of my deployment JAR for quick configuration. I put them into src/main/config.
My questions are:

1. How to tell  to test goal to classpath these files
2. How can I deploy them along with the generated JAR? With UberJar or an install-Zip that contains a folder structure like /bin /lib /conf etc.?

Thank you very much!!

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




This communication is for informational purposes only. It is not intended
as an offer or solicitation for the purchase or sale of any financial
instrument or as an official confirmation of any transaction. All market prices,
data and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries and affiliates




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

Reply via email to