On 17/05/2011, at 4:35 PM, 敖小剑 wrote:

> 
> Thanks, when I turn to use installApp, it works.
> 
> Seems the userguide is not update for this upgrade, both the online userguide 
> and the one in the distribution zip file of 1.0-milestone-3.

This is fixed now.

> 
> ---------------
> 
> And another question about it:
> 
> installApp {
>     from 'src/main/conf'
> }
> 
> This works well but it copies only the files in  src/main/conf , not the 
> directory" src/main/conf" itself. I checked the userguide about the copy task 
> that this is a feature of the copy task, not a bug or something. So I change 
> to add a "src/main/app" directory and move conf to under it. Yeah, perhaps 
> later I will have move files or directory which need to copy. For example, a 
> empty directory logs for log4j to avoid error the logs dir is not exists.

You could also do something like:

installApp {
    from('src/main/conf') {
       into 'conf
   }


> 
> It seems wonderful, but the same solution failed in task distZip:
> 
> distZip {
>       from 'src/main/app'
> }
> 
> The generated zip file is like this:
> 
> gradleDemoApp.zip
>     -- conf
>     --  gradleDemoApp
>             -- lib
>             ---bin
> The zip task add a new directory in the zip file and it doesn't work for the 
> additional "from" property. I know I can add additional script to add the 
> files to correct position. But for the distZip task, it seems a small bug ? 

I think so. Could you add a jira issue for this?


--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com

Reply via email to