cjlin1 / libsvm

LIBSVM -- A Library for Support Vector Machines
https://www.csie.ntu.edu.tw/~cjlin/libsvm/
BSD 3-Clause "New" or "Revised" License
4.54k stars 1.64k forks source link

Release latest version on Central #78

Closed davido closed 5 years ago

davido commented 7 years ago

The latest version Version 3.21, December 2015 wasn't released on Central.

http://central.maven.org/maven2/tw/edu/ntu/csie/libsvm 3.17/ 29-Aug-2013 02:36

For java projects it's easier to fetch from Central than from GH.

Thanks!

rzo1 commented 7 years ago

+1

juanmirocks commented 7 years ago

@davido @datumbox maybe you can work together for this: https://github.com/datumbox/libsvm

:)

datumbox commented 7 years ago

The Datumbox Machine Learning framework uses libsvm. Given that @cjlin1 does not publish the library on Maven, I always prepare a mavenized version as soon as a new release becomes public. Both version 3.21 and 3.22 are available on Maven: https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.datumbox%22%20AND%20a%3A%22libsvm%22

juanmirocks commented 7 years ago

Nice! @datumbox any luck making @cjlin1 accept a pull request? :)

datumbox commented 7 years ago

I have set up the project with all the required pom files here: https://github.com/datumbox/libsvm Nevertheless I'm not sure if a pull request makes sense in this case. This is because @cjlin1 won't be able to publish under com.datumbox groupid. I think the proper way to go it to create his own groupid, sign up with sonatype and be able to publish on maven central repo.

At any case I agree that it would be way better if the author of the project actually produces one official release on maven repo, rather than me or anyone else produce "unofficial" releases.

rzo1 commented 5 years ago

Any updates here? Can you (@cjlin1) provide an official release version via Maven Central?

cjlin1 commented 5 years ago

We can do that if it's not too complicated. Can someone give me the instructions for doing that? Thanks

rzo1 commented 5 years ago

Hey @cjlin1

thanks for your response.

We need to add some files to mavenize the libsvm project in order to publish to Maven Central (via Sonatype). I would propose, that we send you a PR with the related pom.xml, which is needed for that step.

