Hi Thomas,

| Exit code: 2 - javadoc: error - No source files for package de.yagee.test

You do not have a folder "/project/src/test/java" with any test sources!

I set up an example here:
https://github.com/FIUS/jvk/pull/123/files

Please be aware that you still cannot create test javadocs nor javadoc
from dependency sources. As said, please kindly create two issues for
this.

Am Do., 29. Okt. 2020 um 08:10 Uhr schrieb Thomas Scheffler
<thomas.scheff...@uni-jena.de>:
>
> Hi Benjamin,
>
> you may have done something differently because „mvn test site“ does not work 
> here. Could you recheck or give me a hint, what I could have done wrong?
>
> kind regards,
>
> Thomas
>
> > Am 28.10.2020 um 20:05 schrieb Benjamin Marwell <bmarw...@apache.org>:
> >
> > Hi Thomas,
> >
> > no worry, that is as easy to fix as the previous one.
> >
> > Read carefully:
> >> Error generating maven-javadoc-plugin:3.2.0:test-aggregate-no-fork
> >
> > The javadoc-plugin executes "test-aggregate-no-fork".
> >
> > Which means: It creates javadoc for your TEST classes from src/test/java.
> > That again requires the "test" goal to be run first [1].
> >> Requires dependency resolution of artifacts in scope: test.
> >
> > I rarely found it useful to generate, validate and publish javadoc for
> > test classes.
> >
> > Long story short:
> > mvn test site # (test includes compile).
> >
> > Although imho, you will always want to execute "mvn verify" (or "mvn
> > clean verify") anyway, wouldn’t you? ;-)
> > This is considered a good habit by Robert Scholte iirc.
> >
> > If you need more information on the "why", don’t hesitate to ask! :)
> >
> > [1] 
> > https://maven.apache.org/plugins/maven-javadoc-plugin/test-aggregate-no-fork-mojo.html
> >
> > Am Mi., 28. Okt. 2020 um 14:45 Uhr schrieb Thomas Scheffler
> > <thomas.scheff...@uni-jena.de>:
> >>
> >> Hi,
> >>
> >> thanks for looking into it. I updated the project a bit so that you can 
> >> easily switch the version with „-Djavadoc.plugin.version=3.0.1“ to see it 
> >> working nice with „mvn site“ and „mvn javadoc:javadoc“. My problem is, 
> >> that I don’t know how to make „site“ run again. „mvn compile site“ will 
> >> prevent the errors for the main javadocs but will fail on test javadocs 
> >> (Junit tests):
> >>
> >> [ERROR] Failed to execute goal 
> >> org.apache.maven.plugins:maven-site-plugin:3.9.1:site (default-site) on 
> >> project test: Error generating 
> >> maven-javadoc-plugin:3.2.0:test-aggregate-no-fork report:
> >> [ERROR] Exit code: 2 - javadoc: error - No source files for package 
> >> de.yagee.test
> >> [ERROR]
> >> [ERROR] Command line was: /Users/yagee/Java/Home/14/bin/javadoc @options 
> >> @packages
> >> [ERROR]
> >> [ERROR] Refer to the generated Javadoc files in 
> >> '/Users/yagee/git/javadoc-test/target/site/testapidocs' dir.
> >> [ERROR] -> [Help 1]
> >>
> >> I can stick with 3.0.1 for a while, but of cause I want to move forward. I 
> >> set up the minimal project to get this figured out, but I lost.
> >>
> >> Looking at 
> >> https://maven.apache.org/plugins/maven-javadoc-plugin/usage.html, there is 
> >> even no hint on suddenly requiring „compile“ starting with version 1.1.0. 
> >> Still the site issue drives me nuts, too.
> >>
> >> Thanks again for helping me!
> >>
> >> kind regards,
> >>
> >> Thomas
> >>
> >> Am 27.10.2020 um 19:55 schrieb Benjamin Marwell <bmarw...@gmail.com>:
> >>
> >> Hi Thomas,
> >>
> >> I tested your configuration and found the same issue – however, it may
> >> not be an issue after all.
> >>
> >> You configured your javadoc plugin as part of the reporting section.
> >> This usually requires the compile goal.
> >>
> >> Even if you add the jar goal to the default build->plugin section, it
> >> will still require compile to be executed. This is expected and
> >> documented in [2]:
> >> "Requires dependency resolution of artifacts in scope: compile. &&
> >> Binds by default to the lifecycle phase: package."
> >>
> >> Same description for the javadoc:javadoc goal.
> >>
> >> "mvn package site" will work because "package" includes the "compile"
> >> goal from the default lifecycle.
> >>
> >> site (on its own) however is it's own lifecycle and goal and does not
> >> contain the default's lifecycle compile goal. See [1].
> >>
> >> Everything you reported works as expected. From what I can tell it
> >> shouldn’t have worked with other java versions and/or other javadoc
> >> plugin versions either.
> >>
> >> Does this help you? If not, maybe you might want to explain your
> >> execution idea instead. This will help us getting an idea of what you
> >> are trying to achieve.
> >>
> >> Best regards,
> >> Ben
> >>
> >> [1] 
> >> https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
> >> [2] https://maven.apache.org/plugins/maven-javadoc-plugin/jar-mojo.html
> >>
> >> Am Mo., 26. Okt. 2020 um 12:49 Uhr schrieb Thomas Scheffler
> >> <thomas.scheff...@uni-jena.de>:
> >>
> >>
> >> Hi,
> >>
> >> I have serious problems getting any maven-javadoc-plugin >= 3.1.0 to work 
> >> with simply Java 11 test case:
> >>
> >> Neither will „mvn javadoc:javadoc“ nor „mvn javadoc:jar“ nor „mvn site“ 
> >> work out-of-the-box. I have to add „compile“ in the middle to get the 
> >> javadoc-plugin work but this will not fix the site generation.
> >>
> >> What’s wrong with the pom.xml or with maven (using version 3.6.3)?
> >>
> >> I created a small test project on github: 
> >> https://github.com/yagee-de/javadoc-test
> >>
> >> The output I get is like:
> >>
> >> [ERROR] Failed to execute goal 
> >> org.apache.maven.plugins:maven-javadoc-plugin:3.2.0:jar (default-cli) on 
> >> project test: MavenReportException: Error while generating Javadoc:
> >> [ERROR] Exit code: 1 - error: module not found: de.yagee.test
> >> [ERROR]
> >> [ERROR] Command line was: /Users/yagee/Java/Home/11/bin/javadoc @options 
> >> @packages @argfile
> >> [ERROR]
> >> [ERROR] Refer to the generated Javadoc files in 
> >> '/Users/yagee/git/javadoc-test/target/apidocs' dir.
> >> [ERROR]
> >> [ERROR] -> [Help 1]
> >>
> >> Any help is highly appreciated!
> >>
> >> Kind regards,
> >>
> >> Thomas
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> >> For additional commands, e-mail: users-h...@maven.apache.org
> >>
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > For additional commands, e-mail: users-h...@maven.apache.org
> >
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to