Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Problems with Tycho 0.20.0, Windows 7 and File.createTempFile(...)

might be related to


we changed from plexus-utils to commons-exec to fork the test process in 0.20.0.

Not sure but might be a regression w.r.t. env variables being inherited to the forked test process.


Any chance you are explicitly setting other env variables using [1]?

You could try explicitly setting TEMP or TMP as surefire environmentVariables in pom.xml to see if that changes the behaviour.











From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Tonny Madsen
Sent: Mittwoch, 2. April 2014 09:55
To: Tycho user list
Subject: [tycho-user] Problems with Tycho 0.20.0, Windows 7 and File.createTempFile(...)


I have just encountered a problem with our build on a particular build configuration and before I dive too deep into this, I wondered if anybody else have seen it as well.


In one of out JUnit tests we create a local temporary file with File.createTempFile("TestPrefix", "", null), which means Java should create a file with the specified prefix and extension in the default temporary directory. This works fine with all build configuration, except for the combination Tycho 0.20.0 and Windows 7 in which case it tries to create the file in either the root folder (c:\) or the Windows system folder (c:\Windows\), both of which fails with the error


ERROR: Cannot create a default folder [EXCEPTION: Access is denied]

        at Method)



The test succeeds with following build combinations


- Tycho 0.20.0 under Windows Server 2008

- Tycho 0.20.0 under MacOSX

- Tycho 0.19.0 under Windows 7

- Tycho 0.20.0 under Windows 7 with administrative rights


It does not matter whether we set TMP, TEMP or similar environment variables. These seems to be overruled by the launcher somehow.

It does matter if we add to the surefire arguments.


I can see that there have seen some changes in sisu-equinox-launching to Tycho 0.20.0, but I have not yet tried to debug the issue.


Has anybody else seen this problem? Are there anything obvious I might have done wrong?




Tonny Madsen

My profiles: LinkedIn Twitter Blogger SlideShare

Back to the top