Yet another SmartGWT Mavenizer

I know there were at least two previous posts with instructions for ‘mavenizing’ the SmartGWT builds, but in short, neither of them quite worked for me.

I modified one of them to the point that I got tired of it and started all over. I’m not sure that I’d do it all again, but I have something now that works for me and should work for anyone else with no modification (consideration has been given to all editions eval through enterprise and including optional modules, but I’ve only tested with Power and Eval 2.5 and 3.0)

If there’s interest in such a thing, I’m happy to donate it. I’d really like to see it (or something like it) included with the Isomorphic build, but I can put it anywhere… It’s not clear to me if it should go up on the wiki, or in the SmartGWT extensions project, or here in the forum. Or if anyone cares. :slight_smile:

I’d have to write up some documentation around it in any case, but for now just know that I can download and install (or deploy to my corporate nexus repo) any available build (nightly or release) with a command like the following:

mvn clean install -Dversion=3.0 -Dedition=power -Dbuild=nightly -Ddate=2011-12-02 -Danalytics=true -Dmessaging=true -Disc.username=MY_USERNAME -Disc.password=MY_PASSWORD

Which has been very handy when I’m trying new builds, as I frequently do.

Thoughts?

People definitely care :slight_smile: And it looks like you’ve taken this further than other mavenizers of the past. The ideal place for this is the public wiki - self-registration takes just a few seconds. If you take the time to write this up we will definitely link to it pervasively (FAQ, blog, etc).

First draft here: http://wiki.smartclient.com/display/Main/Using+Maven+with+SmartGWT

Is there interest in a Maven archetype to go with it? I have one I’ve been using myself, but it’s a little specific to my own architecture…

Looks great, thanks for contributing that. A couple of possibly dumb questions:

  1. there doesn’t seem be any kind of credentials for the “NEXUS” repo. Is it assumed there’s a definition of this repo elsewhere?

  2. could this be used to install into an individual user’s local maven cache (.m2) instead of a central corporate repository?

Oh, you mentioned an archetype. Yes, people have asked about that and would find it useful, even if it was in the form of just a sample of an archetype you’re using that they would need to customize for their own project.

Yes, just use the normal /settings/servers/server definition. Updated the wiki example to include that.

Yes, definitely. That’s what example 2 under Usage is meant to illustrate. Updated the wording there as well.

I would like to start by saying thank you. It works well installing to my .m2 directory. I am still trying to figure out how to get upload to artifactory to work for me. And the only thing I see missing at this point is the isomorphic tools jar. But all in all this is great work, thank you for sharing.

Good, I’m glad someone else found it useful.

Mind if I ask which version and edition you used it with?

I don’t use Artifactory myself, but if you’ll provide some detail around the problem you’re having at deploy, maybe we can get it sorted out.

I left isomorphic tools out on purpose, actually, because AFAIK it’s only used with the Admin console and not something you’d use in a Maven project anyway. Same with isomorphic-webservices, isomorphic-embedded-tomcat, and isomorphic-examples.

I am using 3.0 power release with messaging. It took me some research as I am new to artifactory but once I got the settings.xml right, I managed to get it up there. Thank you again. I want to be able to use the tools, so I will probably spend some time adding a module for it following your lead.

In order to be able to create and edit datasources in the visual builder, you need that package. That is my sole use for the visual builder :). It would also be useful if it jar’d the javadocs and pushed them up as well.

Yeah, I still don’t get it, but whatever floats your boat. I actually have a minor change to make myself, so if you can wait I’ll see about getting it up there with that.

Already wishing this was in some SCM, just like I knew I would…

I bet if you threw in on github you would find several people that would be happy to contribute to this effort. I think we’ve all been waiting a long time for a maven solution that actually worked. Until then, I will wait.

Hey bbruyn, look it’s your first customer success :wink:

jpappalardo, sounds like bbruyn is going to update the wiki with fixes, but feel free to update the wiki page yourself if you find further refinements.

I went ahead and created a module to add isomorphic-tools.jar. I posted it on the wiki.

@jpappalardo Thanks for the contrib, looked pretty good. Latest wiki attachment includes isomorphic-tools and bundles/installs/deploys javadoc.

@Isomorphic Is there a way to delete the obsolete attachment?

We got rid of the old attachment for you.

I have manipulated the project to include the appropriate javadoc for each jar deployed to artifactory. At least in Intellij this is the only way I can seem to get quick access to the javadocs.

Release works for me, however I cannot seem to trigger a dl of the nightly. Every time I try to run mvn clean install -Psmartgwt-nightly -Ddate-2011-12-12
it fails trying to unzip because it never ran the profile to dl the nightly. Any hints to what is going on here? Here is how I have the smartgwt-nightly profile setup:

<profile>
<id>smartgwt-nightly</id>
<properties>
<version>3.0</version>
<edition>power</edition>
<build>nightly</build>
<messaging>true</messaging>
<analytics>false</analytics>
<isc.username>jpappalardo</isc.username>
<isc.password>MY_PASSWORD</isc.password>
<repo.id>MY_ID</repo.id>
<repo.url>MY_REPO</repo.url>
</properties>
</profile>

I have a seperate profile for release and the only difference is the build and repo.url properties

Not offhand, but I’ll do some digging tonight if I get the chance.

Meanwhile, have you tried running clean and install separately?

Also, would you mind explaining what you mean by, “include the appropriate javadoc for each jar”?

I have tried doing clean and install seperately. Nothing seems to cause a download to occur.

In Intellij, I don’t know about other IDE’s it expects the javadoc for each dependency to be in the same location as the dependency. Perhaps there is a way to change this in my projects pom? But for now each individual isomorphic dependency we create in the repository, I also push a javadoc up for it.

So for instance isomorphic-core-rpc has the server javadoc pushed up with it.