caelum / vraptor-time-converters

Apache License 2.0
0 stars 4 forks source link

disabling docLint breaks mvn install if jdk < 1.8 #5

Open tiagojco opened 10 years ago

tiagojco commented 10 years ago

doclint supression was added to ignore errors if JDK 1.8 is used. But if JDK < 1.8 it fails to build.

git clone & mvn clean install, and here is the output:

$ mvn clean install -pl=vraptor-jodatime/
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building vraptor-jodatime 4.0.0-RC3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ vraptor-jodatime ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ vraptor-jodatime ---
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ vraptor-jodatime ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ vraptor-jodatime ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to C:\Dev\tiago\github\vraptor-time-converters\vraptor-jodatime\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ vraptor-jodatime ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Dev\tiago\github\vraptor-time-converters\vraptor-jodatime\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ vraptor-jodatime ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 5 source files to C:\Dev\tiago\github\vraptor-time-converters\vraptor-jodatime\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ vraptor-jodatime ---
[INFO] Surefire report directory: C:\Dev\tiago\github\vraptor-time-converters\vraptor-jodatime\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running br.com.caelum.vraptor.converter.jodatime.DateTimeConverterTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.12 sec
Running br.com.caelum.vraptor.converter.jodatime.LocalDateConverterTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec
Running br.com.caelum.vraptor.converter.jodatime.LocalDateTimeConverterTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec
Running br.com.caelum.vraptor.converter.jodatime.LocalTimeConverterTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec

Results :

Tests run: 16, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) @ vraptor-jodatime ---
[INFO] Building jar: C:\Dev\tiago\github\vraptor-time-converters\vraptor-jodatime\target\vraptor-jodatime-4.0.0-RC3-SNAPSHOT.jar
[INFO]
[INFO] --- maven-javadoc-plugin:2.9.1:jar (attach-javadocs) @ vraptor-jodatime ---
[INFO]
usage: javadoc [options] [packagenames] [sourcefiles] [@files]
-overview <file>          Read overview documentation from HTML file
-public                   Show only public classes and members
-protected                Show protected/public classes and members (default)
-package                  Show package/protected/public classes and members
-private                  Show all classes and members
-help                     Display command line options and exit
-doclet <class>           Generate output via alternate doclet
-docletpath <path>        Specify where to find doclet class files
-sourcepath <pathlist>    Specify where to find source files
-classpath <pathlist>     Specify where to find user class files
-exclude <pkglist>        Specify a list of packages to exclude
-subpackages <subpkglist> Specify subpackages to recursively load
-breakiterator            Compute 1st sentence with BreakIterator
-bootclasspath <pathlist> Override location of class files loaded
                          by the bootstrap class loader
-source <release>         Provide source compatibility with specified release
-extdirs <dirlist>        Override location of installed extensions
-verbose                  Output messages about what Javadoc is doing
-locale <name>            Locale to be used, e.g. en_US or en_US_WIN
-encoding <name>          Source file encoding name
-quiet                    Do not display status messages
-J<flag>                  Pass <flag> directly to the runtime system
-X                        Print a synopsis of nonstandard options

Provided by Standard doclet:
-d <directory>                    Destination directory for output files
-use                              Create class and package usage pages
-version                          Include @version paragraphs
-author                           Include @author paragraphs
-docfilessubdirs                  Recursively copy doc-file subdirectories
-splitindex                       Split index into one file per letter
-windowtitle <text>               Browser window title for the documenation
-doctitle <html-code>             Include title for the overview page
-header <html-code>               Include header text for each page
-footer <html-code>               Include footer text for each page
-top    <html-code>               Include top text for each page
-bottom <html-code>               Include bottom text for each page
-link <url>                       Create links to javadoc output at <url>
-linkoffline <url> <url2>         Link to docs at <url> using package list at <url2>
-excludedocfilessubdir <name1>:.. Exclude any doc-files subdirectories with given name.
-group <name> <p1>:<p2>..         Group specified packages together in overview page
-nocomment                        Supress description and tags, generate only declarations.
-nodeprecated                     Do not include @deprecated information
-noqualifier <name1>:<name2>:...  Exclude the list of qualifiers from the output.
-nosince                          Do not include @since information
-notimestamp                      Do not include hidden time stamp
-nodeprecatedlist                 Do not generate deprecated list
-notree                           Do not generate class hierarchy
-noindex                          Do not generate index
-nohelp                           Do not generate help link
-nonavbar                         Do not generate navigation bar
-serialwarn                       Generate warning about @serial tag
-tag <name>:<locations>:<header>  Specify single argument custom tags
-taglet                           The fully qualified name of Taglet to register
-tagletpath                       The path to Taglets
-Xdocrootparent <url>             Replaces all appearances of @docRoot followed by /.. in doc comments with <url>
-charset <charset>                Charset for cross-platform viewing of generated documentation.
-helpfile <file>                  Include file that help link links to
-linksource                       Generate source in HTML
-sourcetab <tab length>           Specify the number of spaces each tab takes up in the source
-keywords                         Include HTML meta tags with package, class and member info
-stylesheetfile <path>            File to change style of the generated documentation
-docencoding <name>               Output encoding name
1 error
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.335s
[INFO] Finished at: Mon May 19 15:31:14 GMT-03:00 2014
[INFO] Final Memory: 16M/38M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.9.1:jar (attach-javadocs) on project vraptor-jodatime: MavenReportException: Error while creating archive:
[ERROR] Exit code: 1 - javadoc: error - invalid flag: -Xdoclint:none
[ERROR]
[ERROR] Command line was: "C:\Program Files (x86)\Java\jdk1.7.0_25\jre\..\bin\javadoc.exe" @options @packages
[ERROR]
[ERROR] Refer to the generated Javadoc files in 'C:\Dev\tiago\github\vraptor-time-converters\vraptor-jodatime\target\apidocs' dir.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Aparently the cause is (in vraptor-jodatime/pom.xml:111~113):

<configuration>
   <additionalparam>-Xdoclint:none</additionalparam>
</configuration>
tiagojco commented 10 years ago

http://stackoverflow.com/a/22296107/686304 sugestion seems promissing

garcia-jj commented 10 years ago

I think that we need to fix docs, instead of disable doclint. If we add doclint tag, breaks java 7 compilation, used by jodatime converter.

Connected with Motocast™

tiagojco commented 10 years ago

I agree with @garcia-jj.

I dont really know if there are errors in the docs which would break java 8 compilation, since i dont have it in my machine.

anyway, since i needed to install snapshot in my environment, i created a fork and fixed the compilation with jdk1.7: https://github.com/tiagojco/vraptor-time-converters/commit/0368fc2b848e98b612f63b8129d0f848c1525d96

Can create a PR if needed.

Turini commented 10 years ago

I dont really know if there are errors in the docs which would break java 8 compilation, since i dont have it in my machine.

I think there is no compilation errors on docs using docLint, since I'm using jdk 1.8 as default and I've successfully built it. Anyway, I agree about fix docs instead of break java 7 compilation