maven.xml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. <!-- delete generic artifact (we only want our three custom WARs) -->
  25. <ant:delete file="${maven.war.build.dir}/${pom.artifactId}.war"/>
  26. </goal>
  27. <goal name="acegisecurity:war">
  28. <maven:set plugin="maven-war-plugin"
  29. property="maven.war.webapp.dir"
  30. value="${maven.war.build.dir}/${pom.artifactId}-${webapp}"/>
  31. <maven:set plugin="maven-war-plugin"
  32. property="maven.war.final.name"
  33. value="${pom.artifactId}-${webapp}.war"/>
  34. <attainGoal name="war:war"/>
  35. </goal>
  36. <goal name="multiwar:install">
  37. <attainGoal name="multiwar:multiwar"/>
  38. <echo>multiproject:install doesn't install Contacts Samples WARs to local repo</echo>
  39. </goal>
  40. <postGoal name="war:war-resources">
  41. <maven:get plugin="maven-war-plugin"
  42. property="maven.war.webapp.dir"
  43. var="maven.war.webapp.dir"/>
  44. <ant:copy todir="${maven.war.webapp.dir}" preservelastmodified="true">
  45. <ant:fileset dir="${maven.war.src}/../${webapp}"/>
  46. </ant:copy>
  47. </postGoal>
  48. <goal name="run" prereqs="java:compile,java:jar-resources">
  49. <ant:java dir="client" classname="sample.contact.ClientApplication" fork="true" >
  50. <ant:sysproperty key="username" value="${username}"/>
  51. <ant:sysproperty key="password" value="${password}"/>
  52. <ant:sysproperty key="nrOfCalls" value="${nrOfCalls}"/>
  53. <ant:classpath>
  54. <ant:path refid="maven.dependency.classpath"/>
  55. <ant:pathelement path="${maven.build.dest} "/>
  56. </ant:classpath>
  57. </ant:java>
  58. </goal>
  59. </project>