Project work directory now shared in 2.1.0 - how to revert back?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Project work directory now shared in 2.1.0 - how to revert back?

dalew75
In 1.3.7, each project's work directory would end up in $HOME/.grails/1.3.7/projects, using the actual folder name of the checked out project.

So if I had a project called 'foo', and the application.name was 'foo' and the version was 1.1 (in application.properties), but the actual folder it was checked out in was 'foo-1.1-freshcopy', then the work files would go in:
$HOME/.grails/1.3.7/projects/foo-1.1-freshcopy

But now in Grails 2.1.0 it just uses the application (not even version #) name only, so it goes in:
$HOME/.grails/1.3.7/projects/foo

This is causing a lot of issues with plugins and compiled classes between different versions of our same product.  Is it possible to get it back to the old way?  I've been searching for this, but haven't found it.

I know you can specify the grails.work.dir, but I'm not sure how to get at the behavior I'm looking for.
Dale Wiggins
Architect/Developer
StudentUniverse
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Project work directory now shared in 2.1.0 - how to revert back?

johnrengelman
You can set grails.project.work.dir in your ~/.grails/settings.groovy file to be something relative to the project.
For example I do this:

grails.project.work.dir = "target"

That puts all the information that typically gets stored in ~/.grails/1.3.7/projects/foo into
foo/targets instead (into the target directory beneath the application root)

--
John

On Thursday, August 16, 2012 at 6:30 AM, dalew75 wrote:

In 1.3.7, each project's work directory would end up in
$HOME/.grails/1.3.7/projects, using the actual folder name of the checked
out project.

So if I had a project called 'foo', and the application.name was 'foo' and
the version was 1.1 (in application.properties), but the actual folder it
was checked out in was 'foo-1.1-freshcopy', then the work files would go in:
$HOME/.grails/1.3.7/projects/foo-1.1-freshcopy

But now in Grails 2.1.0 it just uses the application (not even version #)
name only, so it goes in:
$HOME/.grails/1.3.7/projects/foo

This is causing a lot of issues with plugins and compiled classes between
different versions of our same product. Is it possible to get it back to
the old way? I've been searching for this, but haven't found it.

I know you can specify the grails.work.dir, but I'm not sure how to get at
the behavior I'm looking for.



-----
Dale Wiggins
Architect/Developer
StudentUniverse
--
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Project work directory now shared in 2.1.0 - how to revert back?

alxndrsn
On 16 August 2012 16:00, John Engelman <[hidden email]> wrote:

> You can set grails.project.work.dir in your ~/.grails/settings.groovy file
> to be something relative to the project.
> For example I do this:
>
> grails.project.work.dir = "target"
>
> That puts all the information that typically gets stored in
> ~/.grails/1.3.7/projects/foo into
> foo/targets instead (into the target directory beneath the application root)
>

Nice tip, John - looks like a much nicer default to me.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Project work directory now shared in 2.1.0 - how to revert back?

pmcneil
In reply to this post by dalew75
Ah that might be what's breaking file upload then

On 16/08/12 21:30, dalew75 wrote:

> In 1.3.7, each project's work directory would end up in
> $HOME/.grails/1.3.7/projects, using the actual folder name of the checked
> out project.
>
> So if I had a project called 'foo', and the application.name was 'foo' and
> the version was 1.1 (in application.properties), but the actual folder it
> was checked out in was 'foo-1.1-freshcopy', then the work files would go in:
> $HOME/.grails/1.3.7/projects/foo-1.1-freshcopy
>
> But now in Grails 2.1.0 it just uses the application (not even version #)
> name only, so it goes in:
> $HOME/.grails/1.3.7/projects/foo
>
> This is causing a lot of issues with plugins and compiled classes between
> different versions of our same product.  Is it possible to get it back to
> the old way?  I've been searching for this, but haven't found it.
>
> I know you can specify the grails.work.dir, but I'm not sure how to get at
> the behavior I'm looking for.
>
>
>
> -----
> Dale Wiggins
> Architect/Developer
> StudentUniverse
> --
> View this message in context: http://grails.1312388.n4.nabble.com/Project-work-directory-now-shared-in-2-1-0-how-to-revert-back-tp4633299.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>      http://xircles.codehaus.org/manage_email
>

--
web: http://nerderg.com
Twitter: http://twitter.com/pmcneil


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Project work directory now shared in 2.1.0 - how to revert back?

pledbrook
In reply to this post by johnrengelman
> You can set grails.project.work.dir in your ~/.grails/settings.groovy file
> to be something relative to the project.
> For example I do this:
>
> grails.project.work.dir = "target"

I would even suggest

    grails.project.work.dir = "target/$grailsVersion"

This solves a problem with some of the global commands (like
create-app) when used with different versions of Grails in the same
directory.

Peter

--
Peter Ledbrook
Developer Advocate
VMware

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Loading...