Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javadoc and Sources seem missing for the sdk's libraries #283

Closed
MeFisto94 opened this issue Sep 8, 2020 · 6 comments · Fixed by #378
Closed

Javadoc and Sources seem missing for the sdk's libraries #283

MeFisto94 opened this issue Sep 8, 2020 · 6 comments · Fixed by #378

Comments

@MeFisto94
Copy link
Member

I.e. when a user is doing a project, they only have the method signatures, but that's not feasible.

@MeFisto94
Copy link
Member Author

So I've did some more investigation, I actually spent a whole workday on this, but couldn't get any progress.
The problem comes from the subprojects not doing/having sources/javadoc artifacts, at least for javadoc, the specific property could be of use.

In order to reproduce, one needs to change the deps to like

def engineVersion = gradle.includedBuilds.find({i -> i.name == "jmonkeyengine"})
            .findResult({i -> i.availableModules.find({m -> m.right.projectName == "jme3-core"}).left.version})
corelibs dep("org.jmonkeyengine:jme3-core:$engineVersion", true, true)

or even more simple

corelibs dep("org.jmonkeyengine:jme3-core:null", true, true)

This will yield

> Could not resolve all files for configuration ':corelibs'.
   > Could not find jme3-core-javadoc.jar (project :jmonkeyengine:jme3-core).
   > Could not find jme3-core-sources.jar (project :jmonkeyengine:jme3-core).

Do note that this works for maven dependencies (engine or not), just not for the subproject.
It's also strange, because the artifact file does not include the version, in this case.
What I've seen from logs is, that when omitting the null or $engineVersion, javadoc is interpreted as version and uses the subproject one no matter what.

Does anyone have an idea, maybe @pspeed42 ?

@MeFisto94
Copy link
Member Author

Note: This also affects the ability to create an example/tests project, which is however something the engine should support without the SDK anyway

@stephengold
Copy link
Member

Ideally, the SDK would rely on official engine releases and not try to build its own engine JARs. That wasn't possible for v3.3, but it should be for v3.4.

The engine's v3.3.2-stable release lacked javadoc JARs and sources JARs for 2 of its 22 libraries: jme3-examples and jme3-testdata. Those omissions will be corrected in v3.4 of the engine. See jMonkeyEngine/jmonkeyengine#1366.

In addition, a few of the engine's v3.3.2-stable libraries included javadoc JARs and sources JARs but were not (at the time) linked to JCenter. Due to an oversight(?) official JARs for jme3-ios and jme3-vr could only be obtained from BinTray. Those omissions were corrected while resolving jMonkeyEngine/jmonkeyengine#1468. (I believe jme3-jbullet may also have been unlinked at one time.)

Sources JARs and javadoc JARs for all 17 libraries in engine v3.4 will be available from MavenCentral. I doubt Gradle will automatically download them with the class JARs and POMs, but they can surely be downloaded using custom Gradle tasks.

@neph1
Copy link
Contributor

neph1 commented Mar 28, 2022

I'm sure this has been discussed before, but why does the SDK have to build the engine by itself? It seems like it would reduce complexity severely if it could use regular releases.
If it can be done and is desirable, which steps need to be taken?

@stephengold
Copy link
Member

Now that all of the Engine's Maven artifacts are online at Maven Central Repository, I believe you just need to alter the buildscripts to download them instead of building them from source.

@nickidebruyn nickidebruyn unpinned this issue Aug 3, 2022
@tonihele
Copy link
Contributor

I'm sure this has been discussed before, but why does the SDK have to build the engine by itself? It seems like it would reduce complexity severely if it could use regular releases.
If it can be done and is desirable, which steps need to be taken?

The SDK actually doesn't build the engine by itself anymore. Gradle downloads the JARs from Maven Central. The sources and javadocs are available from there already and @MeFisto94 has made the build.gradle so that it can also download the these and actually creates the XML configuration for the ANT projects that reference these. That being said... something is still wrong with this and the newly created Ant projects wont actually show the sources/javadoc. For unknown reasons....

Note that currently the build.gradle doesn't fetch the sources/javadocs (one can simply fiddle with corelibs dep("org.jmonkeyengine:jme3-core:null", true, true) these lines). And downloading the sources actually messes up the jME Test project template, a bug in the build.gradle. The latter issue is quite easy to fix but since the situation is not improved anyway I didn't commit a fix to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants