maven.xml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. <!-- 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. <goal name="run" prereqs="java:compile,java:jar-resources">
  46. <ant:java dir="client" classname="sample.contact.ClientApplication" fork="true" >
  47. <ant:sysproperty key="username" value="${username}"/>
  48. <ant:sysproperty key="password" value="${password}"/>
  49. <ant:sysproperty key="nrOfCalls" value="${nrOfCalls}"/>
  50. <ant:classpath>
  51. <ant:path refid="maven.dependency.classpath"/>
  52. <ant:pathelement path="${maven.build.dest} "/>
  53. </ant:classpath>
  54. </ant:java>
  55. </goal>
  56. </project>