Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cbi-dev] Publish to Maven Central

Hi,

I have created the following page in the Eclipse Wiki:
https://wiki.eclipse.org/Tycho:How_to_deploy_to_a_Maven_repository

Not sure if it is in the correct place, but at least it contains all the information I gathered over the last weeks.
If it is in the wrong place, maybe a webmaster can move it to the right place then.

I hope you find the information useful. Feel free to comment, update or fix possible issues.

Greez,
Dirk

On Wed, Feb 10, 2021 at 2:13 PM Ed Willink <ed.willink@xxxxxxxxx> wrote:

Hi

A reference from the Tycho/FAQ Wiki would be good. A separate page as part of the Tycho Wiki could avoid problems as personal blogs evolve independently.

I would love to read a clear article explaining how I can move my traditional many projects + tests + examples pom-less build into one where publishing to Maven central just works.

    Regards

        Ed Willink

On 10/02/2021 12:52, Dirk Fauth wrote:
Hi,

I was finally able to release on OSSRH. I think the sync needs to be performed. And I hope that everything is configured correctly. But well, let's see.

@Tom
After all the work I have spent here, I totally agree with you. And I will check how I can change the project structure to become more efficient.

@Mickael
"because MANIFEST-first approach has a lot of benefits and seems more simple and powerful"

First I was laughing because I thought you are making a joke. Then I started crying, because I realized you really mean what you say.
Actually I think the MANIFEST-first approach is the worst thing in OSGi development. "more simple"? Yes it is more simple to do things wrong! "powerful"? well with great power comes great responsibility, but most of the people don't take the responsibility.

Most of the MANIFEST files that are created "by hand" using PDE tooling are a nightmare. Starting from the endless Require-Bundle vs. Import-Package discussion and the terrible re-export, ending at the point that nobody is taking care of versioning package exports or even keeping the exported versions up-to-date. Require-Bundle and re-exports exist to make it easy for developers. But the result becomes a nightmare if you consume it in inhomogeneous environments. And I am fighting with such things for years in several projects. So I have my experience in that area.

The work that is done in Tycho is really great and at least makes the build less frustrating. But once you start looking from the outside of the Eclipse universe, things are not so nice anymore. I am a big fan of pom-less Tycho. But for the deployment to a Maven repository it is not so nice. For PDE projects you have quite a lot of artifacts that you don't want to publish to Maven Central. Test plugins/fragments, features, update sites, target definitions, not to mention the connector poms in a structured environment. I ended up in specifying skip=false for the maven-deploy-plugin to avoid that, and created pom.xml files for every artifact I want to deploy. So pom-less is not so pom-less anymore. Additionally I added dependency sections that are actually ignored for the Tycho build results, but then they are correctly specified for Maven consumers. And this way the dependencies need to be kept in sync in the development at least twice.

So if you are asking what could be improved or added to Tycho to make this better, I would suggest to have a way to configure if an artifact should be skipped for deployment e.g. via build.properties. And somehow the dependencies could be added without an additional pom.xml file. But that is probably not possible as the GAV for the dependencies are not available anywhere, since the dependencies are resolved via p2.

As it took me quite a while to get everything up and running, I would like to publish my findings somewhere. Is there a place in the Eclipse Wiki where I could add it? Or should I write a personal blog post, referencing all the official documents? IMHO the Eclipse Wiki would be a good place, but I am not sure what a good place would be.

Greez,
Dirk

On Fri, Dec 11, 2020 at 8:48 PM Dirk Fauth <dirk.fauth@xxxxxxxxx> wrote:
Thanks everyone, I will have a look how I can make it work with the current project layout.

I personally also would like to move to a pom first approach. Especially with my future plans it would be something that could be helpful in various ways. But one step after the other. The switch would lead to several other topics I would need to address. And shortly before a release I don't want such a big restructuring. 

Mickael Istria <mistria@xxxxxxxxxx> schrieb am Mo., 7. Dez. 2020, 10:18:
Hi,

On Mon, Dec 7, 2020 at 9:56 AM Tom Schindl <tom.schindl@xxxxxxxxxxxxxxx> wrote:
synthesize the pom.xml from the p2-metadata [...]'s not that funny.
MIHO - creating a p2-repo from maven is a lot easier than the other way.

I agree with that, and I think it's a pity actually because MANIFEST-first approach has a lot of benefits and seems more simple and powerful.
So I'm wondering, do you think the story of generating a plain Maven artifact from an eclipse-plugin artifact is something that can be improved with a nice solution in Tycho somehow?
_______________________________________________
cbi-dev mailing list
cbi-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cbi-dev

_______________________________________________
cbi-dev mailing list
cbi-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cbi-dev

Virus-free. www.avast.com
_______________________________________________
cbi-dev mailing list
cbi-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cbi-dev

Back to the top