tomakehurst / spring-closure-templates

Google Closure Templates integration into Spring MVC
Apache License 2.0
16 stars 9 forks source link

Upgrade repo to latest closure-templates library #3

Open zonski opened 12 years ago

zonski commented 12 years ago

Hey Tom,

The version of GCT that you have in your repo is a little old. There's a newer one available here: http://code.google.com/p/closure-templates/downloads/list

It would be great if you could upgrade your repo version when you get some time.

I just installed this jar into my local repo and used the newer version against your code base and it all work (or at least compiled and ran against my usage). I didn't have to upgrade any of the dependencies (not sure if any have actually changed or not though).

I also nudged the closure guys via the forum to see if they will get an official version up in a repo, but from their past comments (mostly with you) they don't seem overly keen. Will see how it goes.

Cheers, zonski

tomakehurst commented 12 years ago

Yeah, I'm at a loss as to why they're so against putting an m2 version up, given that plenty of other Google projects are on there. I can understand why they might not want to use Maven themselves, but there are plenty of other build tools capable of integrating with maven repos.

As you've probably noticed, I haven't really been maintaining the project for a while, hence the old version of GCT. I'll happily add the new version to my repo, but I don't know whether upgrading it in the project will necessarily just work. If you'd like to take this on, I'd be happy to merge it.

On 13 August 2012 12:20, zonski notifications@github.com wrote:

Hey Tom,

The version of GCT that you have in your repo is a little old. There's a newer one available here: http://code.google.com/p/closure-templates/downloads/list

It would be great if you could upgrade your repo version when you get some time.

I just installed this jar into my local repo and used the newer version against your code base and it all work (or at least compiled and ran against my usage). I didn't have to upgrade any of the dependencies (not sure if any have actually changed or not though).

I also nudged the closure guys via the forum to see if they will get an official version up in a repo, but from their past comments (mostly with you) they don't seem overly keen. Will see how it goes.

Cheers, zonski

— Reply to this email directly or view it on GitHubhttps://github.com/tomakehurst/spring-closure-templates/issues/3.

zonski commented 12 years ago

Thanks Tom,

I guess it can be a bit intimidating for non-maven users. I'll see if I can convince them.

I understand about the maintenance hassles. I have a few poorly maintained open source projects myself. As long as I'm using this, I'll do a little bit of work on it. If I stop using it though I'll probably stop contributing.

Would you mind if I reworked the unit tests to make them less path dependent?

I'll have a look at the maven dependencies for the new version. If you could just add the new gct jar to your repo with a new version number (but not change your spring-gct pom) that'll make it easier for me.

Cheers, zonski

On 13/08/2012, at 10:24 PM, tomakehurst notifications@github.com wrote:

Yeah, I'm at a loss as to why they're so against putting an m2 version up, given that plenty of other Google projects are on there. I can understand why they might not want to use Maven themselves, but there are plenty of other build tools capable of integrating with maven repos.

As you've probably noticed, I haven't really been maintaining the project for a while, hence the old version of GCT. I'll happily add the new version to my repo, but I don't know whether upgrading it in the project will necessarily just work. If you'd like to take this on, I'd be happy to merge it.

On 13 August 2012 12:20, zonski notifications@github.com wrote:

Hey Tom,

The version of GCT that you have in your repo is a little old. There's a newer one available here: http://code.google.com/p/closure-templates/downloads/list

It would be great if you could upgrade your repo version when you get some time.

I just installed this jar into my local repo and used the newer version against your code base and it all work (or at least compiled and ran against my usage). I didn't have to upgrade any of the dependencies (not sure if any have actually changed or not though).

I also nudged the closure guys via the forum to see if they will get an official version up in a repo, but from their past comments (mostly with you) they don't seem overly keen. Will see how it goes.

Cheers, zonski

— Reply to this email directly or view it on GitHubhttps://github.com/tomakehurst/spring-closure-templates/issues/3.

— Reply to this email directly or view it on GitHub.

tomakehurst commented 12 years ago

OK, I've merged your changes (and fixed the path problems in the tests).

However, getting the latest GCT into the repo is going to take some effort as it involves organising the files, doing a maven deploy to get them into the right layout, going through the pom and updating the dependency versions, then finally testing it all.

It's probably going to take me a while to get this far. If you need this reasonably urgently, perhaps you could follow the above steps then send me a zip of the result that I can upload?

zonski commented 12 years ago

Thanks for that, nice one. Regarding the GCT upload I thought it would just be a straight upload through your Repo's admin UI? If not, yea, leave it with me and I will sort it out since I need it more than you do. Cheers for your help. Date: Tue, 14 Aug 2012 13:06:40 -0700 From: notifications@github.com To: spring-closure-templates@noreply.github.com CC: danjz@hotmail.com Subject: Re: [spring-closure-templates] Upgrade repo to latest closure-templates library (#3)

