I am working on two things: The main project and its library.
I update the library regularly and use it in the main project.
My library gets released on Github and I get the release through https://jitpack.io.
Now I simply want to read the javadocs of my libraries dependecies, when I am using the library in my main project.
This is how the <build>
of my library looks like:
<build>
<finalName>${project.name}</finalName>
<defaultGoal>clean package</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<includeDependencySources>true</includeDependencySources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
As you can see from the code above, I tried adding:
<configuration>
<includeDependencySources>true</includeDependencySources>
</configuration>
so the library can include the javadocs of its dependencies. But that didn't work. I get the following error:
Could not find artifact com.github.Osiris-Team:Dream-Yaml:pom:4.1 in central (https://repo.maven.apache.org/maven2)
The POM for com.github.Osiris-Team:Dream-Yaml:jar:sources:4.1 is missing, no dependency information available
The error makes sense, because the Dream-Yaml
dependency (of the library) is also released via Github (jitpack.io).
Is there any fix for this, besides releasing all my stuff on maven?