Kaynağa Gözat

Make aspectj dependencies optional throughout and spring-jdbc/tx optional in core poms. Reduces exclusions required in third-party poms (e.g. spring-social).

Luke Taylor 14 yıl önce
ebeveyn
işleme
ecfffaaa3f

+ 14 - 11
docs/manual/src/docbook/appendix-dependencies.xml

@@ -11,10 +11,13 @@
         dependenices that are only used when building or testing Spring Security itself. Nor do we include
         transitive dependencies which are required by external dependencies.
     </para>
-    <para>The version of Spring required is listed on the project website, so the specific versions are omitted
-        for Spring dependencies below. Note that some of the dependencies listed as <quote>optional</quote>
-        below may still be required for other non-security functionality in a Spring application.
-    </para>
+    <para>The version of Spring required is listed on the project website, so the specific versions
+        are omitted for Spring dependencies below. Note that some of the dependencies listed as
+        <quote>optional</quote> below may still be required for other non-security functionality in
+        a Spring application. Also dependencies listed as <quote>optional</quote> may not actually be marked
+        as such in the project's Maven pom files if they are used in most applications. They are
+        <quote>optional</quote> only in the sense that you don't need them unless you are using the
+        specified functionality.</para>
     <para>Where a module depends on another Spring Security module, the non-optional dependencies of the
         module it depends on are also assumed to be required and are not listed separately.
     </para>
@@ -58,7 +61,7 @@
                         <row>
                             <entry>spring-expression</entry>
                             <entry></entry>
-                            <entry><para>Required for expression-based method security</para></entry>
+                            <entry><para>Required for expression-based method security (optional)</para></entry>
                         </row>
                         <row>
                             <entry>spring-jdbc</entry>
@@ -70,11 +73,6 @@
                             <entry></entry>
                             <entry><para>Required if using a database to store user data (optional).</para></entry>
                         </row>
-                        <row>
-                            <entry>spring-web</entry>
-                            <entry></entry>
-                            <entry><para>Required for clients which use HTTP remoting support (optional).</para></entry>
-                        </row>
                         <row>
                             <entry>aspectjrt</entry>
                             <entry>1.6.10</entry>
@@ -114,6 +112,11 @@
                             <entry></entry>
                             <entry></entry>
                         </row>
+                        <row>
+                            <entry>spring-web</entry>
+                            <entry></entry>
+                            <entry><para>Required for clients which use HTTP remoting support.</para></entry>
+                        </row>
                     </tbody>
                 </tgroup>
             </table>
@@ -450,4 +453,4 @@
             </table>
         </para>
     </section>
-</appendix>
+</appendix>

+ 6 - 1
gradle/maven-deployment.gradle

@@ -60,7 +60,7 @@ install {
 }
 
 def customizePom(pom) {
-    def optionalDeps = ['ehcache', 'log4j', 'apacheds-core', 'jsp-api', 'jsr250-api', 'ldapsdk']
+    def optionalDeps = ['ehcache', 'log4j', 'apacheds-core', 'jsp-api', 'jsr250-api', 'ldapsdk', 'aspectjrt', 'aspectjweaver']
 
     pom.scopeMappings.addMapping(10, configurations.provided, 'provided')
     pom.whenConfigured { p ->
@@ -79,6 +79,11 @@ def customizePom(pom) {
             p.dependencies.find { dep -> dep.artifactId == 'spring-security-web'}.optional = true
             p.dependencies.find { dep -> dep.artifactId == 'spring-web'}.optional = true
         }
+
+        if (p.artifactId == 'spring-security-core') {
+            p.dependencies.find { dep -> dep.artifactId == 'spring-jdbc'}.optional = true
+            p.dependencies.find { dep -> dep.artifactId == 'spring-tx'}.optional = true
+        }
     }
 
     pom.project {