Java3d on the Maven Central Repository

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Java3d on the Maven Central Repository

riccaricca68
Hi everyone,

I really appreciate the work that has been done on the Java3d library. I would like to ask if the jogamp organization could put their java3d artifacts and jogamp fat jar (or something equivalent) in the Maven Central Repository. I downloaded the java3d libraries from https://jogamp.org/deployment/java3d/. Version 1.7.1 works fine for me.

I hope for your reply. Thanks in advance,
Richard.

Reply | Threaded
Open this post in threaded view
|

Re: Java3d on the Maven Central Repository

philjord
Richard,
This is a rally great idea.

I got a long way towards this about 2 years ago, but somewhere between me and Sven the process stopped, I can't recall why, but I need to publish under org.jogamp so I need Sven to do something on I third party site to verify me or something (was it called sonique?)

I'll dig through my emails and see if I can get the process started again.

Thanks,
Phil.
Reply | Threaded
Open this post in threaded view
|

Re: Java3d on the Maven Central Repository

gouessej
Administrator
If you can't put it into Maven Central yet, we could put it into the JogAmp Maven development repository in the meantime as we do for JogAmp and soon for JogAmp's Ardor3D Continuation too:
https://jogamp.org/deployment/

If this solution pleases you, ask Sven to create a sub-directory named "maven-java3d" with the convenient rights.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3d on the Maven Central Repository

riccaricca68
Thank you Juilen, I don't care if the artifacts are in the Maven Central or in any other repository.
I've just sent a private message to the administrator Sven Gothel, I think you were referring to him.
Best regards,
Riccardo.
Reply | Threaded
Open this post in threaded view
|

Re: Java3d on the Maven Central Repository

gouessej
Administrator
Yes. Maybe my suggestion is not accurate enough. I suggest Phil to publish the snapshots and possibly the released versions into the JogAmp Maven development repository, doing the same on Maven Central only for released versions would be a second step. If and only Phil agrees with my suggestion, Sven will have to create a separate directory to store Java3D artifacts.

Ideally, other JogAmp projects should do something similar to ease the use of our APIs with Maven compatible tools including Maven itself, Gradle, Ant, etc. Moreover, storing third party dependencies into versioning systems isn't very smart, it drives the checkout uselessly slower.

Personally, I won't upload anything on Maven Central. Using our Maven repository as a first step has a lower barrier of entry (no subscription or administrative step required beyond creating a directory) even though some developers refuse to use dependencies not coming from Maven Central.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3d on the Maven Central Repository

Sven Gothel
Administrator
Julien, please email me what you want to have for the jogamp maven thing.
Will do these days.
Reply | Threaded
Open this post in threaded view
|

Re: Java3d on the Maven Central Repository

gouessej
Administrator
I'll simply use maven-ardor3d and Phil could use maven-java3d.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3d on the Maven Central Repository

gouessej
Administrator
In reply to this post by Sven Gothel
Now that I did what I wanted to for another engine, I can clarify what I meant.

