maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eyal edri <eyal.e...@gmail.com>
Subject best practice to include resources in the jar file and unpack them on target server
Date Thu, 21 Jan 2010 09:25:20 GMT
Hi,

i'v included resource files inside the jar file using the include tag:

<profile>
      <id>devel</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <configuration>
              <classesDirectory>src/main/resources</classesDirectory>
              <includes>
                <include>**/*</include>
              </includes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

# jar tf /usr/lib/ctch/java/IncreasePriority-jar/IncreasePriority.jar
META-INF/
META-INF/MANIFEST.MF
increase-priority.properties
increase-priority.cron
META-INF/maven/
META-INF/maven/com.url.unknowns/
META-INF/maven/com.url.unknowns/IncreasePriority/
META-INF/maven/com.url.unknowns/IncreasePriority/pom.xml
META-INF/maven/com.url.unknowns/IncreasePriority/pom.properties


what's the best way (via pom) to copy them to targetDirectories,
e.g *.cron to /etc/cron.d
     *.properties to /etc/${artifactId}/

thanks

-- 
Eyal Edri

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message