You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "SebbASF (JIRA)" <ji...@codehaus.org> on 2010/08/16 16:45:32 UTC
[jira] Created: (SUREFIRE-638) Plugin cannot handle "java" in a
path name
Plugin cannot handle "java" in a path name
------------------------------------------
Key: SUREFIRE-638
URL: http://jira.codehaus.org/browse/SUREFIRE-638
Project: Maven Surefire
Issue Type: Bug
Components: Maven Surefire Plugin
Affects Versions: 2.6, 2.5, 2.4.3
Reporter: SebbASF
Priority: Critical
See SUREFIRE-536
================
Commons SCXML had the following include:
<include>org/apache/commons/scxml/env/javascript/EnvJavaScriptTestSuite.java</include>
However, the suite was not being found and executed.
A bit of experimentation showed that the problem is the string "java" in the pathname.
A work-round is to use:
<include>org/apache/commons/scxml/env/j*avascript/EnvJavaScriptTestSuite.java</include>
or
<include>org/apache/commons/scxml/env/jav*ascript/EnvJavaScriptTestSuite.java</include>
or
<include>org/apache/commons/scxml/env/*/EnvJavaScriptTestSuite.java</include>
etc.
This appears to be due to the following code in SurefireDirectoryScanner.processIncludesExcludes():
incs[i] = StringUtils.replace( (String) list.get( i ), "java", "class" );
Changing this to
incs[i] = StringUtils.replace( (String) list.get( i ), ".java", ".class" );
would be better than nothing, however that would still fail on a directory name that contains ".java" (perhaps not very likely).
What is really needed is to only replace the ".java" if it appears at the end of the string.
--
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
[jira] Updated: (SUREFIRE-638) Plugin cannot handle "java" in a
path name
Posted by "Stevo Slavic (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stevo Slavic updated SUREFIRE-638:
----------------------------------
Attachment: org.apache.maven.surefire.surefire-SUREFIRE-638.patch
Here is the patch (org.apache.maven.surefire.surefire-SUREFIRE-638.patch) with a fix. Existing unit test has been adjusted and related test data extended to cover this case.
> Plugin cannot handle "java" in a path name
> ------------------------------------------
>
> Key: SUREFIRE-638
> URL: http://jira.codehaus.org/browse/SUREFIRE-638
> Project: Maven Surefire
> Issue Type: Bug
> Components: Maven Surefire Plugin
> Affects Versions: 2.4.3, 2.5, 2.6
> Reporter: SebbASF
> Priority: Critical
> Attachments: org.apache.maven.surefire.surefire-SUREFIRE-638.patch, surefire-638.zip
>
>
> See SUREFIRE-536
> ================
> Commons SCXML had the following include:
> <include>org/apache/commons/scxml/env/javascript/EnvJavaScriptTestSuite.java</include>
> However, the suite was not being found and executed.
> A bit of experimentation showed that the problem is the string "java" in the pathname.
> A work-round is to use:
> <include>org/apache/commons/scxml/env/j*avascript/EnvJavaScriptTestSuite.java</include>
> or
> <include>org/apache/commons/scxml/env/jav*ascript/EnvJavaScriptTestSuite.java</include>
> or
> <include>org/apache/commons/scxml/env/*/EnvJavaScriptTestSuite.java</include>
> etc.
> This appears to be due to the following code in SurefireDirectoryScanner.processIncludesExcludes():
> incs[i] = StringUtils.replace( (String) list.get( i ), "java", "class" );
> Changing this to
> incs[i] = StringUtils.replace( (String) list.get( i ), ".java", ".class" );
> would be better than nothing, however that would still fail on a directory name that contains ".java" (perhaps not very likely).
> What is really needed is to only replace the ".java" if it appears at the end of the string.
--
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
[jira] Updated: (SUREFIRE-638) Plugin cannot handle "java" in a
path name
Posted by "SebbASF (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
SebbASF updated SUREFIRE-638:
-----------------------------
Attachment: surefire-638.zip
Sample project showing the problem
> Plugin cannot handle "java" in a path name
> ------------------------------------------
>
> Key: SUREFIRE-638
> URL: http://jira.codehaus.org/browse/SUREFIRE-638
> Project: Maven Surefire
> Issue Type: Bug
> Components: Maven Surefire Plugin
> Affects Versions: 2.4.3, 2.5, 2.6
> Reporter: SebbASF
> Priority: Critical
> Attachments: surefire-638.zip
>
>
> See SUREFIRE-536
> ================
> Commons SCXML had the following include:
> <include>org/apache/commons/scxml/env/javascript/EnvJavaScriptTestSuite.java</include>
> However, the suite was not being found and executed.
> A bit of experimentation showed that the problem is the string "java" in the pathname.
> A work-round is to use:
> <include>org/apache/commons/scxml/env/j*avascript/EnvJavaScriptTestSuite.java</include>
> or
> <include>org/apache/commons/scxml/env/jav*ascript/EnvJavaScriptTestSuite.java</include>
> or
> <include>org/apache/commons/scxml/env/*/EnvJavaScriptTestSuite.java</include>
> etc.
> This appears to be due to the following code in SurefireDirectoryScanner.processIncludesExcludes():
> incs[i] = StringUtils.replace( (String) list.get( i ), "java", "class" );
> Changing this to
> incs[i] = StringUtils.replace( (String) list.get( i ), ".java", ".class" );
> would be better than nothing, however that would still fail on a directory name that contains ".java" (perhaps not very likely).
> What is really needed is to only replace the ".java" if it appears at the end of the string.
--
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
[jira] Closed: (SUREFIRE-638) Plugin cannot handle "java" in a path
name
Posted by "Stephen Connolly (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stephen Connolly closed SUREFIRE-638.
-------------------------------------
Resolution: Fixed
Fix Version/s: 2.7
r986189
> Plugin cannot handle "java" in a path name
> ------------------------------------------
>
> Key: SUREFIRE-638
> URL: http://jira.codehaus.org/browse/SUREFIRE-638
> Project: Maven Surefire
> Issue Type: Bug
> Components: Maven Surefire Plugin
> Affects Versions: 2.4.3, 2.5, 2.6
> Reporter: SebbASF
> Priority: Critical
> Fix For: 2.7
>
> Attachments: org.apache.maven.surefire.surefire-SUREFIRE-638.patch, surefire-638.zip
>
>
> See SUREFIRE-536
> ================
> Commons SCXML had the following include:
> <include>org/apache/commons/scxml/env/javascript/EnvJavaScriptTestSuite.java</include>
> However, the suite was not being found and executed.
> A bit of experimentation showed that the problem is the string "java" in the pathname.
> A work-round is to use:
> <include>org/apache/commons/scxml/env/j*avascript/EnvJavaScriptTestSuite.java</include>
> or
> <include>org/apache/commons/scxml/env/jav*ascript/EnvJavaScriptTestSuite.java</include>
> or
> <include>org/apache/commons/scxml/env/*/EnvJavaScriptTestSuite.java</include>
> etc.
> This appears to be due to the following code in SurefireDirectoryScanner.processIncludesExcludes():
> incs[i] = StringUtils.replace( (String) list.get( i ), "java", "class" );
> Changing this to
> incs[i] = StringUtils.replace( (String) list.get( i ), ".java", ".class" );
> would be better than nothing, however that would still fail on a directory name that contains ".java" (perhaps not very likely).
> What is really needed is to only replace the ".java" if it appears at the end of the string.
--
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