building.html 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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 CVS </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 CVS, execute the following command on a
  33. single line:</p>
  34. <ol>
  35. <pre>maven scm:checkout-project
  36. -Dmaven.scm.method=cvs
  37. -Dmaven.scm.cvs.module=acegisecurity
  38. -Dmaven.scm.cvs.root=:pserver:anonymous@cvs.sourceforge.net:/cvsroot/acegisecurity
  39. -Dmaven.scm.checkout.dir=acegisecurity</pre>
  40. </ol>
  41. <h2>Quick Build</h2>
  42. <p>Often people reading this document just want to see if Acegi Security will work
  43. for their projects. They want to deploy a sample application, and that's about it
  44. (after all, all the reference documentation can be read online at
  45. <a href="http://acegisecurity.sourceforge.net">http://acegisecurity.sourceforge.net</a>).
  46. In this case, execute:</p>
  47. <ol>
  48. <pre>cd $ACEGI_SECURITY/core</pre>
  49. <pre>maven jar:install</pre>
  50. <pre>cd $ACEGI_SECURITY/samples/contacts</pre>
  51. <pre>maven war</pre>
  52. <pre>copy $ACEGI_SECURITY/samples/contacts/target/acegi-security-sample-contacts-filter.war $YOUR_CONTAINER/webapps</pre>
  53. </ol>
  54. <p>Then load up your web container and visit
  55. <a href="http://localhost:8080/acegi-security-sample-contacts-filter/">http://localhost:8080/acegi-security-sample-contacts-filter/</a>
  56. (or whatever location is appropriate for your web container).</p>
  57. <h2>Building All JARs</h2>
  58. <p>Sometimes people are already using Acegi Security, and they just want to build the
  59. latest code from CVS. To build all artifacts (JARs) and install them into
  60. your local Maven repository, simple execute:</p>
  61. <ol>
  62. <pre>cd $ACEGI_SECURITY/</pre>
  63. <pre>maven multiproject:install</pre>
  64. </ol>
  65. <p>You can then check your <code>$HOME/.maven/repository/acegisecurity</code>
  66. directory and it should contain all of the latest Acegi Security JARs.</p>
  67. <h2>Building The Site</h2>
  68. <p>By "site" we mean the web site you can browse at
  69. <a href="http://acegisecurity.sourceforge.net">http://acegisecurity.sourceforge.net</a>,
  70. which includes the reference documentation and all of the Maven reports.
  71. If you'd like a local copy, simply execute:
  72. <ol>
  73. <pre>cd $ACEGI_SECURITY/doc</pre>
  74. <pre>maven multiproject:clean multiproject:site
  75. -Dmaven.jar.override=on
  76. -Dmaven.jar.clover-ant=1.3.3_01
  77. -Dmaven.scm.cvs.root=:pserver:anonymous@cvs.sourceforge.net:/cvsroot/acegisecurity
  78. </pre>
  79. </ol>
  80. <p>If you're an Acegi Security developer, you can omit the
  81. <code>maven.scm.cvs.root</code> property, as your SourceForge login will be used
  82. along with CVS-over-SSH (see workaround discussion below if you have problems).</p>
  83. <h2>Memory and Clover Workarounds</h2>
  84. <p>If you get an <code>OutOfMemoryError</code>, simply execute the following before
  85. calling Maven:</p>
  86. <ol>
  87. <pre>set MAVEN_OPTS=-Xmx512m</pre>
  88. </ol>
  89. <p>If you get an <code>[ERROR] Invalid license: Invalid license file [E1202]</code>,
  90. this is because the <code>maven-clover-plugin</code> is using an old version of
  91. <code>clover-ant-xxx.jar</code>. Whilst Acegi Security's <code>project.properties</code>
  92. specifies a newer version, subprojects have an inheritence problem and don't pick
  93. this up (as of the time of writing). To workaround this issue, you need to
  94. specify those override properties on the command line. For example, to execute the
  95. Clover reports for the core subproject, you would do the following:</p>
  96. <ol>
  97. <pre>cd $ACEGI_SECURITY/core</pre>
  98. <pre>maven clover:html-report -Dmaven.jar.override=on -Dmaven.jar.clover-ant=1.3.3_01</pre>
  99. </ol>
  100. <h2>CVS-over-SSH Workarounds</h2>
  101. <p>Another possible problem is related to CVS-over-SSH ("ext" in CVSROOT) appearing to freeze.
  102. The following instructions assume you're an Acegi Security developer who has CVS access
  103. to the project, as if you're not then you shouldn't be trying to use CVS-over-SSH
  104. (the instructions above detail how to execute the "site" and "checkout" commands
  105. anonymously via "pserver").</p>
  106. <p>First check your
  107. <code>$ACEGI_SECURITY/build.properties</code> contains a
  108. <code>maven.username</code> equal to your SourceForge username. If your Maven CVS
  109. commands still don't work, test you have automatic CVS-over-SSH access operational
  110. by executing the following command:</p>
  111. <ol>
  112. <pre>cvs -d :ext:YOUR_SOURCEFORGE_USERNAME@cvs.sourceforge.net:/cvsroot/acegisecurity</pre>
  113. </ol>
  114. <p>If this CVS command doesn't work (without requiring any interaction such as password
  115. entry), you probably need to review your CVS setup.
  116. This will vary depending on your CVS client.</p>
  117. <p>One Windows-based command line CVS-over-SSH-with-auto-login combination that
  118. works very well is to install
  119. <a href="http://www.cvsnt.com/">CVSNT</a> (which has a CVS client console utility)
  120. and
  121. <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">PuTTY</a> (download
  122. <code>putty.zip</code>) together, and use
  123. PuTTY's Pageant to automatically authenticate. A resource that describes in detail
  124. how to configure WinCVS (which internally uses CVSNT's command line client) with PuTTY
  125. (including automatic SSH authentication) is
  126. <a href="http://sourceforge.net/docman/display_doc.php?docid=766&group_id=1">SourceForge's instructions</a>.
  127. One issue with the SourceForge instructions is they forget to mention how to
  128. tell the CVS command-line client to use <code>plink.exe</code>, which is PuTTY's SSH command-line
  129. version. The solution is to execute
  130. <code>set CVS_RSH=C:\Program Files\putty\plinkk.exe</code>
  131. (or whatever path is appropriate to plink) before running the CVS command line.
  132. In fairness, the SourceForge instructions target the Windows front-end to CVS, whilst
  133. we need the command-line version to work.</p>
  134. <p>If your CVS is working, try the <code>maven-changelog-plugin</code> on its
  135. own by executing the following command:</p>
  136. <ol>
  137. <pre>cd $ACEGI_SECURITY/</pre>
  138. <pre>maven maven-changelog-plugin:report</pre>
  139. </ol>
  140. </body>
  141. </html>