The Maven artifacts will be uploaded here (the directory doesn't exist yet):
https://jogamp.org/deployment/maven-java3d/

Phil will have to run those command lines (more or less, needs to be adapted to a project not using Gradle):
gradle publishToMavenLocal
scp -r /home/philjord/.m2/repository/org/jogamp/java3d philjord@jogamp.org:/srv/www/jogamp.org/deployment/maven-java3d/org/jogamp/

Riccardo will have to add our Maven repository and the dependencies into his Gradle or Maven script, here is an example for Gradle:
repositories {
    mavenCentral()
    maven { url "https://jogamp.org/deployment/maven" }
    maven { url "https://jogamp.org/deployment/maven-java3d" }
    maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}

dependencies {
  implementation 'org.jogamp.gluegen:gluegen-rt-main:2.4.0'
  implementation 'org.jogamp.joal:joal-main:2.4.0'
  implementation 'org.jogamp.jogl:jogl-all-main:2.4.0'
  implementation 'org.jogamp.java3d:j3dcore:1.7-SNAPSHOT'
  implementation 'org.jogamp.java3d:j3dutils:1.7-SNAPSHOT'
  implementation 'org.jogamp.java3d:vecmath:1.7-SNAPSHOT'
}

For Maven:
<repositories>
          <repository>
            <id>jogamp-remote</id>
            <name>jogamp test mirror</name>
            <url>https://www.jogamp.org/deployment/maven/</url>
            <layout>default</layout>
          </repository>
          <repository>
            <id>jogamp-java3d-remote</id>
            <name>jogamp java3d test mirror</name>
            <url>https://www.jogamp.org/deployment/maven-java3d/</url>
            <layout>default</layout>
          </repository>
        </repositories>

...

            <dependency>
                <groupId>org.jogamp.gluegen</groupId>
                <artifactId>gluegen-rt-main</artifactId>
                <version>2.4.0</version>
            </dependency>
            <dependency>
                <groupId>org.jogamp.jogl</groupId>
                <artifactId>jogl-all-main</artifactId>
                <version>2.4.0</version>
            </dependency>
            <dependency>
                <groupId>org.jogamp.joal</groupId>
                <artifactId>joal-main</artifactId>
                <version>2.4.0</version>
            </dependency>
            <dependency>
                <groupId>org.jogamp.java3d</groupId>
                <artifactId>j3dcore</artifactId>
                <version>1.0-SNAPSHOT</version>
            </dependency>
            <dependency>
                <groupId>org.jogamp.java3d</groupId>
                <artifactId>j3dutils</artifactId>
                <version>1.0-SNAPSHOT</version>
            </dependency>
            <dependency>
                <groupId>org.jogamp.java3d</groupId>
                <artifactId>vecmath</artifactId>
                <version>1.0-SNAPSHOT</version>
            </dependency>

I hope that it helps.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3d on the Maven Central Repository

riccaricca68
Hi all,
any news about this topic? If I try to access https://jogamp.org/deployment/maven-java3d/, I get an error 404.
Thank you in advance, regards,
Riccardo.
Reply | Threaded
Open this post in threaded view
|

Re: Java3d on the Maven Central Repository

gouessej
Administrator
It's up to Phil and Sven right now, I just did my part of the job for JogAmp's Ardor3D Continuation. I'm sorry :s
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3d on the Maven Central Repository

Sven Gothel
Administrator
First of all, I will not work on pushing things into the maven maven repo,
but in case anybody is willing to handle the non-jogamp maven repo for any project,
please feel free to do so.
Hence, the below is for our jogamp maven repo ...

Today, I use jogamp-scripting's maven scripts to inject gluegen, joal, jogl and jocl into our maven repo.
https://jogamp.org/cgit/jogamp-scripting.git/tree/maven

Perhaps we can create the same for java3d?

Then - again - I am not a maven expert.
If there is a much better way maintaining our own maven repo than these scripts,
go ahead - show me - and I will also give you ssh access rights and ability to publish on jogamp.

Julien showed one easy way to sort of push a local maven cache to our jogamp maven repo
with Ardor3D .. if that is satisfactory for you, its good with me.

I gave both folders write access and ownership to the java3d group,
which Phil and Julien belong to:
deployment/java3d
deployment/maven-java3d

Up to the java3d folks to chose a maven strategy (the jogamp-scripting thingy or anything else).
Please tell me if you need anything else or whether I shall do something.

Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: Java3d on the Maven Central Repository

riccaricca68
Hi Sven,

thank you for your reply. What I'm asking is very simple: just put the maven artifacts of j3dcore.jar, vecmath.jar and j3dutils.jar version 1.7.1-build-20200222 on your destination https://www.jogamp.org/deployment/maven-java3d/, which is now present and accessible (albeit empty). The artifacts I'm interested in are the ones at https://jogamp.org/deployment/java3d/1.7.1-build-20200222/. To do a good job, it is important to produce the pom.xml files for these artifact. A rather simple way to do it, if you have SSH access to the target file system, is to use maven itself, by running the commands:

mvn deploy:deploy-file -Durl=scp://<host:port>/<path-to-java3d-repo>/ -Dfile=./j3dcore.jar -DgroupId=org.jogamp.java3d -DartifactId=j3dcore -Dversion=1.7.1-build-20200222 -DrepositoryId=maven-java3d

mvn deploy:deploy-file -Durl=scp://<host:port>/<path-to-java3d-repo>/ -Dfile=./j3dutils.jar -DgroupId=org.jogamp.java3d -DartifactId=j3dutils -Dversion=1.7.1-build-20200222 -DrepositoryId=maven-java3d

mvn deploy:deploy-file -Durl=cp://<host:port>/<path-to-java3d-repo>/ -Dfile=./vecmath.jar -DgroupId=org.jogamp.java3d -DartifactId=vecmath -Dversion=1.7.1-build-20200222 -DrepositoryId=maven-java3d

For these commands to work, you need two things:

1) Enter your SSH credentials in the maven settings.xml descriptor (which you can find or create in /<your user home>/.m2), like this:

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
   ...
   <servers>
    ...
      <server>
            <id>maven-java3d</id>
            <username>user</username>
            <password>pass</password>
        </server>
  </servers>
</settings>

2) To make maven use the SCP protocol, create a fake pom.xml file in the same folder you want to run the above commands from, like this:

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>fake</groupId>
  <artifactId>fake</artifactId>
  <version>0.0.0</version>
 
  <build>
        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh</artifactId>
                <version>3.5.3</version>
            </extension>
        </extensions>       
        </build>
</project>

