Maven repository
AmauryCarrade opened this issue · 41 comments
This project don't have an automated Maven repository.
I used to manually (!) update a repository on my server, but it is pretty outdated.
Do you want to install a repository manager on your server, like Artifactory? Or to use my Artifactory instance? Or nothing, but without that it's hard to use the API.
Artifactory setup complete. Have a look: https://ci.pgmann.cf/maven/
What should I actually archive in artifactory? Just the .jar
or is the pom.xml
needed as well?
You should archive the .jar
and the associated .pom
. There is an Artifactory plugin for Jenkins to do that :) .
On the side: how did you removed the /artifactory/
from the URL? I want my repository URL to be maven.carrade.eu
, but it is maven.carrade.eu/artifactory
currently :c .
You rename the .war file (I installed tomcat first, then dropped
artifactory.war into /var/lib/tomcat8/webapps/). You can name it anything
(e.g. maven.war) Make sure you rename the other folder with the same name
in the webapps folder.
On Mon, 11 Jan 2016 10:09 pm Amaury Carrade [email protected]
wrote:
On the side: how did you removed the /artifactory/ from the URL? I want
my repository URL to be maven.carrade.eu, but it is
maven.carrade.eu/artifactory currently :c .—
Reply to this email directly or view it on GitHub
#62 (comment)
.
Oh yeah, and calling it ROOT.war and ROOT (delete old ROOT folder) will
make it have no path (removes the word artifactory)
On Tue, 12 Jan 2016 9:46 am Peter Gordon [email protected] wrote:
You rename the .war file (I installed tomcat first, then dropped
artifactory.war into /var/lib/tomcat8/webapps/). You can name it anything
(e.g. maven.war) Make sure you rename the other folder with the same name
in the webapps folder.On Mon, 11 Jan 2016 10:09 pm Amaury Carrade [email protected]
wrote:On the side: how did you removed the /artifactory/ from the URL? I want
my repository URL to be maven.carrade.eu, but it is
maven.carrade.eu/artifactory currently :c .—
Reply to this email directly or view it on GitHub
#62 (comment)
.
It's working on my side currently. I got a lot of warnings related to the HTTPS certificate, but it works well.
EDIT: it doesn't work on Jenkins, the server used a cached old version instead. You have certificate problems. It worked locally because I have SPlus B3.0 in my local repository.
The pom.xml
is now archived in artifactory as well. I have one problem - all the builds are put in the release repository instead of the snapshot one (where they should go). Any idea how to fix that?
Finally I can update my dependencies o/
I updated to use the LATEST
version.
Hmm... I see you have Java 1.8 installed on your server, but your Jenkins is using 1.7... it may be using a different, old keystore that doesn't have my cert's root in it...
You could try using this to debug it...
Not sure how you'd execute that command as jenkins though. Maybe in a Jenkins job pre-step?
Is this still not working @AmauryCarrade? I'm using the snapshot repository now since this commit: 3b230fe
I think this can finally be closed, if you can confirm it working with UHPlugin please @AmauryCarrade? Note the repo path has changed - see the README file for details.
Maven/Jenkins is still complaining about invalid certificates.
This is probably the cause of #64 as the build server is still using an old cached build, if the API changed. Except if this issue's author compiled UHPlugin locally. Nop.
Hmm... I see you have Java 1.8 installed on your server, but your Jenkins is using 1.7... it may be using a different, old keystore that doesn't have my cert's root in it...
Nop, the same file is used by both Java 7 and 8.
Please try querying your Java trust store for the root certificate used to sign my cert.
keytool -list -keystore /etc/ssl/certs/java/cacerts | grep dst
Enter keystore password: changeit
Expected output:
debian:dst_root_ca_x3.pem, 30-Nov-2015, trustedCertEntry,
debian:dst_aces_ca_x6.pem, 30-Nov-2015, trustedCertEntry,
debian:dst_root_ca_x3.pem, 8 sept. 2014, trustedCertEntry,
debian:dst_aces_ca_x6.pem, 8 sept. 2014, trustedCertEntry,
A bit old indeed. But I manually added your certificate to the store (following this), without success.
Found it. Jenkins uses it's own JRE, not the system-wide JRE 7. I linked the cacerts
file of this JRE to /etc/ssl/certs/java/cacerts
and now it (really) works.
Hang on, are you sure it's using the build from my maven repo?
[INFO] Building UHCReloaded 1.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Downloading: https://mvn.pgmann.cf/org/bukkit/bukkit/1.8.3-R0.1-SNAPSHOT/maven-metadata.xml
[INFO] Downloading: https://mvn.pgmann.cf/fr/zcraft/zlib/0.99-SNAPSHOT/maven-metadata.xml
[INFO] Downloading: https://mvn.pgmann.cf/com/pgcraft/SpectatorPlus/maven-metadata.xml
[INFO] Downloading: https://mvn.pgmann.cf/com/comphenix/protocol/ProtocolLib-Parent/v3-SNAPSHOT/maven-metadata.xml
[INFO] Downloading: https://mvn.pgmann.cf/com/comphenix/executors/BukkitExecutors/1.1-SNAPSHOT/maven-metadata.xml
[INFO] Downloading: https://mvn.pgmann.cf/org/mcstats/bukkit/metrics-lite/R8-SNAPSHOT/maven-metadata.xml
All these URLs return 404, including the actual one for SpectatorPlus. Maybe I should be using https://mvn.pgmann.cf/repository/maven-snapshots/...
instead? That returns the expected file.
I modified the build as mentioned in the commit above and it works locally, even when I delete the local repository or with the -U
flag. Waiting for the Jenkins build to finish...
Yep, this time it seems to be fine:
[INFO] Downloading: https://mvn.pgmann.cf/repository/maven-snapshots/com/pgcraft/SpectatorPlus/B3.0-SNAPSHOT/SpectatorPlus-B3.0-20160503.161555-5.pom
[INFO] Downloaded: https://mvn.pgmann.cf/repository/maven-snapshots/com/pgcraft/SpectatorPlus/B3.0-SNAPSHOT/SpectatorPlus-B3.0-20160503.161555-5.pom (4 KB at 37.5 KB/sec)
[INFO] Downloading: https://mvn.pgmann.cf/repository/maven-snapshots/com/pgcraft/SpectatorPlus/B3.0-SNAPSHOT/SpectatorPlus-B3.0-20160503.161555-5.jar
[INFO] Downloaded: https://mvn.pgmann.cf/repository/maven-snapshots/com/pgcraft/SpectatorPlus/B3.0-SNAPSHOT/SpectatorPlus-B3.0-20160503.161555-5.jar
But you broke the LATEST
version, I had to explicitly set it. It's not a problem this said.
I updated the README
and also added an API Usage section. Would you please update the line of code which is commented out to show the correct, non-deprecated usage? (Last line of code snippet in the file)
(@AmauryCarrade, please log in to my Jenkins and I can now give you access to build SpectatorPlus on demand - just need to make sure of the username!)
(Slightly off-topic)
@AmauryCarrade: Another change (sorry!). Remove /repository/maven-snapshots
from the URL to leave just https://mvn.pgmann.cf/
as the repo URL. This should be the last change necessary for a while, I hope!
[Technical details: Nexus was using ~1GB of RAM after running a while. So I'm using Jenkins as a Maven Repository Server now.]
@AmauryCarrade ping, see above.