Hans Huber created CB-7198:
------------------------------
Summary: Build fails when"*/bin/*" folder is used in Project-Path
Key: CB-7198
URL: https://issues.apache.org/jira/browse/CB-7198
Project: Apache Cordova
Issue Type: Bug
Components: Android
Affects Versions: 3.5.0, 3.4.0
Reporter: Hans Huber
Priority: Minor
"$ cordova build" exists with:
{noformat}
-pre-compile:
[echo] Set jars path to:
C:\ant-build\phonegap\test3\hello\platforms\android\CordovaLib\ant-build\classes.jar
-compile:
[javac] Compiling 3 source files to
C:\bin\phonegap\test3\hello\platforms\android\ant-build\classes
[javac]
C:\bin\phonegap\test3\hello\platforms\android\src\com\example\hello\HelloWorld.java:23:
error: package org.apache.cordova does not exist
[javac] import org.apache.cordova.*;
[javac] ^
[javac]
C:\bin\phonegap\test3\hello\platforms\android\src\com\example\hello\HelloWorld.java:25:
error: cannot find symbol
[javac] public class HelloWorld extends CordovaActivity
[javac] ^
<...>
{noformat}
Reason:
bin/templates/project/custom_rules.xml:
{noformat}
....
<pathconvert property="fixedJarsPath" refid="project.all.jars.path">
<filtermapper>
***** <replacestring from="/bin/" to="/ant-build/"/>
***** <replacestring from="\bin\" to="\ant-build\"/>
</filtermapper>
</pathconvert>
<path id="project.all.jars.path">
<pathelement path="${fixedJarsPath}"/>
</path>
<echo message="Set jars path to: ${toString:project.all.jars.path}"/>
....
{noformat}
Fix:
The replace string is just to basic. There should be a file-path exists check
or a correct error message should be shown during build process.
Best Regards
Tobias
--
This message was sent by Atlassian JIRA
(v6.2#6252)