[jbosscache-dev] AOPC Ant task and tmp directories
Kabir Khan
kabir.khan at jboss.com
Tue Feb 27 17:35:09 EST 2007
I have a feeling I may have screwed up the original snapshot so I have
updated it again
Kabir Khan wrote:
> I was using deleteOnExit() but that did not seem to do anything. I have
> made AOPC delete the file on exit
>
> Manik Surtani wrote:
>>
>> On 27 Feb 2007, at 16:49, Ryan Campbell wrote:
>>
>>> >Probably caused by QA locking down /tmp:
>>>
>>> Actually /tmp is not locked down. It is likely that someone else ran
>>> this test before you, and the test did not clean up after itself.
>>> Ergo, you are unable to overwrite their file because they own it.
>>
>> Well, see my attempts at "touch /tmp/test.file" further below ... :-)
>>
>>>
>>> Tests should not write to tmp, or even java.io.tmpdir. Tests should
>>> write to output/tmp or whatever directory under their build output
>>> they desire. Additionally, tests should be careful to clean up
>>> things like temporary files during tearDown() so that developers do
>>> not see invalid results across multiple runs in their own environment.
>>
>> I agree. This is basically something in the aopc Ant task that will
>> need fixing. It has nothing to do with unit tests, this happens when
>> building pojocache.
>>
>> Cheers,
>> Manik
>>
>>
>>>
>>> Manik Surtani wrote:
>>>> Guys,
>>>>
>>>> I'm seeing something with the AOPC ant task when running on the lab
>>>> servers (dev02). It seems to hardcode using /tmp as a temp
>>>> directory rather than java.io.tmpdir (which i've set to
>>>> /home/msurtani/tmp in the example below).
>>>>
>>>> java.lang.RuntimeException: java.io.IOException: Permission denied
>>>> at
>>>> org.jboss.aop.ant.AopC.logAndAddFilesToCompile(AopC.java:488)
>>>> at org.jboss.aop.ant.AopC.execute(AopC.java:328)
>>>> at
>>>> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>>>> at org.apache.tools.ant.Task.perform(Task.java:364)
>>>> at org.apache.tools.ant.Target.execute(Target.java:341)
>>>> at org.apache.tools.ant.Target.performTasks(Target.java:369)
>>>> at
>>>> org.apache.tools.ant.Project.executeTarget(Project.java:1214)
>>>> at
>>>> org.apache.tools.ant.Project.executeTargets(Project.java:1062)
>>>> at org.apache.tools.ant.Main.runBuild(Main.java:673)
>>>> at org.apache.tools.ant.Main.startAnt(Main.java:188)
>>>> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
>>>> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
>>>> Caused by: java.io.IOException: Permission denied
>>>> at java.io.UnixFileSystem.createFileExclusively(Native Method)
>>>> at java.io.File.checkAndCreate(File.java:1345)
>>>> at java.io.File.createTempFile(File.java:1434)
>>>> at java.io.File.createTempFile(File.java:1471)
>>>> at
>>>> org.jboss.aop.ant.AopC.logAndAddFilesToCompile(AopC.java:457)
>>>> ... 11 more
>>>>
>>>> Probably caused by QA locking down /tmp:
>>>>
>>>> [msurtani at dev02 JBossCache200]$ touch /tmp/test.file
>>>> touch: creating `/tmp/test.file': Permission denied
>>>> [msurtani at dev02 JBossCache200]$
>>>>
>>>> Any plans to change this?
>>>>
>>>> Cheers,
>>>> --Manik Surtani
>>>>
>>>> Lead, JBoss Cache
>>>> JBoss, a division of Red Hat
>>>>
>>>> Email: manik at jboss.org
>>>> Telephone: +44 7786 702 706
>>>> MSN: manik at surtani.org
>>>> Yahoo/AIM/Skype: maniksurtani
>>>>
>>>>
>>>> _______________________________________________
>>>> jbosscache-dev mailing list
>>>> jbosscache-dev at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/jbosscache-dev
>>>>
>>>>
>>>
>>>
>>
>> --
>> Manik Surtani
>>
>> Lead, JBoss Cache
>> JBoss, a division of Red Hat
>>
>> Email: manik at jboss.org
>> Telephone: +44 7786 702 706
>> MSN: manik at surtani.org
>> Yahoo/AIM/Skype: maniksurtani
>>
>>
>
> _______________________________________________
> jbosscache-dev mailing list
> jbosscache-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jbosscache-dev
More information about the jbosscache-dev
mailing list