Est-il possible d'ajouter une tâche au fichier pom.xml qui créera un fichier tar.gz/.zip.
pour eample:Pom.xml - tâche tar
<tar type="tar.gz" source="resources/sql" tofile="target/sql.tar.gz"/>
Merci
Est-il possible d'ajouter une tâche au fichier pom.xml qui créera un fichier tar.gz/.zip.
pour eample:Pom.xml - tâche tar
<tar type="tar.gz" source="resources/sql" tofile="target/sql.tar.gz"/>
Merci
Utilisez les maven-assembly-plugin
Créer un src/main/montage/bin.xml comme détaillé à http://maven.apache.org/plugin-developers/cookbook/generate-assembly.html et http://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html#bin
Mettez vos ressources fichiers sql dans le includes
et donnez le format output
comme tar.gz
Ensuite, dans votre pom.xml mettre la référence à ce plugin
<project>
[...]
<build>
[...]
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-5</version>
<configuration>
<descriptors>
<descriptor>src/main/assembly/bin.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
http://maven.apache.org/plugins/maven-assembly-plugin/usage.html
dernier, appelez cela en utilisant
mvn package
probablement ce besoin d'être étiqueté avec "Maven" – Ither