Changing the default schema for naming archive tasks

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Changing the default schema for naming archive tasks

hans_d
Administrator
Hi all,

right now the default name for archive tasks contains the project  
name. This doesn't really has any benefits and makes the build script  
more brittle against name changes.

For our next release we want to implement a different schema and just  
use the constant 'archive' as the basename (e.g. archive_war, archive-
src_zip, ...)

Any comments are welcome.

See also: http://jira.codehaus.org/browse/GRADLE-142

- Hans

--
Hans Dockter
Gradle Project lead
http://www.gradle.org





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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Changing the default schema for naming archive tasks

Marko Bauhardt-3
this would be nice. because i ran into problems if my project name  
contains a dash. e.g. "my-project"
in this case i cant execute

my-project_zip.doFirst {
}


So i'm sure i use the wrong syntax and it exists a simple solution  
todo this above. but if we use

archive_zip.doFirst {
}

i dont have this problem and second we have no changes todo in the  
build script if a project name will be renamed.

marko




On Jul 6, 2008, at 8:33 AM, Hans Dockter wrote:

> Hi all,
>
> right now the default name for archive tasks contains the project  
> name. This doesn't really has any benefits and makes the build  
> script more brittle against name changes.
>
> For our next release we want to implement a different schema and  
> just use the constant 'archive' as the basename (e.g. archive_war,  
> archive-src_zip, ...)
>
> Any comments are welcome.
>
> See also: http://jira.codehaus.org/browse/GRADLE-142
>
> - Hans
>
> --
> Hans Dockter
> Gradle Project lead
> http://www.gradle.org
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>


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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Changing the default schema for naming archive tasks

hans_d
Administrator
Hi Marko,

On Jul 7, 2008, at 10:04 AM, Marko Bauhardt wrote:

> this would be nice. because i ran into problems if my project name  
> contains a dash. e.g. "my-project"
> in this case i cant execute
>
> my-project_zip.doFirst {
> }

You could do: "my-project_zip".doFirst {
}

>
>
> So i'm sure i use the wrong syntax and it exists a simple solution  
> todo this above. but if we use
>
> archive_zip.doFirst {
> }
>
> i dont have this problem and second we have no changes todo in the  
> build script if a project name will be renamed.

Right.

- Hans

>
> marko
>
>
>
>
> On Jul 6, 2008, at 8:33 AM, Hans Dockter wrote:
>
>> Hi all,
>>
>> right now the default name for archive tasks contains the project  
>> name. This doesn't really has any benefits and makes the build  
>> script more brittle against name changes.
>>
>> For our next release we want to implement a different schema and  
>> just use the constant 'archive' as the basename (e.g. archive_war,  
>> archive-src_zip, ...)
>>
>> Any comments are welcome.
>>
>> See also: http://jira.codehaus.org/browse/GRADLE-142
>>
>> - Hans
>>
>> --
>> Hans Dockter
>> Gradle Project lead
>> http://www.gradle.org
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>   http://xircles.codehaus.org/manage_email
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

--
Hans Dockter
Gradle Project lead
http://www.gradle.org





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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Changing the default schema for naming archive tasks

Marko Bauhardt-3

On Jul 7, 2008, at 10:08 AM, Hans Dockter wrote:

> Hi Marko,
>
> On Jul 7, 2008, at 10:04 AM, Marko Bauhardt wrote:
>
>> this would be nice. because i ran into problems if my project name  
>> contains a dash. e.g. "my-project"
>> in this case i cant execute
>>
>> my-project_zip.doFirst {
>> }
>
> You could do: "my-project_zip".doFirst {
> }
>
>>

i tried this:

"my-project_zip".doFirst {
   ....
}

this exception occurs:

groovy.lang.MissingMethodException: No signature of method:  
java.lang.String.doFirst() is applicable for argument types:  
(build_gradle$_run_closure5) values: {build_gradle$_run_closure5@120ba9}
         at  
org
.codehaus
.groovy
.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:54)


marko


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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Changing the default schema for naming archive tasks

hans_d
Administrator

On Jul 7, 2008, at 10:25 AM, Marko Bauhardt wrote:

>
> On Jul 7, 2008, at 10:08 AM, Hans Dockter wrote:
>
>> Hi Marko,
>>
>> On Jul 7, 2008, at 10:04 AM, Marko Bauhardt wrote:
>>
>>> this would be nice. because i ran into problems if my project  
>>> name contains a dash. e.g. "my-project"
>>> in this case i cant execute
>>>
>>> my-project_zip.doFirst {
>>> }
>>
>> You could do: "my-project_zip".doFirst {
>> }
>>
>>>
>
> i tried this:
>
> "my-project_zip".doFirst {
>   ....
> }
>
> this exception occurs:
>
> groovy.lang.MissingMethodException: No signature of method:  
> java.lang.String.doFirst() is applicable for argument types:  
> (build_gradle$_run_closure5) values: {build_gradle
> $_run_closure5@120ba9}
>         at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap
> (ScriptBytecodeAdapter.java:54)
>
>

Strange.

What happens if you do: task("my-project_zip").doFirst {}?

- Hans

> marko
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

--
Hans Dockter
Gradle Project lead
http://www.gradle.org





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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Changing the default schema for naming archive tasks

Marko Bauhardt-3
>>
>> i tried this:
>>
>> "my-project_zip".doFirst {
>>  ....
>> }
>>
>> this exception occurs:
>>
>> groovy.lang.MissingMethodException: No signature of method:  
>> java.lang.String.doFirst() is applicable for argument types:  
>> (build_gradle$_run_closure5) values: {build_gradle
>> $_run_closure5@120ba9}
>>        at  
>> org
>> .codehaus
>> .groovy
>> .runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:54)
>>
>>
>
> Strange.
>
> What happens if you do: task("my-project_zip").doFirst {}?
>


Ah. Thanks. This works! :)

marko



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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Changing the default schema for naming archive tasks

hans_d
Administrator
In reply to this post by hans_d
By the way:

On Jul 6, 2008, at 8:33 AM, Hans Dockter wrote:

> Hi all,
>
> right now the default name for archive tasks contains the project  
> name. This doesn't really has any benefits and makes the build  
> script more brittle against name changes.
>
> For our next release we want to implement a different schema and  
> just use the constant 'archive' as the basename (e.g. archive_war,  
> archive-src_zip, ...)

You can achieve this already with the current release if you set at  
the begining of the build script (before usePlugin is called):

archivesBaseName = 'archive'

- Hans

--
Hans Dockter
Gradle Project lead
http://www.gradle.org





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

    http://xircles.codehaus.org/manage_email