bd2kccd / causal-cmd

16 stars 8 forks source link

Maven's package build fails since javadocExecutable is written for unix's java executables #91

Closed yasu-sh closed 1 year ago

yasu-sh commented 1 year ago

I guess the description of pom.xml can be improved.

Current pom setting

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.4.1</version>
                <configuration>
                    <javadocExecutable>/usr/bin/javadoc</javadocExecutable>
                    <!--<show>private</show>-->
                    <nohelp>true</nohelp>
                </configuration>

Worked code at windows

                <configuration>
                    <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>

This is effective pom the setting above <javadocExecutable>C:/Program Files/Eclipse Adoptium/jdk-11.0.18.10-hotspot/bin/javadoc</javadocExecutable>

This is error when running at windows

[INFO] --- maven-javadoc-plugin:3.4.1:jar (attach-javadocs) @ causal-cmd ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  8.065 s
[INFO] Finished at: 2023-03-15T09:19:39+09:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.4.1:jar (attach-javadocs) on project causal-cmd: MavenReportException: Error while generating Javadoc: Unable to find javadoc command: The javadoc executable '\usr\bin\javadoc.exe' doesn't exist or is not a file. Verify the <javadocExecutable/> parameter. -> [Help 1]
[ERROR] 
jdramsey commented 1 year ago

Oh good point! I'll have to see if there's a better way to do that.

yasu-sh commented 1 year ago

@jdramsey Thanks! I just would have made pull request. I agree you consider on that after checking at other OSs or CI.

yasu-sh commented 1 year ago

This issue closed the reason as #92 since javadoc setting is normally configured by developers for their environment.