On my previous post I explained how painful it was to copy resources (files, librairies…) with Maven and the maven-resources-plugin. And guess what ? I received 2 emails from Maven lovers telling me that for this kind of task, Antrun would be more appropriate. So I thought I should give it a try to be fully honest with me, Maven, and God (you need a bit of faith when Maven is involved). So, keeping the same approach as explained on my previous post (use of a Maven profile, copying one datasource and one jar file…), here is what the pom.xml would look like with Antrun :
Ok, it’s only 28 lines of XML. Compare with the 52 on the previous post, it’s a shorter pom.xml. But I still find that incredibly verbose just to copy two files.
If you are around next week in Paris, Zenika and Skills Matter are organising a presentation of Gradle by Hans Dockter. I’ll be there !
3 thoughts on “Copying resources to JBoss with Maven (and Antrun)”
task ‘install’ => ‘jboss’ do
cp _(‘src/main/resources/lwr-ds.xml’), JBOSS_HOME/server/default/lib
cp repositories.locate(MYSQL), JBOSS_HOME/server/default/lib
The complete example with Gradle