I guess I was the one that was premature.
After trying several more things including breaking down into the withXml
closure I decided there has to be something else going on. So I reverted
back to using this
eclipseProject.buildCommand 'com.example.new.BuildCommand'
and then I did a gradle -C rebuild cleanEclipse and the re ran gradle
eclipse and everything works.
I think the problem has something to do with the .project file being empty
before the eclipse task is executed.
Jas
On Wed, Aug 31, 2011 at 12:55 PM, Jason Hatton <[email protected]> wrote:
> Update:
>
> I did try project.eclipseProject.buildCommands = [new
> BuildCommand('com.example.new.BuildCommand', [:])]
>
> Just in case and that didn't change anything.
>
>
> On Wed, Aug 31, 2011 at 12:46 PM, Jason Hatton <[email protected]>wrote:
>
>> I am trying to add a couple buildCommands to the .project file by with my
>> own Plugin class:
>>
>>
>> class NewPlugin implements Plugin<Project> {
>> def void apply(Project project) {
>> project.eclipseProject.buildCommands = [new
>> BuildCommand('com.example.new.BuildCommand')]
>> }
>> }
>>
>> I am getting a SAXParseException: Premature end of file.
>>
>> I imagine either I am doing something wrong or I have run into a bug.
>>
>> Thanks for any help,
>> Jas
>>
>>
>>
>