diff --git a/build.gradle b/build.gradle index c0aec489d9..f126adbbe7 100644 --- a/build.gradle +++ b/build.gradle @@ -43,6 +43,28 @@ configure(allprojects) { testCompile("org.hamcrest:hamcrest-all:1.3") testCompile("org.easymock:easymock:${easymockVersion}") } + + ext.javadocLinks = [ + "http://docs.oracle.com/javase/6/docs/api", + "http://docs.oracle.com/javaee/6/api", + "http://portals.apache.org/pluto/portlet-2.0-apidocs/", + "http://commons.apache.org/lang/api-2.5", + "http://commons.apache.org/codec/apidocs", + "http://docs.jboss.org/jbossas/javadoc/4.0.5/connector", + "http://docs.jboss.org/jbossas/javadoc/7.1.2.Final", + "http://aopalliance.sourceforge.net/doc", + "http://glassfish.java.net/nonav/docs/v3/api", + "http://docs.oracle.com/cd/E13222_01/wls/docs90/javadocs", // commonj + "http://quartz-scheduler.org/api/2.1.5", + "http://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/", + "http://hc.apache.org/httpclient-3.x/apidocs", + "http://fasterxml.github.com/jackson-core/javadoc/2.0.0", + "http://jackson.codehaus.org/1.4.2/javadoc", + "http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.javadoc.doc/web/apidocs", + "http://ibatis.apache.org/docs/java/dev", + "http://tiles.apache.org/framework/apidocs", + "http://commons.apache.org/dbcp/api-1.2.2", + ] as String[] } configure(subprojects) { subproject -> @@ -64,10 +86,17 @@ configure(subprojects) { subproject -> } javadoc { + description = "Generates project-level javadoc for use in -javadoc jar" + options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED options.author = true options.header = project.name - //options.overview = "${projectDir}/src/main/java/overview.html" + options.links(project.ext.javadocLinks) + + // suppress warnings due to cross-module @see and @link references; + // note that global 'api' task does display all warnings. + logging.captureStandardError LogLevel.INFO + logging.captureStandardOutput LogLevel.INFO // suppress "## warnings" message } task sourcesJar(type: Jar, dependsOn:classes) { @@ -641,6 +670,7 @@ project("spring-aspects") { provided("javax.persistence:persistence-api:1.0") testCompile("javax.mail:mail:1.4") ajc("org.aspectj:aspectjtools:${aspectjVersion}") + rt("org.aspectj:aspectjrt:${aspectjVersion}") compile("org.aspectj:aspectjweaver:${aspectjVersion}") testCompile(project(":spring-core")) // for CodeStyleAspect compile(project(":spring-beans")) // for "p" namespace visibility @@ -677,8 +707,6 @@ configure(rootProject) { configurations.archives.artifacts.clear() dependencies { // for integration tests - compile gradleApi() - groovy localGroovy() testCompile(project(":spring-core")) testCompile(project(":spring-beans")) testCompile(project(":spring-aop")) @@ -703,22 +731,30 @@ configure(rootProject) { group = "Documentation" description = "Generates aggregated Javadoc API documentation." title = "${rootProject.description} ${version} API" + options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED options.author = true options.header = rootProject.description options.overview = "src/api/overview.html" options.splitIndex = true - options.links( - "http://docs.jboss.org/jbossas/javadoc/4.0.5/connector" - ) + options.links(project.ext.javadocLinks) + source subprojects.collect { project -> project.sourceSets.main.allJava } - destinationDir = new File(buildDir, "api") - classpath = files(subprojects.collect { project -> - project.sourceSets.main.compileClasspath - }) + + classpath = files( + // ensure servlet 3.x and Hibernate 4.x have precedence on the Javadoc + // classpath over their respective 2.5 and 3.x variants + project(":spring-webmvc").sourceSets.main.compileClasspath.files.find { it =~ "servlet-api" }, + rootProject.sourceSets.test.compileClasspath.files.find { it =~ "hibernate-core" }, + // ensure the javadoc process can resolve types compiled from .aj sources + project(":spring-aspects").sourceSets.main.output + ) + classpath += files(subprojects.collect { it.sourceSets.main.compileClasspath }) + maxMemory = "1024m" + destinationDir = new File(buildDir, "api") } task docsZip(type: Zip) { diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectJProxyFactory.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectJProxyFactory.java index 047d1b4036..cbe06d3c27 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectJProxyFactory.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectJProxyFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009 the original author or authors. + * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -114,7 +114,7 @@ public class AspectJProxyFactory extends ProxyCreatorSupport { /** * Add all {@link Advisor Advisors} from the supplied {@link MetadataAwareAspectInstanceFactory} * to the current chain. Exposes any special purpose {@link Advisor Advisors} if needed. - * @see #makeAdvisorChainAspectJCapableIfNecessary() + * @see AspectJProxyUtils#makeAdvisorChainAspectJCapableIfNecessary(List) */ private void addAdvisorsFromAspectInstanceFactory(MetadataAwareAspectInstanceFactory instanceFactory) { List advisors = this.aspectFactory.getAdvisors(instanceFactory); diff --git a/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionAspectSupport.java b/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionAspectSupport.java index 332664f6f1..96237b86d1 100644 --- a/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionAspectSupport.java +++ b/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionAspectSupport.java @@ -33,7 +33,7 @@ import org.springframework.util.StringUtils; /** * Base class for asynchronous method execution aspects, such as * {@link org.springframework.scheduling.annotation.AnnotationAsyncExecutionInterceptor} - * or {@link org.springframework.scheduling.aspectj.AnnotationAsyncExecutionAspect}. + * or {@code org.springframework.scheduling.aspectj.AnnotationAsyncExecutionAspect}. * *

Provides support for executor qualification on a method-by-method basis. * {@code AsyncExecutionAspectSupport} objects must be constructed with a default {@code @@ -87,7 +87,7 @@ public abstract class AsyncExecutionAspectSupport implements BeanFactoryAware { /** * Determine the specific executor to use when executing the given method. - * @returns the executor to use (never {@code null}) + * @return the executor to use (never {@code null}) */ protected AsyncTaskExecutor determineAsyncExecutor(Method method) { if (!this.executors.containsKey(method)) { diff --git a/spring-aspects/aspects.gradle b/spring-aspects/aspects.gradle index 8351d5c73a..34cadf3538 100644 --- a/spring-aspects/aspects.gradle +++ b/spring-aspects/aspects.gradle @@ -2,6 +2,7 @@ // compile sources with ajc instead of javac configurations { + rt ajc aspects ajInpath @@ -26,7 +27,7 @@ task compileJava(overwrite: true) { aspectPath: configurations.aspects.asPath, inpath: configurations.ajInpath.asPath, sourceRootCopyFilter: "**/*.java", - classpath: sourceSets.main.runtimeClasspath.asPath) { + classpath: (sourceSets.main.runtimeClasspath + configurations.rt).asPath) { sourceroots { sourceSets.main.java.srcDirs.each { pathelement(location:it.absolutePath) @@ -55,7 +56,8 @@ task compileTestJava(overwrite: true) { destDir: outputDir.absolutePath, aspectPath: jar.archivePath, inpath: configurations.ajInpath.asPath, - classpath: sourceSets.test.runtimeClasspath.asPath + jar.archivePath) { + classpath: sourceSets.test.runtimeClasspath.asPath + jar.archivePath + + System.getProperty("path.separator") + configurations.rt.asPath) { sourceroots { sourceSets.test.java.srcDirs.each { pathelement(location:it.absolutePath) diff --git a/spring-aspects/src/main/java/org/springframework/context/annotation/aspectj/SpringConfiguredConfiguration.java b/spring-aspects/src/main/java/org/springframework/context/annotation/aspectj/SpringConfiguredConfiguration.java index 2471296f83..51347810dd 100644 --- a/spring-aspects/src/main/java/org/springframework/context/annotation/aspectj/SpringConfiguredConfiguration.java +++ b/spring-aspects/src/main/java/org/springframework/context/annotation/aspectj/SpringConfiguredConfiguration.java @@ -23,7 +23,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Role; /** - * {@code @Configuration} class that registers an {@link AnnotationBeanConfigurerAspect} + * {@code @Configuration} class that registers an {@code AnnotationBeanConfigurerAspect} * capable of performing dependency injection services for non-Spring managed objects * annotated with @{@link org.springframework.beans.factory.annotation.Configurable * Configurable}. diff --git a/spring-aspects/src/main/java/org/springframework/mock/staticmock/MockStaticEntityMethods.java b/spring-aspects/src/main/java/org/springframework/mock/staticmock/MockStaticEntityMethods.java index 1216c5f1e6..07aee0364a 100644 --- a/spring-aspects/src/main/java/org/springframework/mock/staticmock/MockStaticEntityMethods.java +++ b/spring-aspects/src/main/java/org/springframework/mock/staticmock/MockStaticEntityMethods.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2010 the original author or authors. + * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,10 +22,10 @@ import java.lang.annotation.Target; /** * Annotation to indicate a test class for whose @Test methods - * static methods on Entity classes should be mocked. + * static methods on Entity classes should be mocked. See + * {@code AbstractMethodMockingControl}. * * @author Rod Johnson - * @see AbstractMethodMockingControl */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.java index 3974171cee..442f541c50 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.java @@ -37,8 +37,8 @@ import org.springframework.util.StringValueResolver; * *

{@link PropertyPlaceholderConfigurer} is still appropriate for use when: *