Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ant changes to enable Calabash to be deployed to Maven Central #34

Closed
wants to merge 3 commits into from

Conversation

inigo
Copy link

@inigo inigo commented Mar 13, 2012

Hi,

These changes enable Calabash to be deployed to Maven Central by running "ant maven-stage".

You'll also need to carry out some additional steps - signing up for an account on the Sonatype server, adding the appropriate Ant libraries, and so on - see the maven-build.txt for details.

If you'd rather not do those steps, let me know and I can deploy Calabash myself to Maven myself, but it would be better if you're able to do it (in particular, I don't have all the JARs at the moment to have a compile-everything work, so I've only tested with "compile").

Let me know if I can help with any of it - I'm by no means a Maven expert, but I've successfully deployed things to Maven Central before.

Inigo

@ndw
Copy link
Owner

ndw commented Apr 4, 2012

  1. Thanks.
  2. Ok. That probably resolves 4.
  3. No, that's fine. I'll just limit Maven to the 9.4 branch. I'm happy for 9.3 to fade into legacy anyway.
  4. Right. I probably had the wrong Saxon jar in lib. Will try again this evening.

@ndw
Copy link
Owner

ndw commented Apr 4, 2012

BTW, if you have any thoughts on how #37 might interact, I'd be happy for a clue.

@inigo
Copy link
Author

inigo commented Apr 4, 2012

Last commit should solve 1.

I'm not familiar with the bnd task in #37, but what it looks like it's doing is just adding a lot of extra entries to the JAR file's manifest, and doing a diff of the created JAR confirms this. There's no reason I could see why this would cause any problems for Maven.

The "jar" task that's been changed to use <bnd> in place of <jar> is dependent on "compile", whereas I made the "maven-dist" task dependent on "compile-everything", so it wouldn't be right to change "maven-dist" to just copy that jar. I don't see any reason why the first <jar> call in "maven-dist" shouldn't be changed to use <bnd> as well, though. I'll add a commit to do just that.

@ndw
Copy link
Owner

ndw commented May 16, 2012

Hi Inigo,

I've come back to this again and I have more questions.

  1. I renamed 'lib' and then ran 'mvn compile' thinking it would get libs and build; it says "No sources to compile"
  2. Under dependencies, there are a few listed as "not needed" but that's not true. They are, for some tests.
    Can I just leave those jars in lib?

@inigo
Copy link
Author

inigo commented May 16, 2012

Hi,

You shouldn't rename lib, and you shouldn't run mvn compile... at the moment, you should just build using Ant as you normally would (and use . I haven't changed the project to be completely built in Maven, and using mvn on it at the moment won't work.

If you like, I can change it so it will build in Maven - but Maven has specific ideas about directory structures and so on, so this would involve moving a bunch of things around, and require changes to your Ant build file and IDEA project files and so on. This isn't necessary to get Calabash available as a Maven dependency to other people, and I wouldn't particularly recommend it since you've already got a working Ant build.

@ndw
Copy link
Owner

ndw commented May 16, 2012

Inigo Surguy reply@reply.github.com writes:

If you like, I can change it so it will build in Maven - but Maven has
specific ideas about directory structures and so on, so this would
involve moving a bunch of things around, and require changes to your
Ant build file and IDEA project files and so on. This isn't necessary
to get Calabash available as a Maven dependency to other people, and I
wouldn't particularly recommend it since you've already got a working
Ant build.

Ok. I love how the complexity of Maven seems endless.

                                    Be seeing you,
                                      norm

Norman Walsh ndw@nwalsh.com | In every work of genius we recognize
http://nwalsh.com/ | our own rejected thoughts; they come
| back to us with a certain alienated
| majesty.-- Emerson

@ndw
Copy link
Owner

ndw commented May 19, 2012

Per our email, let's start this again after the next release.

@ndw ndw closed this May 19, 2012
@Vampire
Copy link

Vampire commented Mar 6, 2013

May I ask how the status is here? Was it started again? I'd also like to see official calabash artifacts on maven central as I use Ivy as dependency manager.

@ndw
Copy link
Owner

ndw commented Mar 8, 2013

No clue. I'll try to look again this weekend.

@ndw ndw reopened this Mar 8, 2013
@rdeltour
Copy link
Contributor

@Vampire note that in the mean time you can use the artifact from the org.daisy group. It is built from a POM file from daisy-consortium/osgi-libs which just downloads the tagged source and re-build it using the vanilla Ant build.

@Vampire
Copy link

Vampire commented Mar 19, 2013

@rdeltour are you sure? I've seen these artifacts before, but I thought I have read somewhere that it is a patched version of Calabash. Nevertheless I'd prefer to use the official version from Norm directly. Also because you never know whether or when those Daisy guys update their artifact or decide to modify it before putting it into Maven Central.
Besides that, their artifact depends on commons-httpclient which is not really a dependency, is it?

@rdeltour
Copy link
Contributor

@Vampire I'm pretty sure, I'm the DAISY guy maintaining the artifact :). You're right that pre-1.0.8 versions were patched, primarily to include not-yet-official bug fixes or to tweak OSGi metadata. The artifact for 1.0.8 is built with the vanilla ant build, you can verify that from the POM file I linked previously — and you can do so for whatever subsequent version we push there.

