Deploy artifacts on Maven Central
It would be great if the artifacts were deployed to Maven central, removing the need to manually build and install the project on each workstation/CI server.
That is likely to be the plan. Will explore this more once 1.3 is out. In the meantime, others are welcome to contribute work to facilitate the publishing process.
I would suggest using Sonatype (http://central.sonatype.org/) to publish the project artifact to Maven central.
IIRC the setup was a quite easy task (you have to register yourself in a JIRA and create an issue where you request your project to be activated ... have done that some while ago at another project), then the pom.xml has to be defined appropiately. After that, only some minor things have to be changed in your local Maven setup and then a release is only the performance of "mvn release:prepare" and "mvn release:perform".
I think I can help if you tell me what kind of help you need here :-)
Kind regards Felix
@Arcticwolf Ideally, we would do the work here that is needed in the pom to make the project easily publishable to maven central and/or sonatype. If there are semantic versioning issues, we should also fix them as part of the packaging work.
@rombert Do you have thoughts around "maven central" vs. "sonatype"?
Once we have done the project changes, I can handle the registrations.
@vboctor Sonatype's repo is the usual staging ground for deploying to Maven Central, so what @Arcticwolf suggests is just right.
@vboctor I'm sry, I havn't made my point clear: sonatype also publishes in the end to maven centra. Sonatype does the publishing work in background for you : ) There are no semantic versioning issues yet, I just wanted to ask if you plan to release the project artifacts in a semantic versioning way. Don't know your release plan : )
Kind regards, Felix
Sounds great then. Let's do any necessary modifications on our side for publishing the package. Then I'll work on figuring out the registration process. Looking forward to the pull request.
Ideally, we would be able to publish a dev version as well as stable version(s).
So far the project has been using major.minor release format, and we should move to semantic versioning.
Deploying to Maven Central is nice and should certainly happen in the end, but currently the code base is far from production-ready. It contains lots of bugs and quirks as is seems to be ported 1:1 from it's C# counterpart.
I think improving the reliability and maintainability of this library should be the first priority, before any real release is published. Until then we could have SNAPSHOT or MILESTONE releases, but I think these normally are published in a separate repository, rather than in Maven Central. Please correct me if I'm wrong.
@evpaassen - TBH I haven't looked at the project in depth, but the best way of knowing what quirks matter most is having people actually use it.
@evpaassen yes you are right. If the software is not production ready, then the SNAPSHOTs should be published somewhere else. As far as I know there is also a Sonatype SNAPSHOT repository (https://oss.sonatype.org/content/repositories/snapshots/). Then we only had to configure the publish process once and if the version is a snapshot (version string is x.y.z-SNAPSHOT) then it would be published to the snapshot repo and to the central repo otherwise. But I have to check before how to do that exactly.
Kind regards Felix
@evpaassen @rombert BUT if the version has a 0 in the major version (e.g. 0.8.7), then by the definition of semantic versioning it would be also ok to publish that (see http://semver.org/). That would need to be decided by the project lead.
Kind regards, Felix
@evpaassen Unfortunately, the ews-java-api was a port of the C# and wasn't done by the core team. Hence, you will notice a quality delta between ews-managed-api and ews-java-api. However, my feel is that we can make it better. Starting with fixing what is broken, then we can go for any non-functional improvements. That is exactly why I wanted to have a SNAPSHOT packages first. So far we don't have stable releases based on the open sourced code, but eventually we will.
@Arcticwolf The last released version of this library is 1.2. Hence, I worry about going back to 0.* and causing confusion. We have already done some changes that break compatibility (e.g. fixing typos in public API names and possibly others). So ideally, we really target our next stable version to 2.0.0. Till then use snapshot releases of that.
The reason to do maven now is to enable developers to easily start consuming the project via maven and providing feedback. It is not a statement about having a stable release available. As @rombert said, let people use it and get more feedback and contributions.
I've read through some documentation of Sonatype and following Links are important for now:
- for legal reasons: http://central.sonatype.org/pages/central-repository-producer-terms.html
- requirements for the project: http://central.sonatype.org/pages/requirements.html
- how to publish with maven: http://central.sonatype.org/pages/apache-maven.html
Summarized, the main things to do (hope I didn't forgot something):
- add additional information to pom.xml file
- @vboctor has to create an account at Sonatype and register this project
- add additional maven plugins with their configurations
If that is done, also the plugins are smart enough to deploy to the snapshot repository, if the version has a closing "-SNAPSHOT" string. But to be able to get the snapshot versions, the users have to add the snapshot repository in their pom.xml.
Let me know where I should/can help with these tasks.
@vboctor ok I see. Since there was already a 1.2 release, going back is not really an option. I think targeting for version 2.0.0 as a stable release sounds like a good idea.
Just to put my two cents in: From my experience it is easier to get feedback for an open-source project when it is published to the central repository or any other release repository (even though, I think most people prefer to get their libs from central). Many people hesitate using projects which are in snapshot position (e.g. many companies have a "don't use snapshot" policy). So maybe it would be good to get a stable release there as soon as you feel the project is in a state, where people can use it without very big problems.
Kind regards Felix
perhabs anybody has some experiences about deploying snapshots to maven and can create a PR?
hi, adding snapshot releases to sonatype seams good. They have a special repository for it (https://oss.sonatype.org/content/repositories/snapshots/). Since @Arcticwolf offers his help in this case it would be good if @vboctor would do the registration process for sonatype. For completing the process we need to have some stuff added to the pom in general:
<licenses>
<license>
<name>MIT License</name>
<url>http://opensource.org/licenses/MIT</url>
<distribution>repo</distribution>
</license>
</licenses>
<issueManagement>
<url>https://github.com/OfficeDev/ews-java-api/issues</url>
<system>GitHub Issues</system>
</issueManagement>
<ciManagement>
<system>travis</system>
<url>https://travis-ci.org/OfficeDev/ews-java-api</url>
</ciManagement>
<scm>
<url>https://github.com/OfficeDev/ews-java-api</url>
<connection>scm:git:ssh://[email protected]:OfficeDev/ews-java-api.git</connection>
<developerConnection>scm:git:ssh://[email protected]:OfficeDev/ews-java-api.git</developerConnection>
</scm>
and another deployment definitions added aswell:
- here
- and here
- adding a settings.xml with encrypted login data
please note if I have missed something
Hi guys, any update on this? I can help if need be - I have deployed projects to sonatype before. Deploying to sonatype is quite arcane (involves manually creating an issue like this with them). I would recommend bintray.
I am currently preparing a PR for the deployment issue. @pathikrit maybe we can try normal deployment first because bintray seems not to be available for free? Once @vboctor opened a ticket at sonatype ossrh we can add the missing configurations / plugins. Feel free to comment on the branch I created (or create a PR on your own). I am currently following the steps mentioned in my earlier post.
The branch looks good. Looking forward to it...
I will work on the registration and keep this thread updated.
I've created the request to register the project within sonatype. It should take a couple of working days to be setup. Once it is, I will update the thread.
Ref. OSSRH Issue