how can I disable javadoc call when using MCC to build javabuilder app?
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
There is a legacy app that we are running for a customer that builds a matlab project into a jar. Our current build scripts have been working well but we are moving to a new jenkins server and the main mcc command now throws an error:
working/tmp/MYAPPLib/MYAPPLib/package-info.java:9: error: heading used out of sequence: <H3>, compared to implicit preceding heading: <H1>
* <h3><b>IMPORTANT: </b>What you need to use this package successfully:</h3>
1 error
2 warnings
The following command:
javadoc" -d "working/tmp/MYAPPLib/doc/html" -sourcepath "working/tmp/MYAPPLib" -classpath "/opt/matlab/R2021a/toolbox/javabuilder/jar/javabuilder.jar" MYAPPLib
failed with error code 1.
This may occur if Java is not installed, or incorrectly installed, or not on the system path,
or if the environment variable JAVA_HOME is set to an incorrect value.
I am running the following command (split into lines for clarity):
mcc -v
-W 'java:MYAPPLib,Class1'
-T link:lib
-d working/tmp/MYAPPLib/ class{Class1:main/main_MYAPP.m}
-a algoFun
-a algoFun/parameters.mat
-a classes
-a proj/JavaLibrary1/target/JavaLibrary1.jar
-a eqFun
-a ioFun
-a proj/JavaLibrary2/target/JavaLibrary2.jar
-a tools
-a truth
-a types
-a proj/JavaLibrary3/target/JavaLibrary3.jar
-a utilFun
We don't need the javadoc to be produced but I cannot find anything in the javabuilder or mcc documentation that mentions javadoc at all. How would I go about preventing mcc from running the javadoc command? As this is code generated during the mcc there is no way for me to edit the offending file and fix the javadoc.
Thanks.
0 Kommentare
Antworten (2)
Swastik Sarkar
am 28 Mai 2025
Bearbeitet: Swastik Sarkar
am 28 Mai 2025
Hi Jim,
I was also looking for an option to disable the generation of Javadocs during the mcc compilation process, but no such feature currently exists in MATLAB Compiler.
Due to this limitation, if an error occurs during compilation, MATLAB automatically removes any partially generated files, including Java files. This behavior can hinder workflows that rely on Java outputs.
As a workaround, the -K flag can be used with the mcc command. This flag prevents MATLAB from deleting intermediate files when a compilation error occurs, allowing those files to be accessed and used after the mcc step.
Further information on the -K flag can be found in the below MATLAB documentation:
Hope this helps clarify the issue.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Licensing on Cloud Platforms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!