maven.xml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <project
  2. xmlns:j="jelly:core"
  3. xmlns:ant="jelly:ant"
  4. xmlns:artifact="artifact"
  5. xmlns:maven="jelly:maven">
  6. <preGoal name="java:compile">
  7. <path id="additional.src.path">
  8. <pathelement location="../contacts/src/main/java"/>
  9. </path>
  10. <maven:addPath id="maven.compile.src.set" refid="additional.src.path"/>
  11. </preGoal>
  12. <goal name="war">
  13. <echo>The "war" goal is deprecated. Use "multiwar:multiwar" instead.</echo>
  14. </goal>
  15. <goal name="multiwar:multiwar">
  16. <!-- needed otherwise first custom artifact (cas) doesn't get built) -->
  17. <attainGoal name="acegisecurity:war"/>
  18. <!-- filter war -->
  19. <j:set var="webapp" value="filter"/>
  20. <attainGoal name="acegisecurity:war"/>
  21. <!-- delete generic artifact (we only want our three custom WARs) -->
  22. <ant:delete file="${maven.war.build.dir}/${pom.artifactId}.war"/>
  23. </goal>
  24. <goal name="acegisecurity:war">
  25. <maven:set plugin="maven-war-plugin"
  26. property="maven.war.webapp.dir"
  27. value="${maven.war.build.dir}/${pom.artifactId}-${webapp}"/>
  28. <maven:set plugin="maven-war-plugin"
  29. property="maven.war.final.name"
  30. value="${pom.artifactId}-${webapp}.war"/>
  31. <attainGoal name="war:war"/>
  32. </goal>
  33. <goal name="multiwar:install">
  34. <attainGoal name="multiwar:multiwar"/>
  35. <echo>multiproject:install doesn't install Contacts Samples WARs to local repo</echo>
  36. </goal>
  37. <postGoal name="war:war-resources">
  38. <maven:get plugin="maven-war-plugin"
  39. property="maven.war.webapp.dir"
  40. var="maven.war.webapp.dir"/>
  41. <ant:copy todir="${maven.war.webapp.dir}" preservelastmodified="true">
  42. <ant:fileset dir="${maven.war.src}/../${webapp}"/>
  43. </ant:copy>
  44. </postGoal>
  45. </project>