-
1. Re: Exploded web archive - or how to access files in Arquillian
kpiwko Mar 2, 2011 11:22 AM (in response to mausbull)1 of 1 people found this helpfulHi Stephan,
1/ It is not possible at the moment
2/ Maybe I missed your point with including a file into WAR, but from your test you can access files using relative path to the directory where you are running them, for instance with Maven
mvn test
you can access files using relative paths such as "src/test/resources/foo.bar".
For accessing files in WAR, I would suggest using container related means, such as VFS for JBoss AS.
If you want to solve absolute path problem by a quick workaround, you can pass path as a System property and let Surefire (your test system) populate it with absolute path based on project ${basedir}.
-
2. Exploded web archive - or how to access files in Arquillian
mausbull Mar 4, 2011 5:01 AM (in response to kpiwko)Hi Karel,
thanks for your reply.
I'm now using the File.createTempFile method to create a new file and write the content of the file I've included in the WAR into that tmp file. So far this strategy works pretty good.