building.xml 4.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <document><properties><title>Building</title></properties><body><section name="Building Acegi Security System"><subsection name="Checking Out from Subversion (SVN)"><p>This project uses <a href="http://maven.apache.org">Maven</a> as project manager
  3. and build tool. We recommend you to install Maven 1.0.2 or greater before trying
  4. the following. <b>Note there are workarounds at the bottom of this page.</b></p><p>To checkout Acegi Security from SVN, see our
  5. <a href="cvs-usage.html">CVS Usage</a> page.</p></subsection><subsection name="Quick Build"><p>Often people reading this document just want to see if Acegi Security will work
  6. for their projects. They want to deploy a sample application, and that's about it
  7. (after all, all the reference documentation can be read online at
  8. <a href="http://acegisecurity.org">http://acegisecurity.org</a>).
  9. In this case, execute:</p><ol>
  10. <pre>cd $ACEGI_SECURITY/core (or cd %ACEGI_SECURITY%/core on Windows)</pre>
  11. <pre>maven jar:install</pre>
  12. <pre>cd $ACEGI_SECURITY/samples/contacts</pre>
  13. <pre>maven multiwar:multiwar</pre>
  14. <pre>copy $ACEGI_SECURITY/samples/contacts/target/acegi-security-sample-contacts-filter.war $YOUR_CONTAINER/webapps</pre>
  15. </ol><p>Then load up your web container and visit
  16. <a href="http://localhost:8080/acegi-security-sample-contacts-filter/">http://localhost:8080/acegi-security-sample-contacts-filter/</a>
  17. (or whatever location is appropriate for your web container).</p></subsection><subsection name="Installing commons-attributes-plugin"><p>To properly integrate Commons Attributes with Maven (as required by
  18. the <a href="/multiproject/acegi-security-sample-attributes/index.html">Attributes Sample</a>),
  19. you need to install an additional plugin.</p><p>To install the <code>commons-attributes-plugin</code>, execute the following commands:</p><ol>
  20. <pre>cd $ACEGI_SECURITY/doc</pre>
  21. <pre>maven plugin:download
  22. -DgroupId=commons-attributes
  23. -DartifactId=commons-attributes-plugin
  24. -Dversion=2.1</pre>
  25. </ol><p>The second (final) command should be executed on a single line.</p></subsection><subsection name="Building All JARs"><p>Sometimes people are already using Acegi Security, and they just want to build the
  26. latest code from CVS. To build all artifacts (JARs) and install them into
  27. your local Maven repository, simply perform a CVS checkout and install the
  28. <code>commons-attributes-plugin</code> (as detailed above), and then
  29. execute:</p><ol>
  30. <pre>cd $ACEGI_SECURITY/doc</pre>
  31. <pre>maven multiproject:install</pre>
  32. </ol><p>You can then check your <code>$HOME/.maven/repository/acegisecurity</code>
  33. directory and it should contain all of the latest Acegi Security JARs.</p></subsection><subsection name="Building The Site"><p>By "site" we mean the web site you can browse at
  34. <a href="http://acegisecurity.sourceforge.net">http://acegisecurity.sourceforge.net</a>,
  35. which includes the reference documentation and all of the Maven reports.
  36. If you'd like a local copy, simply execute:
  37. <ol>
  38. <pre>cd $ACEGI_SECURITY/doc</pre>
  39. <pre>maven -Dpassword= changelog:create-cvspass</pre>
  40. <pre>maven multiproject:clean multiproject:site
  41. -Dmaven.jar.override=on
  42. -Dmaven.jar.clover-ant=1.3.3_01
  43. </pre>
  44. </ol>
  45. </p><p>As per the
  46. <a href="http://maven.apache.org/reference/plugins/changelog/">Maven Changelog Plugin Documentation</a>,
  47. you must tell the plugin the "anonymous CVS pserver" password is blank. This is
  48. why there is the "create-cvspass" command shown above. You should only need to
  49. do this once.</p></subsection><subsection name="Memory and Clover Workarounds"><p>If you get an <code>OutOfMemoryError</code>, simply execute the following before
  50. calling Maven:</p><ol>
  51. <pre>set MAVEN_OPTS=-Xmx1024m -XX:MaxPermSize=512m</pre>
  52. </ol><p>If you get an <code>[ERROR] Invalid license: Invalid license file [E1202]</code>,
  53. this is because the <code>maven-clover-plugin</code> is using an old version of
  54. <code>clover-ant-xxx.jar</code>. Whilst Acegi Security's <code>project.properties</code>
  55. specifies a newer version, subprojects have an inheritence problem and don't pick
  56. this up (as of the time of writing). To workaround this issue, you need to
  57. specify those override properties on the command line. For example, to execute the
  58. Clover reports for the core subproject, you would do the following:</p><ol>
  59. <pre>cd $ACEGI_SECURITY/core</pre>
  60. <pre>maven clover:html-report -Dmaven.jar.override=on -Dmaven.jar.clover-ant=1.3.3_01</pre>
  61. </ol></subsection></section></body></document>