maven.xml 2.1 KB

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