Spring source import idea (Javadoc generation failed)

There are many tutorials of this kind on the internet, but it is difficult to say a word. There are still many problems in strictly following the tutorials. During this period, many methods were found online, and the final imported items were still reported as errors. Helplessly, I reinstalled a high version of idea(2019.2), downloaded spring 4.3.0, and finally imported it successfully.

1. I don't know whether it's the speed of the network or something else. It takes a long time for gradle to build successfully after it refreshes several times.

2. Be ecstatic after success, create the first demo - > debug - > read the source code - > add comments, success. Looking at the springIOC source code, I added a lot of comments.

public class MyTest {
	public static void main(String[] args) {
		ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:applicationContext.xml");

		LoginImpl loginService = (LoginImpl)applicationContext.getBean("loginService");
		System.out.println(loginService.nickName);
        System.out.println("Hello World Hello");
	}
}

3. Start writing the second demo to explore the loading process of web.xml. Result:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':spring-beans:javadoc'.
> Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): 'E:\myspring\spring-framework-4.3.10.RELEASE\spring-beans\build\tmp\javadoc\javadoc.options'

Feeling that the reason for the problem should be that the annotations I added are in Chinese, and Baidu started again. I found that there were not many such answers. See:

1.https://blog.csdn.net/wulong710/article/details/53930495

2.https://blog.csdn.net/u013279866/article/details/90231187

3.http://www.it1352.com/829972.html

Because of contacting gradle, the latter two did not understand how to do it. They tested the first scheme and found that it was the same as my own project configuration. After trying, they added options.encoding = "UTF-8" in the build.gradle file, and finally after reimport...

javadoc {
		description = "Generates project-level javadoc for use in -javadoc jar"

		options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
		options.author = true
		options.encoding = "UTF-8"
		options.header = project.name
		options.links(project.ext.javadocLinks)
		options.addStringOption('Xdoclint:none', '-quiet')

Problems arise after build:

 What went wrong:
Execution failed for task ':spring-oxm:genJaxb'.
> Could not resolve all files for configuration ':spring-oxm:xjc'.
   > Could not download jaxb-xjc.jar (com.sun.xml.bind:jaxb-xjc:2.1.17): No cached version available for offline mode

The literal meaning is that jaxb-xjc.jar was not downloaded, nor was it in the cache, but I looked for it, clearly there is:

It's a crash. I don't know whether it's a gradle problem or an idea problem.

Keywords: Spring Gradle xml encoding

Added by Wien on Fri, 16 Aug 2019 12:08:08 +0300