OK, I've merged your changes (and fixed the path problems in the tests).

However, getting the latest GCT into the repo is going to take some effort as it involves organising the files, doing a maven deploy to get them into the right layout, going through the pom and updating the dependency versions, then finally testing it all.

It's probably going to take me a while to get this far. If you need this reasonably urgently, perhaps you could follow the above steps then send me a zip of the result that I can upload?

          —

          Reply to this email directly or view it on GitHub.
tomakehurst commented 12 years ago

Yeah, not that simple unfortunately. My repo is just a GitHub gh-pages branch so it's still necessary to lay out the files and commit them. As I mentioned, doing a mvn deploy:deploy-file pointed at your file system is the easiest way.

Also the google zip file doesn't have a pom so you have to make one up.

On Tuesday, 14 August 2012, zonski wrote:

Thanks for that, nice one. Regarding the GCT upload I thought it would just be a straight upload through your Repo's admin UI? If not, yea, leave it with me and I will sort it out since I need it more than you do. Cheers for your help. Date: Tue, 14 Aug 2012 13:06:40 -0700 From: notifications@github.com <javascript:_e({}, 'cvml', 'notifications@github.com');> To: spring-closure-templates@noreply.github.com <javascript:_e({}, 'cvml', 'spring-closure-templates@noreply.github.com');> CC: danjz@hotmail.com <javascript:_e({}, 'cvml', 'danjz@hotmail.com');> Subject: Re: [spring-closure-templates] Upgrade repo to latest closure-templates library (#3)

OK, I've merged your changes (and fixed the path problems in the tests).

However, getting the latest GCT into the repo is going to take some effort as it involves organising the files, doing a maven deploy to get them into the right layout, going through the pom and updating the dependency versions, then finally testing it all.

It's probably going to take me a while to get this far. If you need this reasonably urgently, perhaps you could follow the above steps then send me a zip of the result that I can upload?

Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/tomakehurst/spring-closure-templates/issues/3#issuecomment-7740248.

zonski commented 12 years ago