In addition, some steps on Sonatype need to be conducted (see https://central.sonatype.org/pages/ossrh-guide.html):

  1. Create a JIRA Account
  2. Create a Ticket to claim the namespace / groupid tw.edu.ntu.csie.libsvm or tw.edu.ntu.csie or something else like com.github.cjlin1 / com.github.cjlin1.libsvm for the project.
  3. After the ticket is processed, we are ready for deployment on Sonatype
  4. You will need a GPG Key to sign the resulting JAR artifacts (we can explain this in the related PR)

@datumbox Do you the time to provide a related PR? If not, I can conduct this as well.

davido commented 5 years ago

@cjlin1 thanks for looking into it. It may help: Gerrit Code Review project has in depth documentation how to do it: [1].

[1] https://github.com/GerritCodeReview/gerrit/blob/master/Documentation/dev-release-deploy-config.txt

cjlin1 commented 5 years ago

Thanks. Before I do anything let me ask a question. I recall that some time ago my student came close to do this, but we faced an issue that because the current repository were not maintained by us (we were not the one putting 3.17 there), we couldn't really do the release (or some permission issue I forgot). I think we contacted the person but failed to get a reply. Do you expect we face the same problem now?

rz writes:

Hey @cjlin1

thanks for your response.

We need to add some files to mavenize the libsvm project in order to publish to Maven Central (via Sonatype). I would propose, that we send you a PR with the related pom.xml, which is needed for that step.

In addition, some steps on Sonatype need to be conducted (see https://central.sonatype.org/pages/ossrh-guide.html):

  1. Create a JIRA Account
  2. Create a Ticket to claim the namespace / groupid tw.edu.ntu.csie.libsvm or tw.edu.ntu.csie or something else like com.github.cjlin1 / com.github.cjlin1.libsvm for the project.
  3. After the ticket is processed, we are ready for deployment on Sonatype
  4. You will need a GPG Key to sign the resulting JAR artifacts (we can explain this in the related PR)

@datumbox Do you the time to provide a related PR? If not, I can conduct this as well.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.*

rzo1 commented 5 years ago

Thanks for the reply @cjlin1

If the Sonatype Repository for tw/edu/ntu/csie/libsvm already exists, it might be a problem. However, the guys from Sonatype can handle such a situation, because you can proof, that you are the original author of libsvm. Or they will ask some additonal question in the issue tracker,

An alternative would be to use com.github.cjlin1 / com.github.cjlin1.libsvm as the groupId, which is not yet taken.

datumbox commented 5 years ago

@rzo1 @cjlin1 I created this dummy PR based on my fork so that you can check easier the changes.

I closed it to avoid accidental merges as the PR should not be merged as is. The pom.xml file needs to be updated to reflect @cjlin1's project details, versions, keys etc. Please review the modifications (other than the obvious group ids, descriptions etc) and let me know if you see anything weird.

Publishing to Maven Central is quite straightforward but the first time is a bit more manual. As @rzo1 pointed out, the group id already exists so if you don't have the credentials you will need to regain access. I don't believe it would be hard to prove you are the owner and doing so will save you time from the initial manual release.

Happy to help you out with the details of setting it up. It's always best if the owner of the library releases official versions rather than relying on others maintaining forks. :)

davido commented 5 years ago

It's always best if the owner of the library releases official versions rather than relying on others maintaining forks. :)

+1.

cjlin1 commented 5 years ago
  1. Create a JIRA Account

Well I got a problem even for this step. Apparently the student handled this matter registered an account under my name before

https://issues.sonatype.org/browse/OSSRH-27464

and it seems he/she has been granted the permission (though we then didn't finish it)

I don't even remember who were assigned to do this then. On sonatype what's the way to send someone a message? I need to get the account back.. Thanks

  1. Create a Ticket to claim the namespace / groupid tw.edu.ntu.csie.libsvm or tw.edu.ntu.csie or something else like com.github.cjlin1 / com.github.cjlin1.libsvm for the project.
  2. After the ticket is processed, we are ready for deployment on Sonatype
  3. You will need a GPG Key to sign the resulting JAR artifacts (we can explain this in the related PR)

@datumbox Do you the time to provide a related PR? If not, I can conduct this as well.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.*

davido commented 5 years ago

On sonatype what's the way to send someone a message?

the way we communicate with the Sonatype guys is to leave a message on an issue and ask for the help. But to leave a message on an issue, and claim an account back, you need account first. May be create a second account and claim the first one is actually your account, and when it assigned to you, close the second account?

rzo1 commented 5 years ago

On sonatype what's the way to send someone a message?

the way we communicate with the Sonatype guys is to leave a message on an issue and ask for the help. But to leave a message on an issue, and claim an account back, you need account first. May be create a second account and claim the first one is actually your account, and when it assigned to you, close the second account?

I agree with that. I would open an ticket... this is the fastest way to communicate with them.

cjlin1 commented 5 years ago

Many thanks. I filed a support request. Let's see how it goes.

rz writes:

    On sonatype what's the way to send someone a message?

the way we communicate with the Sonatype guys is to leave a
message on an issue and ask for the help. But to leave a
message on an issue, and claim an account back, you need
account first. May be create a second account and claim the
first one is actually your account, and when it assigned to
you, close the second account?

I agree with that. I would open an ticket... this is the fastest way to communicate with them.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.*

rzo1 commented 5 years ago

It seems, that they have responded very quickly :) - https://issues.sonatype.org/browse/OSSRH-45008 Thank you very much for pushing this forward @cjlin1

cjlin1 commented 5 years ago

Yes, they responded. But what does

"I've granted your cjlin1 user the appropriate permissions."

mean? I don't think they have given the account "cjlin" back to me (tried to sign up with it but they still said the account exists) It seems they just allowed the account "cjlin1" (regerested yesterday) to work on the libsvm maven release? If so, probably I should ignore the account issue now and proceed to the next step? What do you think? Thanks

rz writes:

It seems, that they have responded very quickly :) - https://issues.sonatype.org/browse/OSSRH-45008 Thank you very much for pushing this forward @cjlin1

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.*

rzo1 commented 5 years ago

Hey @cjlin1 ,

imho, that means, that they have granted your account cjlin1 the permissions to publish under tw.edu.ntu.csie (if I get the groupID in the first tickets correct).

I think, you can proceed with mavenizing the project now. Let us know, if you need some support on doing this.

cjlin1 commented 5 years ago
  1. After the ticket is processed, we are ready for deployment on Sonatype
  2. You will need a GPG Key to sign the resulting JAR artifacts (we can explain this in the related PR)

So getting GPG key seems to be my next step. But the guide mentioned by you is down now. https://central.sonatype.org/pages/ossrh-guide.html So I plan to follow https://help.ubuntu.com/community/GnuPrivacyGuardHowto to generate GPG key. Let me know if you see any problem. But then I don't know how to publish the key as http://central.sonatype.org/pages/working-with-pgp-signatures.html is also down

After that, what's next? it seems I need to upload files in https://github.com/cjlin1/libsvm/pull/129/files to sonatype? Exactly how to do that?

In https://github.com/cjlin1/libsvm/pull/129/files svm.java is removed. Does this mean they will generate it using svm.m4? why do we need .gitignore?

Thanks

@datumbox Do you the time to provide a related PR? If not, I can conduct this as well.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.*

rzo1 commented 5 years ago

Hey @cjlin1

the website is indeed down atm. I think, that it will be available again soon.

To answer some of your questions:

The svm.java is generated from the .m4 file in line 69ff and added to the resulting source file.

You should also consider to change

<java-version>11</java-version>

to

<java-version>8</java-version>

to maintain compatibility with older environments. I guess, that a lot of people still depend on Java 8.

Related to the process to publish a release artifact:

  1. You need to get the current project mavenized by applying (most of, but not all) changes in the PR you mentioned.
  2. You need to conduct the release via Maven. The files will then be uploaded via Maven to Sonatype into a "Staging"-Repository. Afterwards, some automatic checks will be conducted by Sonatype. If they pass, you can "promote" the artifact as a release (via the Web-UI of Sonatype).
  3. .gitignore is not mandatory here, but Maven will generate some files, which shouldn't be pushed into a Git-Repository.
cjlin1 commented 5 years ago
  1. You need to get the current project mavenized by applying (most of, but not all) changes in the PR you mentioned.

Do you mean I clone a copy of libsvm and apply the patch? But I think only java code is needed?

  1. You need to conduct the release via Maven. The files will then be uploaded via Maven to Sonatype into a

OK. But how to upload?? Is this described on the page (which is now down)

"Staging"-Repository. Afterwards, some automatic checks
will be conducted by Sonatype. If they pass, you can
"promote" the artifact as a release (via the Web-UI of
Sonatype).
  1. .gitignore is not mandatory here, but Maven will generate some files, which shouldn't be pushed into a Git-Repository.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.*

rzo1 commented 5 years ago

Hello @cjlin1 ,

Related to your questions above:

You need to

Steps (1) to (4) need manual intervention on your local PC.

I can support with the steps mentioned above, if you like. For this purpose, I will send you a mail to your institutional mail address.

datumbox commented 5 years ago

@cjlin1 Apologies for the late response, it's been a busy week.

I think @rzo1 did an awesome job answering your questions but just to be safe I added a couple of comments on my original PR for all the things that need to change. I also turned on the "allow edits from maintainers" feature so that you can push your changes on the PR if you want.

cjlin1 commented 5 years ago

Many thanks.. I have been in contact with @rzo1 via emails for details.. I have granted him the permission to publish, so he will handle some details subsequently. Thanks

Vasilis Vryniotis writes:

@cjlin1 Apologies for the late response, it's been a busy week.

I think @rzo1 did an awesome job answering your questions but just to be safe I added a couple of comments on my original PR for all the things that need to change. I also turned on the "allow edits from maintainers" feature so that you can push your changes on the PR if you want.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.*

rzo1 commented 5 years ago

Good morning,

3.23 is now available via Maven Central under the official groupID of the Dept. of Computer Science & Information Engineering of the National Taiwan University.

        <dependency>
            <groupId>tw.edu.ntu.csie</groupId>
            <artifactId>libsvm</artifactId>
            <version>3.23</version>
        </dependency>

I think, we can close the issue now.

Note, it will take some more time till all mirrors are in sync.

Best, rzo1

davido commented 5 years ago

Thanks!

rzo1 commented 5 years ago

Good morning,

3.24 is now available via Maven Central under the official groupID of the Dept. of Computer Science & Information Engineering of the National Taiwan University.

        <dependency>
            <groupId>tw.edu.ntu.csie</groupId>
            <artifactId>libsvm</artifactId>
            <version>3.24</version>
        </dependency>

Note, it will take some more time till all mirrors are in sync.

Changelog as usual: https://www.csie.ntu.edu.tw/~cjlin/libsvm/log

Best, rzo1

datumbox commented 5 years ago

@rzo1 Thanks for the heads up. I tried updating the dependencies of Datumbox Framework and it seems that the mirrors are not in sync. Any change you could confirm that the release was indeed completed successfully? Typically syncing does not take so much long.

Thanks a lot in advance!

rzo1 commented 4 years ago

Good catch! Sync should now be on the way!

datumbox commented 4 years ago

It works! :) Thanks for making it available.

rzo1 commented 3 years ago

Good morning,

3.25 is now available via Maven Central under the official groupID of the Dept. of Computer Science & Information Engineering of the National Taiwan University. It will take some time to sync as I jsut released the artifact on Sonatype.

        <dependency>
            <groupId>tw.edu.ntu.csie</groupId>
            <artifactId>libsvm</artifactId>
            <version>3.25</version>
        </dependency>

Best, rzo1