That said, I'm on the same boat. I'd rather use "official" artifacts rather than maintaining our own. @ndw let me know if I can help: one possibility is for you to copy the POM linked above and change the group ID. It's probably less elegant than an Ant-integrated solution as suggested in earlier comments, but on the other hand it's more decoupled and it's been proven to work OK.

@Vampire
Copy link

Vampire commented Mar 19, 2013

@rdeltour ah, ok, I see. :-) What about the dependency I mentioned? Currently I just use a hand-made Ivy artifact in our corporate Ivy repository. But something in Maven Central is preferable as source for the Corporate repo and for usage in OSS projects where I eventually would use it. :-)

@rdeltour
Copy link
Contributor

their artifact depends on commons-httpclient which is not really a dependency, is it?

commons-httpclient is used for the implementation of the p:http-request step part of the standard library and also in a couple core classes, that's why it's not an optional dependency.

I kept the dependency-analysis report for my own documentation, if you want to have a look.

@Vampire
Copy link

Vampire commented Mar 19, 2013

Ah, forget what I said, I even added more dependencies as they are noted by calabash as non-optional dependencies. In my artifact I have the following dependencies defined:

commons-codec | commons-codec | 1.6
commons-httpclient | commons-httpclient | 3.1
commons-io | commons-io | 1.3.1
commons-logging | commons-logging | 1.1.1
net.sf.saxon | Saxon-HE | 9.4.0.7

So actually without any further thougth my question would change into whether you have all needed dependencies defined. :-)

@rdeltour
Copy link
Contributor

So actually without any further thougth my question would change into whether you have all needed dependencies defined.

I think I have. E.g. commons-logging is not a direct dependency, it's a transitive dependency of commons-httpclient. I don't find traces of commons-io, it must be a transitive dependency of an optional one.

@ndw
Copy link
Owner

ndw commented Mar 19, 2013

Ok. I believe that 1.0.9 is available in Maven.

Someone wanna check and see if I borked something?

@rdeltour
Copy link
Contributor

I believe that 1.0.9 is available in Maven.

I cannot find it at the time of writing:
http://search.maven.org/#search%7Cga%7C1%7Cxmlcalabash

It's probably not up on Central for sync reasons, but anyway what are the artifact's coordinates ?

@ndw
Copy link
Owner

ndw commented Mar 19, 2013

I haven't the faintest clue. Somewhere under "sonotype-nexus" whatever that is?

@rdeltour
Copy link
Contributor

I was actually talking about the artifact coordinates, which are made of 3 components: group ID, artifact ID, version.
In "my" artifact these are org.daisy:com.xmlcalabash:1.0.8.

Another piece of info is the actual repository you've uploaded the artifact to. I suppose you used Sonatype's repository hosting service for open source software. Artifacts uploaded there will be synced to Maven Central automatically if they're not SNAPSHOT versions. You have to ask them to enable the sync via the issue tracker though.

@rdeltour
Copy link
Contributor

Oh, and it does seems to show up on Sonatype's OSSRH:
https://oss.sonatype.org/index.html#nexus-search;quick~xmlcalabash

I suppose it will be synced to Central when you ask them to enable the auto-sync.

Thx for all this btw, and congrats on 1.0.9 ;)

@ndw
Copy link
Owner

ndw commented Mar 19, 2013

Can you get it from sonatype using ordinary maven commands, and does it work properly?

@rdeltour
Copy link
Contributor

I've not tried yet, but you can get it from the sonatype repo if this latter is declared as a repo in your Maven setting or local POM.
But anyway, as I write I noticed it's now showing up on Maven Central (which is available in the default settings without requiring any special configuration).

@ndw
Copy link
Owner

ndw commented Mar 19, 2013

So we're good and it's done? Except I have to remember to do the maven dance everytime I do a release.

@rdeltour
Copy link
Contributor

I believe some of the dependencies declarations can be improved (e.g. saxon updated to latest 9.4.x, htmlparser there, making tag soup optional, etc). But I'll create a new dedicate issue.

Closing this one is fine by me.

@ndw
Copy link
Owner

ndw commented Mar 19, 2013

Ok. Thanks!

@ndw ndw closed this Mar 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants