maven.xml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <project
  2. xmlns:j="jelly:core"
  3. xmlns:ant="jelly:ant"
  4. xmlns:artifact="artifact"
  5. xmlns:maven="jelly:maven">
  6. <goal name="war">
  7. <echo>The "war" goal is deprecated. Use "multiwar:multiwar" instead.</echo>
  8. </goal>
  9. <goal name="multiwar:multiwar">
  10. <!-- needed otherwise first custom artifact (cas) doesn't get built) -->
  11. <attainGoal name="acegisecurity:war"/>
  12. <!-- cas war -->
  13. <j:set var="webapp" value="cas"/>
  14. <attainGoal name="acegisecurity:war"/>
  15. <!-- ca war -->
  16. <j:set var="webapp" value="ca"/>
  17. <attainGoal name="acegisecurity:war"/>
  18. <!-- filter war -->
  19. <j:set var="webapp" value="filter"/>
  20. <attainGoal name="acegisecurity:war"/>
  21. <!-- x509 war -->
  22. <j:set var="webapp" value="x509"/>
  23. <attainGoal name="acegisecurity:war"/>
  24. <!-- ldap war -->
  25. <j:set var="webapp" value="ldap"/>
  26. <attainGoal name="acegisecurity:war"/>
  27. <!-- delete generic artifact (we only want our three custom WARs) -->
  28. <ant:delete file="${maven.war.build.dir}/${pom.artifactId}.war"/>
  29. </goal>
  30. <goal name="acegisecurity:war">
  31. <maven:set plugin="maven-war-plugin"
  32. property="maven.war.webapp.dir"
  33. value="${maven.war.build.dir}/${pom.artifactId}-${webapp}"/>
  34. <maven:set plugin="maven-war-plugin"
  35. property="maven.war.final.name"
  36. value="${pom.artifactId}-${webapp}.war"/>
  37. <attainGoal name="war:war"/>
  38. </goal>
  39. <goal name="multiwar:install">
  40. <attainGoal name="multiwar:multiwar"/>
  41. <echo>multiproject:install doesn't install Contacts Samples WARs to local repo</echo>
  42. </goal>
  43. <postGoal name="war:war-resources">
  44. <maven:get plugin="maven-war-plugin"
  45. property="maven.war.webapp.dir"
  46. var="maven.war.webapp.dir"/>
  47. <ant:copy todir="${maven.war.webapp.dir}" preservelastmodified="true">
  48. <ant:fileset dir="${maven.war.src}/../${webapp}"/>
  49. </ant:copy>
  50. </postGoal>
  51. <goal name="run" prereqs="java:compile,java:jar-resources">
  52. <ant:java dir="client" classname="sample.contact.ClientApplication" fork="true" >
  53. <ant:sysproperty key="username" value="${username}"/>
  54. <ant:sysproperty key="password" value="${password}"/>
  55. <ant:sysproperty key="nrOfCalls" value="${nrOfCalls}"/>
  56. <ant:classpath>
  57. <ant:path refid="maven.dependency.classpath"/>
  58. <ant:pathelement path="${maven.build.dest} "/>
  59. </ant:classpath>
  60. </ant:java>
  61. </goal>
  62. </project>