maven javadoc plugin error when used with modules Exit code: 1 - error: module not found: - module

I have a multi-module project that uses maven as its build system. I want to generate javadocs for the project. I do:
mvn -e javadoc:javadoc
When maven gets to the first module (Util) I get this:
Exit code: 1 - error: module not found: Util
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-javadoc-plugin:3.2.0:javadoc
(default-cli) on project Util: An error has occurred in Javadoc rep
ort generation: [ERROR] Exit code: 1 - error: module not found: Util
[ERROR] [ERROR] Command line was: cmd.exe /X /C
"C:\Users\Warren.jdks\adopt-openjdk-11.0.7\bin\javadoc.exe #options
#packages #argfile" [ERROR] [ERROR] Refer to the generated Javadoc
files in
'C:\Users\Warren\IdeaProjects\Javabot_TOS\Util\target\site\apidocs'
dir. [ERROR] [ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal
org.apache.maven.plugins:maven-javadoc-plugin:3.2.0:javadoc
(default-cli) on pr oject Util: An error has occurred in Javadoc
report generation: Exit code: 1 - error: module not found: Util
From the Util/target/site/apidocs dir:
argfile reads:
'C:/Users/Warren/IdeaProjects/Javabot_TOS/Util/src/main/java/module-info.java'
options reads:
--class-path 'C:/Program Files/Java/jdk1.8.0_92/lib/tools.jar;C:/Users/Warren/.m2/repository/org/apache/commons/commons-configuration2/2.7/commons-configuration2-2.7.jar;C:/Users/Warren/.m2/repository/org/codehaus/groovy/groovy/3.0.3/groovy-3.0.3.jar;C:/Users/Warren/.m2/repository/org/codehaus/groovy/groovy-ant/3.0.3/groovy-ant-3.0.3.jar;C:/Users/Warren/.m2/repository/org/apache/ant/ant-launcher/1.10.7/ant-launcher-1.10.7.jar;C:/Users/Warren/.m2/repository/org/codehaus/groovy/groovy-astbuilder/3.0.3/groovy-astbuilder-3.0.3.jar;C:/Users/Warren/.m2/repository/org/codehaus/groovy/groovy-cli-picocli/3.0.3/groovy-cli-picocli-3.0.3.jar;C:/Users/Warren/.m2/repository/org/codehaus/groovy/groovy-console/3.0.3/groovy-console-3.0.3.jar;C:/Users/Warren/.m2/repository/org/codehaus/groovy/groovy-datetime/3.0.3/groovy-datetime-3.0.3.jar;C:/Users/Warren/.m2/repository/org/codehaus/groovy/groovy-docgenerator/3.0.3/groovy-docgenerator-3.0.3.jar;C:/Users/Warren/.m2/repository/org/codehaus/groovy/groovy-groovydoc/3.0.3/groovy-groovydoc-3.0.3.jar;C:/Users/Warren/.m2/repository/com/github/javaparser/javaparser-core/3.15.17/javaparser-core-3.15.17.jar;C:/Users/Warren/.m2/repository/org/codehaus/groovy/groovy-groovysh/3.0.3/groovy-groovysh-3.0.3.jar;C:/Users/Warren/.m2/repository/org/codehaus/groovy/groovy-jmx/3.0.3/groovy-jmx-3.0.3.jar;C:/Users/Warren/.m2/repository/org/codehaus/groovy/groovy-json/3.0.3/groovy-json-3.0.3.jar;C:/Users/Warren/.m2/repository/org/codehaus/groovy/groovy-jsr223/3.0.3/groovy-jsr223-3.0.3.jar;C:/Users/Warren/.m2/repository/org/codehaus/groovy/groovy-macro/3.0.3/groovy-macro-3.0.3.jar;C:/Users/Warren/.m2/repository/org/codehaus/groovy/groovy-nio/3.0.3/groovy-nio-3.0.3.jar;C:/Users/Warren/.m2/repository/org/codehaus/groovy/groovy-servlet/3.0.3/groovy-servlet-3.0.3.jar;C:/Users/Warren/.m2/repository/org/codehaus/groovy/groovy-sql/3.0.3/groovy-sql-3.0.3.jar;C:/Users/Warren/.m2/repository/org/codehaus/groovy/groovy-swing/3.0.3/groovy-swing-3.0.3.jar;C:/Users/Warren/.m2/repository/org/codehaus/groovy/groovy-templates/3.0.3/groovy-templates-3.0.3.jar;C:/Users/Warren/.m2/repository/org/codehaus/groovy/groovy-test/3.0.3/groovy-test-3.0.3.jar;C:/Users/Warren/.m2/repository/org/codehaus/groovy/groovy-test-junit5/3.0.3/groovy-test-junit5-3.0.3.jar;C:/Users/Warren/.m2/repository/org/codehaus/groovy/groovy-testng/3.0.3/groovy-testng-3.0.3.jar;C:/Users/Warren/.m2/repository/org/codehaus/groovy/groovy-xml/3.0.3/groovy-xml-3.0.3.jar;C:/Users/Warren/.m2/repository/commons-beanutils/commons-beanutils/1.9.4/commons-beanutils-1.9.4.jar;C:/Users/Warren/.m2/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar;C:/Users/Warren/.m2/repository/org/beanshell/bsh/1.3.0/bsh-1.3.0.jar;C:/Users/Warren/.m2/repository/commons-codec/commons-codec/1.14/commons-codec-1.14.jar;C:/Users/Warren/.m2/repository/commons-io/commons-io/2.7/commons-io-2.7.jar;C:/Users/Warren/.m2/repository/org/apache/commons/commons-jexl3/3.1/commons-jexl3-3.1.jar;C:/Users/Warren/.m2/repository/commons-jxpath/commons-jxpath/1.3/commons-jxpath-1.3.jar;C:/Users/Warren/.m2/repository/org/apache/commons/commons-lang3/3.10/commons-lang3-3.10.jar;C:/Users/Warren/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar;C:/Users/Warren/.m2/repository/org/apache/commons/commons-text/1.8/commons-text-1.8.jar;C:/Users/Warren/.m2/repository/org/apache/commons/commons-vfs2/2.6.0/commons-vfs2-2.6.0.jar;C:/Users/Warren/.m2/repository/org/apache/hadoop/hadoop-hdfs-client/3.2.1/hadoop-hdfs-client-3.2.1.jar;C:/Users/Warren/.m2/repository/com/squareup/okhttp/okhttp/2.7.5/okhttp-2.7.5.jar;C:/Users/Warren/.m2/repository/com/squareup/okio/okio/1.6.0/okio-1.6.0.jar;C:/Users/Warren/.m2/repository/gnu-regexp/gnu-regexp/1.1.4/gnu-regexp-1.1.4.jar;C:/Users/Warren/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.11.0/jackson-databind-2.11.0.jar;C:/Users/Warren/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.11.0/jackson-annotations-2.11.0.jar;C:/Users/Warren/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.11.0/jackson-core-2.11.0.jar;C:/Users/Warren/.m2/repository/javax/servlet/javax.servlet-api/4.0.1/javax.servlet-api-4.0.1.jar;C:/Users/Warren/.m2/repository/org/yaml/snakeyaml/1.26/snakeyaml-1.26.jar;C:/Users/Warren/.m2/repository/org/springframework/spring-core/5.2.7.RELEASE/spring-core-5.2.7.RELEASE.jar;C:/Users/Warren/.m2/repository/org/springframework/spring-jcl/5.2.7.RELEASE/spring-jcl-5.2.7.RELEASE.jar;C:/Users/Warren/.m2/repository/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar;C:/Users/Warren/.m2/repository/com/sun/codemodel/codemodel/2.6/codemodel-2.6.jar;C:/Users/Warren/.m2/repository/com/sun/xml/fastinfoset/FastInfoset/1.2.18/FastInfoset-1.2.18.jar;C:/Users/Warren/.m2/repository/com/sun/xml/dtd-parser/dtd-parser/1.4.3/dtd-parser-1.4.3.jar;C:/Users/Warren/.m2/repository/com/sun/istack/istack-commons-runtime/3.0.11/istack-commons-runtime-3.0.11.jar;C:/Users/Warren/.m2/repository/com/sun/istack/istack-commons-tools/3.0.11/istack-commons-tools-3.0.11.jar;C:/Users/Warren/.m2/repository/javax/activation/javax.activation-api/1.2.0/javax.activation-api-1.2.0.jar;C:/Users/Warren/.m2/repository/javax/xml/bind/jaxb-api/2.3.1/jaxb-api-2.3.1.jar;C:/Users/Warren/.m2/repository/com/sun/xml/bind/jaxb-jxc/2.3.3/jaxb-jxc-2.3.3.jar;C:/Users/Warren/.m2/repository/com/sun/xml/bind/jaxb-xjc/2.3.3/jaxb-xjc-2.3.3.jar;C:/Users/Warren/.m2/repository/com/sun/xml/bind/jaxb-impl/2.3.3/jaxb-impl-2.3.3.jar;C:/Users/Warren/.m2/repository/jakarta/xml/bind/jakarta.xml.bind-api/2.3.3/jakarta.xml.bind-api-2.3.3.jar;C:/Users/Warren/.m2/repository/com/sun/xml/bind/external/relaxng-datatype/2.3.3/relaxng-datatype-2.3.3.jar;C:/Users/Warren/.m2/repository/com/sun/xml/bind/external/rngom/2.3.3/rngom-2.3.3.jar;C:/Users/Warren/.m2/repository/org/jvnet/staxex/stax-ex/1.8.3/stax-ex-1.8.3.jar;C:/Users/Warren/.m2/repository/com/sun/xml/txw2/txw2/20110809/txw2-20110809.jar;C:/Users/Warren/.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar;C:/Users/Warren/.m2/repository/relaxngDatatype/relaxngDatatype/20020414/relaxngDatatype-20020414.jar;C:/Users/Warren/.m2/repository/com/sun/xsom/xsom/20140925/xsom-20140925.jar;C:/Users/Warren/.m2/repository/org/apache/ant/ant/1.10.3/ant-1.10.3.jar;C:/Users/Warren/.m2/repository/junit/junit/4.12/junit-4.12.jar'
--patch-module Util='C:/Users/Warren/IdeaProjects/Javabot_TOS/Util/src/main/java'
-encoding 'UTF-8'
-protected
--release 11
--module-source-path 'C:/Users/Warren/IdeaProjects/Javabot_TOS/Util/target/site/apidocs/src'
-author
-bottom 'Copyright © 2020. All rights reserved.'
-charset 'UTF-8'
-d 'C:/Users/Warren/IdeaProjects/Javabot_TOS/Util/target/site/apidocs'
-docencoding 'UTF-8'
-doctitle 'Util 5.0-devel API'
-linkoffline 'https://docs.oracle.com/en/java/javase/11/docs/api' 'C:/Users/Warren/IdeaProjects/Javabot_TOS/Util/target/javadoc-bundle-options'
-use
-version
-windowtitle 'Util 5.0-devel API'
packages reads:
org.javabot.util
org.javabot.util
org.javabot.util
org.javabot.util
and javadoc.bat reads:
cmd.exe /X /C "C:\Users\Warren.jdks\adopt-openjdk-11.0.7\bin\javadoc.exe #options #packages #argfile"
The module-info.java file is located at Util/src/main/java
Can anyone shed any light on why it is not working?

To generate the JavaDoc for a Maven multi-module project, the aggregate goal(s) need to be used (eg. mvn javadoc:aggregate)
Note: As per documentation, since version 3.1.0, JavaDoc aggregation has changed: https://maven.apache.org/plugins/maven-javadoc-plugin/examples/aggregate.html

I have the same problem(s) already described within:
Java 11/12 Javadoc with maven results in not generating Javadocs for tests
So whats important are the following two points:
Use a new java version like 11.0.10 or above - no older versions!
Keep an eye at my bug report, because there seems to be a bug within maven-javadoc-plugin

Related

How to run a custom Karate project on VSCode [duplicate]

This question already has answers here:
Karate Runner -> karate jar : Command line args settings issue
(3 answers)
Closed 2 years ago.
I'm writing a test project on IntelliJ with custom Java libraries. Is it possible to run it through VSCode in order to use the debug features of the Karate plugin? If I try to run it I get the following error:
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
metadata.xml
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
(20 kB at 23 kB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
metadata.xml (14 kB at 15 kB/s)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.954 s
[INFO] Finished at: 2020-10-27T16:50:14+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix '.options=c' in the current project and in the plugin groups
[org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local
(C:\Users\asd\.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [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/NoPluginFoundForPrefixException
The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command mvn clean
test -f "c:\Users\asd\Documents\test-karate\com.testK\com.testK-karate\pom.xml" -
Dtest=_SyncRunner "-Dkarate.options=c:\Users\asd\Documents\test-karate\com.testK\com.testK-
karate\src\test\java\test.feature" "
terminated with exit code: 1.
The project is running correctly on IntelliJ.
From the command it is clear you are using Powershell. Please switch the VS Code "default shell" to cmd. You can find instructions here: https://github.com/intuit/karate/wiki/Karate-Robot-Windows-Install-Guide#install-visual-studio-code

Could not resolve dependencies for project org.apache.ignite:ignite-examples:jar:2.0.0

I am getting miss-jar file errors with .examples/pom.xml. Below is the error message. Anyone knows how to resolve this? Thanks a lot.
[ERROR] Failed to execute goal on project ignite-examples: Could not resolve dependencies for project org.apache.ignite:ignite-examples:jar:2.0.0: Failure to find org.apache.ignite:ignite-apache-license-gen:jar:2.0.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [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/DependencyResolutionException
Try to build project with -am option, -am builds projects that your project depends on

Error installing Oozie 4.2.0

While trying to execute mkdistro.sh getting the following error:
[ERROR]
[ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.apache.oozie:oozie-main:4.2.0: Could not transfer artifact org.apache:apache:pom:16 from/to central (http://repo1.maven.org/maven2): repo1.maven.org: unknown error and 'parent.relativePath' points at wrong local POM # line 22, column 13
#
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.apache.oozie:oozie-main:4.2.0 (/usr/local/Oozie_4.2.0_O/oozie-4.2.0/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for org.apache.oozie:oozie-main:4.2.0: Could not transfer artifact org.apache:apache:pom:16 from/to central (http://repo1.maven.org/maven2): repo1.maven.org: unknown error and 'parent.relativePath' points at wrong local POM # line 22, column 13: Unknown host repo1.maven.org: unknown error -> [Help 2]
[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:
System information:
Hadoop Version: 2.4.0
Maven Version: 3.3.9
Oozie: 4.2.0
How can I solve this error?

Unable to build ODL sdn controller code .?

I have downloaded the code using
git clone https://git.opendaylight.org/gerrit/p/integration/distribution.git
When I try to build this, it shows following error.
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.opendaylight.integration:root:0.5.0-SNAPSHOT: Could not find artifact org.opendaylight.odlparent:odlparent:pom:1.7.0-SNAPSHOT and 'parent.relativePath' points at no local POM # line 4, column 11
#
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.opendaylight.integration:root:0.5.0-SNAPSHOT (/home/controller/distribution/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for org.opendaylight.integration:root:0.5.0-SNAPSHOT: Could not find artifact org.opendaylight.odlparent:odlparent:pom:1.7.0-SNAPSHOT and 'parent.relativePath' points at no local POM # line 4, column 11 -> [Help 2]
[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/ProjectBuildingException
You need to make sure your settings.xml points to the OpenDaylight Nexus artifact repository. The simplest way to do this is to download https://raw.githubusercontent.com/opendaylight/odlparent/master/settings.xml and place it in your ~/.m2 folder (wherever that is — it depends on your operating system).
Yes, your settings.xml should be updated. An alternative way of updating (though same result as above):
Run this from your terminal:
cp -n ~/.m2/settings.xml{,.orig} ; \wget -q -O - https://raw.githubusercontent.com/opendaylight/odlparent/master/settings.xml > ~/.m2/settings.xml
As suggested by stephen, path may be different based on your OS. Change it accordingly.

How do i build apache Tez on hadoop 2.2.0

I am new to Apache Tez and Maven, I tried to install Apache Tez on my system. I used the following link to install ,
http://tez.apache.org/install.html
In that pom.xml present in the apache tez i have only changed hadoop and protobuf version equal to my environment which are following,
hadoop 2.2.0
libprotoc-2.4.1,
Tez-0.5.0
maven 3.0.5
java -1.7.0_65
While doing
“ mvn clean package -DskipTests=true -Dmaven.javadoc.skip=true “
i got the following error,
Error :
[ERROR] /home/karthick/work/apache-tez-0.5.0-src/tez-plugins/tez-yarn-timeline-history/src/main/java/org/apache/tez/dag/history/logging/ats/ATSHistoryLoggingService.java:[195,9] cannot find symbol
[ERROR] symbol: class TimelinePutError
[ERROR] location: class org.apache.tez.dag.history.logging.ats.ATSHistoryLoggingService
[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/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :tez-yarn-timeline-history
I have gone through that file ATSHistoryLoggingService.java present in the apache tez, but i couldn't understand what was happening there. I dont know how to clear History logging Service.So I have tried again as newly. That time also i got the same error. I dont know how to proceed my installation process.
Can anyone help me to solve this problem ?
Thanks in advance.
Check the BUILDING.txt file at the top of the source tree. It has a pointer for "Building against a specific version of hadoop". You are missing a "-P!hadoop24" in your maven command. Also, I believe you need protobuf-2.5.0.