crowdcode-de / KissMDA

Keep It Simple Stupid, MDA!
33 stars 8 forks source link

Upload all the Maven artefacts to the Maven Central through Sonatype OSS Maven repository #7

Closed lofidewanto closed 11 years ago

lofidewanto commented 12 years ago

Just follow this information: https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide

lofidewanto commented 11 years ago

Started: see the issue at Sonatype OSS: https://issues.sonatype.org/browse/OSSRH-4700

lofidewanto commented 11 years ago

Sonatype finished this task and we own the group id: de.crowdcode.*

So now we need a parent POM which extends Sonatype parent POM... Afterwards we will be able to deploy to Snapshot rep...

Later on we'll deploy to Release rep...

idueppe commented 11 years ago

I guess this should be a separate github project. I can create one this morning.

lofidewanto commented 11 years ago

OK, please create a POM project in: core/kissmda-parent

You can see this parent POM project as an example: https://code.google.com/p/extra-standard/source/browse/trunk/java/components/extra-parent/pom.xml

All the informations should be written into that parent POM. It's a must so that the artifacts can be sync to Maven Central.

Also we need Javadoc within the jar. See the example above.

lofidewanto commented 11 years ago

OK, as you said we need to have a separate repository for the parent pom under GitHub crowdcode-de. Because we need to add a project in BuildHive (CloudBees) and the project must have a separate GitHub repository.

Let's name the rep: KissMDA-Parents

So we will have:

crowdcode-de: -> KissMDA -> KissMDA-Parents

Under KissMDA-Parents we should make following structure:

parents/kissmda-parent

I already made a parent project in KissMDA which should be moved to the new repository: https://github.com/crowdcode-de/KissMDA/tree/master/core/kissmda-parent

lofidewanto commented 11 years ago

After we move the kissmda-parent to KissMDA-Parents, we can delete the one in KissMDA repository

lofidewanto commented 11 years ago

I update all Maven projects with the parent pom... The build at BuildHive is broken at the moment... As we finish to setup the new repository for the parent pom and create a new project in BuildHive, the problem will be solved...

@idueppe: can we talk about this personally?

lofidewanto commented 11 years ago

Sofar ok. I opened a new repo for the parent POM. We can deploy to Sonatype OSS. Just need to release and do some stuffs to be able to deploy in Release repo ...

lofidewanto commented 11 years ago

I also deployed the SNAPSHOT to the Snapshot repo of Sonatype OSS everything works fine.

lofidewanto commented 11 years ago

It seems that we cannot separate the kissmda-parent from the "main" kissmda Github repository because in the parent POM you only can put one scm. Maven release-plugin will access to this information from the parent for both project (kissmda-parent and kissmda-modules), so we only could use one scm...

So I need to move back the kissmda-parent to the "main" kissmda...

idueppe commented 11 years ago

We need to repeat the scm configuration: see https://github.com/mfriedenhagen/multi-module-sample.

lofidewanto commented 11 years ago

surely we can do that, but is it worthwhile? IMO, we can just move the kissmda-parent back to the main repo KissMDA... Let's discuss this topic personally... I'll skype you.

lofidewanto commented 11 years ago

I put back kissmda-parent to KissMDA.git. I also restructured the Maven packages... so now it looks very good!

lofidewanto commented 11 years ago

release:prepare and release:perform work for kissmda-parent. But not yet for kissmda-modules (module pom). It says as git tried to push the result that there is no Git module....?

idueppe commented 11 years ago

I will take a look on it today

lofidewanto commented 11 years ago

Let's skype tonite. With the kissmda-parent seems to work because we also have a tag in GitHub: kissmda-parent-1.0.0. But I'm not sure why doesn't it work for kissmda-modules...

lofidewanto commented 11 years ago

So, I found out that we can make BuildHive works correctly with parent and module pom when we use ... correctly...

lofidewanto commented 11 years ago

... we use relativePath correctly. Take a look at this article: http://goo.gl/KdCJh

lofidewanto commented 11 years ago

Pfuhh at the end... I managed to release the artifacts into Sonatype OSS...

Here are the artifacts: https://oss.sonatype.org/content/repositories/decrowdcode-139

The last step: We need to see whether everything is ok. If all of you say, ok let's release them, then I will click the "release" button and ask the people from Sonatype OSS to check all the artifacts for the last time. After this step we will be able to automatically sync to Maven Central!

So we are at the following step: http://goo.gl/wwIm8 -> I already "close" the staging...

lofidewanto commented 11 years ago

One thing I found why I had a problem with maven release-plugin:

  1. I did the release:prepare and release:perform from the parent pom and I did it without -N so this means that I already tag all of the modules. This is not a good idea, I need to use -N in the future release.
  2. At the end I deploy the whole modules one by one:

Parent and module: mvn -N -DperformRelease=true clean deploy

The rest: mvn -DperformRelease=true clean deploy

-DperformRelease=true means that I want to add signatures to all my artifacts.

lofidewanto commented 11 years ago

So please: @idueppe and @pepmar take a look at the artifacts and tell me whether I should release them... After we sync to Maven Central we won't be able to delete them anymore... ;-)

idueppe commented 11 years ago

I'll check it tomorrow. But the SCM Configuration doesn't look right for me.

lofidewanto commented 11 years ago

I found one error... I need to drop the artifacts first and will do another attempt...

lofidewanto commented 11 years ago

@idueppe: I repaired the scm issue.

lofidewanto commented 11 years ago

OK, next try. I closed the staging process: https://oss.sonatype.org/content/repositories/decrowdcode-196/de/crowdcode

@idueppe and @pepmar: please take a look at the artifacts and tell me whether I should release them... After we sync to Maven Central we won't be able to delete them anymore... ;-)

lofidewanto commented 11 years ago

I tested for the second time using Maven release plugin but still get an error as git try to commit all the changes into GitHub. The same error Module does not exist. Although I already updated the SCM just like in this article: http://goo.gl/pUhpx

lofidewanto commented 11 years ago

I updated the developer version to 1.1.0-SNAPSHOT

lofidewanto commented 11 years ago

OK, nobody is against the release 1.0.0, so I'll ask OSS Sonatype to check our release artifacts.

lofidewanto commented 11 years ago

So I added a comment on our JIRA issue: https://issues.sonatype.org/browse/OSSRH-4700

Let's wait and see...

lofidewanto commented 11 years ago

Wow very fast... Now we are ready to sync... Everything seems to be ok. I will push the release button tomorrow... and after that we can close this issue, yes!

lofidewanto commented 11 years ago

OK, I've released the artifacts and the guy from OSS Sonatype will activate the sync to Maven Central. We can close this issue after our artifacs are sync to Maven Central.

lofidewanto commented 11 years ago

Sonatype:

"Central sync is activated for de.crowdcode, it runs about every 2 hours".

So, done!