building.html 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <!--
  2. * ========================================================================
  3. *
  4. * Copyright 2004 Acegi Technology Pty Limited
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the "License");
  7. * you may not use this file except in compliance with the License.
  8. * You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. *
  18. * ========================================================================
  19. -->
  20. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  21. <html xmlns="http://www.w3.org/1999/xhtml">
  22. <head>
  23. <title>Building</title>
  24. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  25. </head>
  26. <body>
  27. <h1>Building Acegi Security System</h1>
  28. <h2>Checking Out from Subversion (SVN)</h2>
  29. <p>This project uses <a href="http://maven.apache.org">Maven</a> as project manager
  30. and build tool. We recommend you to install Maven 1.0.2 or greater before trying
  31. the following. <b>Note there are workarounds at the bottom of this page.</b></p>
  32. <p>To checkout Acegi Security from SVN, see our
  33. <a href="cvs-usage.html">CVS Usage</a> page.</p>
  34. <h2>Quick Build</h2>
  35. <p>Often people reading this document just want to see if Acegi Security will work
  36. for their projects. They want to deploy a sample application, and that's about it
  37. (after all, all the reference documentation can be read online at
  38. <a href="http://acegisecurity.org">http://acegisecurity.org</a>).
  39. In this case, execute:</p>
  40. <ol>
  41. <pre>cd $ACEGI_SECURITY/core (or cd %ACEGI_SECURITY%/core on Windows)</pre>
  42. <pre>maven jar:install</pre>
  43. <pre>cd $ACEGI_SECURITY/samples/contacts</pre>
  44. <pre>maven multiwar:multiwar</pre>
  45. <pre>copy $ACEGI_SECURITY/samples/contacts/target/acegi-security-sample-contacts-filter.war $YOUR_CONTAINER/webapps</pre>
  46. </ol>
  47. <p>Then load up your web container and visit
  48. <a href="http://localhost:8080/acegi-security-sample-contacts-filter/">http://localhost:8080/acegi-security-sample-contacts-filter/</a>
  49. (or whatever location is appropriate for your web container).</p>
  50. <h2>Installing commons-attributes-plugin</h2>
  51. <p>To properly integrate Commons Attributes with Maven (as required by
  52. the <a href="/multiproject/acegi-security-sample-attributes/index.html">Attributes Sample</a>),
  53. you need to install an additional plugin.</b></p>
  54. <p>To install the <code>commons-attributes-plugin</code>, execute the following commands:</p>
  55. <ol>
  56. <pre>cd $ACEGI_SECURITY/doc</pre>
  57. <pre>maven plugin:download
  58. -DgroupId=commons-attributes
  59. -DartifactId=commons-attributes-plugin
  60. -Dversion=2.1</pre>
  61. </ol>
  62. <p>The second (final) command should be executed on a single line.</p>
  63. <h2>Building All JARs</h2>
  64. <p>Sometimes people are already using Acegi Security, and they just want to build the
  65. latest code from CVS. To build all artifacts (JARs) and install them into
  66. your local Maven repository, simply perform a CVS checkout and install the
  67. <code>commons-attributes-plugin</code> (as detailed above), and then
  68. execute:</p>
  69. <ol>
  70. <pre>cd $ACEGI_SECURITY/doc</pre>
  71. <pre>maven multiproject:install</pre>
  72. </ol>
  73. <p>You can then check your <code>$HOME/.maven/repository/acegisecurity</code>
  74. directory and it should contain all of the latest Acegi Security JARs.</p>
  75. <h2>Building The Site</h2>
  76. <p>By "site" we mean the web site you can browse at
  77. <a href="http://acegisecurity.sourceforge.net">http://acegisecurity.sourceforge.net</a>,
  78. which includes the reference documentation and all of the Maven reports.
  79. If you'd like a local copy, simply execute:
  80. <ol>
  81. <pre>cd $ACEGI_SECURITY/doc</pre>
  82. <pre>maven -Dpassword= changelog:create-cvspass</pre>
  83. <pre>maven multiproject:clean multiproject:site
  84. -Dmaven.jar.override=on
  85. -Dmaven.jar.clover-ant=1.3.3_01
  86. </pre>
  87. </ol>
  88. <p>As per the
  89. <a href="http://maven.apache.org/reference/plugins/changelog/">Maven Changelog Plugin Documentation</a>,
  90. you must tell the plugin the "anonymous CVS pserver" password is blank. This is
  91. why there is the "create-cvspass" command shown above. You should only need to
  92. do this once.</p>
  93. <h2>Memory and Clover Workarounds</h2>
  94. <p>If you get an <code>OutOfMemoryError</code>, simply execute the following before
  95. calling Maven:</p>
  96. <ol>
  97. <pre>set MAVEN_OPTS=-Xmx1024m -XX:MaxPermSize=512m</pre>
  98. </ol>
  99. <p>If you get an <code>[ERROR] Invalid license: Invalid license file [E1202]</code>,
  100. this is because the <code>maven-clover-plugin</code> is using an old version of
  101. <code>clover-ant-xxx.jar</code>. Whilst Acegi Security's <code>project.properties</code>
  102. specifies a newer version, subprojects have an inheritence problem and don't pick
  103. this up (as of the time of writing). To workaround this issue, you need to
  104. specify those override properties on the command line. For example, to execute the
  105. Clover reports for the core subproject, you would do the following:</p>
  106. <ol>
  107. <pre>cd $ACEGI_SECURITY/core</pre>
  108. <pre>maven clover:html-report -Dmaven.jar.override=on -Dmaven.jar.clover-ant=1.3.3_01</pre>
  109. </ol>
  110. </body>
  111. </html>