If you HTTP server allows POST and PUT methods, instead of using SCP you can upload the artifacts using http / https protocols, which are natively supported by maven. In that case you don't need the fake pom.xml file.

Hope these hints will help you. Best regards,
Riccardo.





Reply | Threaded
Open this post in threaded view
|

Re: Java3d on the Maven Central Repository

gouessej
Administrator
In reply to this post by Sven Gothel
Thank you Sven. I'll see what I can do this week.

Phil, is it ok for you if I upload the latest stable build of Java3D into maven-java3d?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3d on the Maven Central Repository

philjord
Julien,
Yes I'm very keen to get it up there, I should have time to dedicate this coming weekend, sorry for the lack of response recently
Phil.
Reply | Threaded
Open this post in threaded view
|

Re: Java3d on the Maven Central Repository

gouessej
Administrator
I totally understand that each people has her/his own constraints, it's volunteer work after all, don't be sorry, it's ok. If you use "install" or "package" with Maven, you should obtain a similar result without using Gradle to publish your version locally before uploading it.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3d on the Maven Central Repository

Sven Gothel
Administrator
In reply to this post by philjord
thank you all ..

and Hi Phil,  great to read from you again!
Reply | Threaded
Open this post in threaded view
|

Re: Java3d on the Maven Central Repository

philjord
Julien,
Thanks for offering to copy the files up, I've managed to carefully follow the great instructions provided and got the jar and pom files deployed to
maven-java3d
Tomorrow I'll test a clean build to make sure they get pulled down correctly.

I notice you mention the repositories tag in maven, but you don't use it in any of the published pom files for ardor3d, where should that go?
Reply | Threaded
Open this post in threaded view
|

Re: Java3d on the Maven Central Repository

philjord
Opps, after a quick test I understand that the repositories tags are needed in a maven pom file, exactly as you stated.

My test maven pom looks like this:


 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>testmavenjava3d</groupId>
  <artifactId>testmavenjava3d</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <repositories>
          <repository>
            <id>jogamp-remote</id>
            <name>jogamp test mirror</name>
            <url>https://www.jogamp.org/deployment/maven/</url>
            <layout>default</layout>
          </repository>
          <repository>
            <id>jogamp-java3d-remote</id>
            <name>jogamp java3d test mirror</name>
            <url>https://www.jogamp.org/deployment/maven-java3d/</url>
            <layout>default</layout>
          </repository>
        </repositories>
  <dependencies>
    <dependency>
                <groupId>org.jogamp.gluegen</groupId>
                <artifactId>gluegen-rt-main</artifactId>
                <version>2.4.0</version>
            </dependency>
            <dependency>
                <groupId>org.jogamp.jogl</groupId>
                <artifactId>jogl-all-main</artifactId>
                <version>2.4.0</version>
            </dependency>
            <dependency>
                <groupId>org.jogamp.joal</groupId>
                <artifactId>joal-main</artifactId>
                <version>2.4.0</version>
            </dependency>
            <dependency>
                <groupId>org.jogamp.java3d</groupId>
                <artifactId>java3d-core</artifactId>
                <version>1.7.1</version>
            </dependency>
            <dependency>
                <groupId>org.jogamp.java3d</groupId>
                <artifactId>java3d-utils</artifactId>
                <version>1.7.1</version>
            </dependency>
            <dependency>
                <groupId>org.jogamp.java3d</groupId>
                <artifactId>vecmath</artifactId>
                <version>1.7.1</version>
            </dependency>
      </dependencies>
     
     
  <build>
    <sourceDirectory>src</sourceDirectory>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <configuration>
          <release>11</release>
        </configuration>
      </plugin>
    </plugins>   
  </build>       
</project>


and for gradle


repositories {
    mavenCentral()
    maven { url "https://jogamp.org/deployment/maven" }
    maven { url "https://jogamp.org/deployment/maven-java3d" }
    maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}

dependencies {
  implementation 'org.jogamp.gluegen:gluegen-rt-main:2.4.0'
  implementation 'org.jogamp.joal:joal-main:2.4.0'
  implementation 'org.jogamp.jogl:jogl-all-main:2.4.0'
  implementation 'org.jogamp.java3d:java3d-core:1.7.1'
  implementation 'org.jogamp.java3d:java3d-utils:1.7.1'
  implementation 'org.jogamp.java3d:vecmath:1.7.1'
}


and appears to work, allowing me to create a simple test java3d program with nothing in my .m2 directory.
Reply | Threaded
Open this post in threaded view
|

Re: Java3d on the Maven Central Repository

Sven Gothel
Administrator
Thank you Phil & Julien
Reply | Threaded
Open this post in threaded view
|

Re: Java3d on the Maven Central Repository

riccaricca68
Phil, Sven, Julien, thank you very much for your effort. It's now very easy to use Java3D in a complex maven project, without the need to manually download and install any dependences. Best regards, Riccardo.
12