[ http://jira.codehaus.org/browse/MSUREFIRE-2?page=all ]
Maria Odea Ching moved MNG-1711 to MSUREFIRE-2: ----------------------------------------------- Version: (was: 2.0) Component: (was: maven-surefire-plugin) Workflow: jira (was: Maven) Key: MSUREFIRE-2 (was: MNG-1711) Project: Maven 2.x Surefire Plugin (was: Maven 2) > Tests Using Relative Paths Fail From Parent - Absolute Paths are Non-portable > ----------------------------------------------------------------------------- > > Key: MSUREFIRE-2 > URL: http://jira.codehaus.org/browse/MSUREFIRE-2 > Project: Maven 2.x Surefire Plugin > Type: Bug > Environment: Code base and repository on Unix. Build from Windows and Unix. > Reporter: Mike Whittemore > Assignee: Brett Porter > > > Tests in a child project fail to find files via relative path if they are run > from a parent project, as the "basedir" of the child evaluates to the project > where "mvn test" is run from. For example, a child project with a "test-data" > directory in its base dir might have a unit test that loads a data file: new > File("test-data/data1.xml"). Running "mvn test" from that child project's > basedir works fine. If "mvn test" is run from the parent directory (which has > no test-data directory in this example), the child project's test cannot find > the file. This was not a problem with Maven 1. According to closed issue > MNG-1570, this will not be fixed. One workaround is to use an aboslute path > in the test file. Unfortunately, this instantly makes it non-portable, i.e. > the test cannot be run from both windows and unix (as we routinely do on my > software project). There are ugly workarounds available to the test > develoeprs, but I request the Maven 1 behavior be added to Maven 2 so they > are not necessary. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]