# JavaDoc: how reference the src/main/java classes from src/test/java

**URL:** <https://discuss.gradle.org/t/javadoc-how-reference-the-src-main-java-classes-from-src-test-java/19564>\
**Category:** Help/Discuss\
**Created:** [September 15, 2016, 6:31pm UTC](https://discuss.gradle.org/t/javadoc-how-reference-the-src-main-java-classes-from-src-test-java/19564 "2016-09-15T18:31:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dr\_pompeii](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@dr\_pompeii](https://discuss.gradle.org/u/dr_pompeii)\
**Post date:** [September 15, 2016, 6:31pm UTC](https://discuss.gradle.org/t/javadoc-how-reference-the-src-main-java-classes-from-src-test-java/19564/1 "2016-09-15T18:31:50Z")

</div>

Hello Developers

I am working with Spring Framework in a _multi-module_ project

About JavaDoc I have the following:

```gradle
task masterMainJavadoc(type: Javadoc, group: "Documentation") {
    description = 'Generates a master javadoc from all the modules (main)'
    source exportedProjects.collect { project(it).sourceSets.main.allJava }    											  
    classpath = files(exportedProjects.collect { project(it).sourceSets.main.compileClasspath })
    options.memberLevel = JavadocMemberLevel.PRIVATE
    options.addStringOption("charset", "UTF-8")
    options.links 'http://docs.oracle.com/javase/8/docs/api/'
    options.links 'http://docs.oracle.com/javaee/7/api'
    ...
    destinationDir = file("${buildDir}/docs/javadoc/main")
}

```

I have practically the same for `Testing`

```gradle
task masterTestJavadoc(type: Javadoc, group: "Documentation") {
    description = 'Generates a master javadoc from all the modules (test)'
    source exportedProjects.collect { project(it).sourceSets.test.allJava }    											  
    classpath = files(exportedProjects.collect { project(it).sourceSets.test.compileClasspath})    				  
    options.memberLevel = JavadocMemberLevel.PRIVATE
    options.addStringOption("charset", "UTF-8")
    options.links 'http://docs.oracle.com/javase/8/docs/api/'
    options.links 'http://docs.oracle.com/javaee/7/api'
    ...
    destinationDir = file("${buildDir}/docs/javadoc/test")
}

```

Until here, I need work and generate two JavaDocs, one for main classes (all from `src/main/java`) and other for testing classes (all from `src/test/java`). With all the code shown above, it is possible.

The JavaDoc generated for testing works as expected but is generated in the following way, for example:

```gradle
public static com.manuel.jordan.domain.Persona crearPersona02()

```

I need

```gradle
public static Persona crearPersona02()

```

`Persona` is a class located in `src/main/java` and from the Javadoc I need do a click there and arrive to the `Persona` class

So what extra configuration I need to do to accomplish this requirement?

Thanks in advance.
