Skip to content

Commit 751704e

Browse files
committed
Don't use groovy to generate javadoc
This adds a package-info.class file to the generated jar but it shouldn't be a problem This is because maven uses the jar as the input to the javadoc tool and we don't want to diverge too much from the maven way (you get problems really fast) (In theory, I guess we could generated the javadoc from target/classes instead of target/project.jar) The generated javadoc has one package with one class because: - It doesn't seem to be possible to generate an empty javadoc (no packages). - It doesn't seem to be possible to generate an empty package (no classes). references: * https://stackoverflow.com/questions/53706943/how-to-upload-an-artifact-to-maven-central-with-an-empty-javadoc-jar-or-empty-s => what we did in 1.0.0 and 1.0.1: totally empty javadoc.jar (valid for maven central upload but ugly) * https://stackoverflow.com/questions/59071851/how-to-force-a-javadoc-jar-even-though-there-is-no-public-javadoc => still produces a totally empty javadoc.jar (and big scary red errors) * https://stackoverflow.com/questions/1138390/javadoc-for-package-info-java-only => This plus excluding the class from the jar seems like the best solution for now ? promising but not yet ready: * https://issues.apache.org/jira/browse/MJAVADOC-329 apache/maven-javadoc-plugin#65 * https://bugs.openjdk.org/browse/JDK-8193107 https://hg.openjdk.org/jdk/jdk/rev/111104f1e033 empty modules are allowed, but does becoming a module work with how the native library are loaded ?? Signed-off-by: HARPER Jon <[email protected]>
1 parent 66459e6 commit 751704e

File tree

3 files changed

+11
-19
lines changed

3 files changed

+11
-19
lines changed

pom.xml

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<parent>
1414
<groupId>com.powsybl</groupId>
1515
<artifactId>powsybl-parent</artifactId>
16-
<version>3</version>
16+
<version>14</version>
1717
<relativePath/>
1818
</parent>
1919

@@ -46,13 +46,6 @@
4646
</developer>
4747
</developers>
4848

49-
<properties>
50-
<maven.build-helper.version>3.1.0</maven.build-helper.version>
51-
52-
<groovy.version>2.5.8</groovy.version>
53-
<groovydoc.classifier>javadoc</groovydoc.classifier>
54-
</properties>
55-
5649
<build>
5750
<plugins>
5851
<plugin>
@@ -64,17 +57,11 @@
6457
<Automatic-Module-Name>com.powsybl.mathnative</Automatic-Module-Name>
6558
</manifestEntries>
6659
</archive>
60+
<excludes>
61+
<exclude>com/powsybl/mathnative/MathNativeJavadocPlaceholder.class</exclude>
62+
</excludes>
6763
</configuration>
6864
</plugin>
69-
<plugin>
70-
<groupId>org.codehaus.gmavenplus</groupId>
71-
<artifactId>gmavenplus-plugin</artifactId>
72-
</plugin>
73-
<plugin>
74-
<groupId>org.codehaus.mojo</groupId>
75-
<artifactId>build-helper-maven-plugin</artifactId>
76-
<version>${maven.build-helper.version}</version>
77-
</plugin>
7865
</plugins>
7966
</build>
8067

@@ -89,10 +76,9 @@
8976
<plugin>
9077
<groupId>org.codehaus.mojo</groupId>
9178
<artifactId>build-helper-maven-plugin</artifactId>
92-
<version>${maven.build-helper.version}</version>
9379
<executions>
9480
<execution>
95-
<id>add-source</id>
81+
<id>add-cpp-source</id>
9682
<phase>generate-sources</phase>
9783
<goals>
9884
<goal>add-source</goal>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package com.powsybl.mathnative;
2+
3+
/** Placeholder needed by the javadoc tool to generate the javadoc site */
4+
public class MathNativeJavadocPlaceholder { private MathNativeJavadocPlaceholder() { } }
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/** Native library binaries for powsybl math operations */
2+
package com.powsybl.mathnative;

0 commit comments

Comments
 (0)