[
https://issues.apache.org/jira/browse/OODT-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980261#action_12980261
]
Paul Ramirez commented on OODT-110:
-----------------------------------
You could try setting the java.io.tmpdir when building. This should be as easy
as adding the following on the command line:
-Djava.io.tmpdir=C:\mydir
This will not resolve the "chmod +x" issue as I'm not sure File object in Java
had a setExecutable until 1.6.
That said if you wish to build and skip unit tests you can pass
-DskipTests=true and that will stop maven from running the unit tests. This is
only a work around.
> TestExternMetExtractor fails if temp directory is mounted noexec
> ----------------------------------------------------------------
>
> Key: OODT-110
> URL: https://issues.apache.org/jira/browse/OODT-110
> Project: OODT
> Issue Type: Bug
> Components: build proces
> Affects Versions: 0.2
> Environment: Linux with Sun JDK 6 and /tmp mounted with noexec option
> Reporter: Scott Konzem
>
> The setup() method in the test class
> org.apache.oodt.cas.metadata.extractors.TestExternMetExtractor writes an
> executable file to the default Java temp directory, which on my system is
> /tmp. For security reasons, /tmp on my system has been mounted noexec,
> meaning no files on this partition can be executed (for the most part). When
> the testExtractor() method then tries to run the executable, it causes a test
> failure that prevents me from moving further in the build process. That's as
> far as I've gotten with installation, so I don't know if this is how the
> program would work in production. The output is as follows:
> Running org.apache.oodt.cas.metadata.extractors.TestExternMetExtractor
> Jan 11, 2011 8:15:58 AM
> org.apache.oodt.cas.metadata.extractors.ExternMetExtractor extrMetadata
> INFO: Generating met file for product file:
> [/tmp/metadata5254850749474468821.tests/testfile.txt]
> Jan 11, 2011 8:15:58 AM
> org.apache.oodt.cas.metadata.extractors.ExternMetExtractor extrMetadata
> INFO: Executing command line:
> [/tmp/metadata5254850749474468821.tests/testExtractor
> /tmp/metadata5254850749474468821.tests/testfile.txt
> /tmp/metadata5254850749474468821.tests/testfile.txt.met -Dtrue=always foo bar
> /home/scott/test\ boo ] with workingDir:
> [/tmp/metadata5254850749474468821.tests] to extract metadata
> Jan 11, 2011 8:15:58 AM
> org.apache.oodt.cas.metadata.extractors.ExternMetExtractor extrMetadata
> WARNING: IOException running met extraction: commandLine:
> [/tmp/metadata5254850749474468821.tests/testExtractor
> /tmp/metadata5254850749474468821.tests/testfile.txt
> /tmp/metadata5254850749474468821.tests/testfile.txt.met -Dtrue=always foo bar
> /home/scott/test\ boo ]: Message: Cannot run program
> "/tmp/metadata5254850749474468821.tests/testExtractor" (in directory
> "/tmp/metadata5254850749474468821.tests"): java.io.IOException: error=13,
> Permission denied
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.387 sec <<<
> FAILURE!
> I'd also note that
> org.apache.oodt.cas.metadata.extractors.TestExternMetExtractor.setup() runs a
> "chmod +x" on the temp executable file. This means the test will likely fail
> on a non-*nix system and halt the build process. The associated comment in
> the code is "yes this is ghetto" (line 123).
> I'm not sure if it's possible to change Java's temp directory with an
> environment variable; so far the only way I've found to change it is by
> setting -Djava.io.tmpdir. See
> http://stackoverflow.com/questions/1924136/environment-variable-to-control-java-io-tmpdir
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.