So I'm not sure if this will work for you or not, but basically I've just Mavenized the actual google-closure-templates project. Have a look at the attached pom.xml. I've overridden all the default settings so it can handle the directory structure of the GCT project without changing anything, and then I've added all the dependencies. The only one that wasn't up to date in the main repo was args4j-2.0.17, I had to go with args4j-2.0.16. Also, there were a few options for JSR305, I tried the google one first but it seems to be old. The net.sourceforge.findbugs one seems to work (or at least builds and runs with the unit tests). Is this POM enough for you to work with for a build/deploy? I'm thinking that by doing it as a build this way it's better than working off the finished JARs for three reasons: - the process is repeatable (we can just get out the latest code from svn whenever and rerun the build with a new version number). - this POM has all the dependencies in it, so you can leave them out of your spring-gct POM (i.e. transitive), making it easier to update next time as well. - I'm going to send this to the closure template guys and see if I can't talk them into including it in the project directly (alternatively we might be able to just deploy it to sonatype ourselves) I'm pretty sure the Java build is working the same as their ant script. I am definitely missing some steps that they do with their JavaScript (GenerateSoyUtilsEscapingDirectiveCode), so I need to work that out before I can convince them to use the pom. I'm assuming these steps are not needed for spring-gct though (i.e. soyutils.js is not coming from maven?) so we don't need to wait for this. To get it to work you just check out the google-closure-templates code (http://code.google.com/p/closure-templates/source/checkout), then put the attached POM in the root directory of this, you should then be able to build (and deploy) the GCT project using mvn clean install (or deploy). I don't really know how you build the deployment bundle at the moment (mvn deploy?) but I'm assuming you'll be able to sort out that end (let me know if there's something more I need to do or if this approach won't work for you). If you do get this into your repo, let me know and I will update spring-gct to use it and remove the old dependencies. Cheers, Dan

Date: Tue, 14 Aug 2012 13:06:40 -0700 From: notifications@github.com To: spring-closure-templates@noreply.github.com CC: danjz@hotmail.com Subject: Re: [spring-closure-templates] Upgrade repo to latest closure-templates library (#3)

OK, I've merged your changes (and fixed the path problems in the tests).

However, getting the latest GCT into the repo is going to take some effort as it involves organising the files, doing a maven deploy to get them into the right layout, going through the pom and updating the dependency versions, then finally testing it all.

It's probably going to take me a while to get this far. If you need this reasonably urgently, perhaps you could follow the above steps then send me a zip of the result that I can upload?

          —

          Reply to this email directly or view it on GitHub.
tomakehurst commented 12 years ago

Hi,

Did you mean to attach a pom to your last message? It doesn't seem to have made it through.

Tom

zonski commented 12 years ago

It seems I can't attach files here (I did a reply-to-email response before with the attachment).

Here's the POM: https://gist.github.com/3373676

I think a few of those dependencies could be scope=optional (the ant one for example). I'll have a look over the weekend.

Let me know if this POM doesn't make it easy for you to assemble and deploy. I'm happy to do more on it, just need to know what you need.

tomakehurst commented 12 years ago

Hi,

I'm off on holiday in a few days, so I might struggle to figure this out.

The easiest thing for me would be if you were to do the build yourself, then do a mvn deploy:deploy-file specifying a local directory as the target (you can give it a file:// URL), then zip the result of that up and send it. Then all I have to do is unzip it into my git repo, commit and push.

Cheers, Tom

On 16 August 2012 22:11, zonski notifications@github.com wrote:

It seems I can't attach files here (I did a reply-to-email response before with the attachment).

Here's the POM: https://gist.github.com/3373676

I think a few of those dependencies could be scope=optional (the ant one for example). I'll have a look over the weekend.

Let me know if this POM doesn't make it easy for you to assemble and deploy. I'm happy to do more on it, just need to know what you need.

— Reply to this email directly or view it on GitHubhttps://github.com/tomakehurst/spring-closure-templates/issues/3#issuecomment-7799630.

zonski commented 12 years ago

Will do. No worries. I'll get that to you, probably tomorrow. There's no huge rush on this from my end so don't stress if you can't get it uploaded before your holidays - I'm just deploying things into my local repo at the moment so this won't change anything for me. It's just for longer term when this project is worked on by someone else, etc, that it would be good if the public repo worked out of the box.

Date: Thu, 16 Aug 2012 14:14:25 -0700 From: notifications@github.com To: spring-closure-templates@noreply.github.com CC: danjz@hotmail.com Subject: Re: [spring-closure-templates] Upgrade repo to latest closure-templates library (#3)

Hi,

I'm off on holiday in a few days, so I might struggle to figure this out.

The easiest thing for me would be if you were to do the build yourself,

then do a mvn deploy:deploy-file specifying a local directory as the target

(you can give it a file:// URL), then zip the result of that up and send

it. Then all I have to do is unzip it into my git repo, commit and push.

Cheers,

Tom

On 16 August 2012 22:11, zonski notifications@github.com wrote:

It seems I can't attach files here (I did a reply-to-email response before

with the attachment).

Here's the POM: https://gist.github.com/3373676

I think a few of those dependencies could be scope=optional (the ant one

for example). I'll have a look over the weekend.

Let me know if this POM doesn't make it easy for you to assemble and

deploy. I'm happy to do more on it, just need to know what you need.

Reply to this email directly or view it on GitHubhttps://github.com/tomakehurst/spring-closure-templates/issues/3#issuecomment-7799630.

          —

          Reply to this email directly or view it on GitHub.
zonski commented 12 years ago

Does this zip do the job: http://zenjava.com/demo/test/google-closure-templates.zip I've not deployed to a file directory like this before, so if it's not what you need, just let me know what's wrong with it and I'll make another. Note I've used:

com.google.template google-closure-templates AUG-2012 I reckon this is inline with the other google projects (i.e. com.google.template is the package used by gct). Happy to change it back to what you had if you want. Just let me know. Cheers, Dan Date: Thu, 16 Aug 2012 14:14:25 -0700 From: notifications@github.com To: spring-closure-templates@noreply.github.com CC: danjz@hotmail.com Subject: Re: [spring-closure-templates] Upgrade repo to latest closure-templates library (#3) Hi, I'm off on holiday in a few days, so I might struggle to figure this out. The easiest thing for me would be if you were to do the build yourself, then do a mvn deploy:deploy-file specifying a local directory as the target (you can give it a file:// URL), then zip the result of that up and send it. Then all I have to do is unzip it into my git repo, commit and push. Cheers, Tom On 16 August 2012 22:11, zonski notifications@github.com wrote: > It seems I can't attach files here (I did a reply-to-email response before > > with the attachment). > > Here's the POM: https://gist.github.com/3373676 > > I think a few of those dependencies could be scope=optional (the ant one > > for example). I'll have a look over the weekend. > > Let me know if this POM doesn't make it easy for you to assemble and > > deploy. I'm happy to do more on it, just need to know what you need. > > — > > Reply to this email directly or view it on GitHubhttps://github.com/tomakehurst/spring-closure-templates/issues/3#issuecomment-7799630. ``` — Reply to this email directly or view it on GitHub. ```