Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Won't Fix
-
Affects Version/s: 6.2.0 CE M2
-
Fix Version/s: 6.2.0 CE M2
-
Component/s: Tools, Tools > Portal Taglibs
-
Labels:None
-
Similar Issues:
Description
When trying to get the 6.2.0-SNAPSHOT maven artifacts installed locally, when spaces are in the source path, you get the following error:
liferay-portal/
ant -f build-maven.xml install-snapshot-artifacts
....
taglibdoc:
[mkdir] Created dir: d:\dev java\github\liferay\liferay-portal\api\taglibs
[java] Loading and translating 8 Tag Libraries...
[java] com.sun.tlddoc.GeneratorException: javax.xml.transform.TransformerException: java.io.FileNotFoundException:
d:\dev%20java\github\liferay\liferay-portal\util-taglib\..\api\taglibs\index.html (The system cannot find the path speci
fied)
[java] at com.sun.tlddoc.TLDDocGenerator.generate(TLDDocGenerator.java:458)
[java] at com.sun.tlddoc.TLDDoc.main(TLDDoc.java:217)
[java] Caused by: javax.xml.transform.TransformerException: java.io.FileNotFoundException: d:\dev%20java\github\lif
eray\liferay-portal\util-taglib\..\api\taglibs\index.html (The system cannot find the path specified)
[java] at org.apache.xalan.transformer.TransformerImpl.createSerializationHandler(TransformerImpl.java:1218)
[java] at org.apache.xalan.transformer.TransformerImpl.createSerializationHandler(TransformerImpl.java:1060)
[java] at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1268)
[java] at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1251)
[java] at com.sun.tlddoc.TLDDocGenerator.generatePage(TLDDocGenerator.java:1193)
[java] at com.sun.tlddoc.TLDDocGenerator.generatePage(TLDDocGenerator.java:1166)
[java] at com.sun.tlddoc.TLDDocGenerator.generateOverview(TLDDocGenerator.java:1016)
[java] at com.sun.tlddoc.TLDDocGenerator.generate(TLDDocGenerator.java:441)
[java] ... 1 more
[java] Caused by: java.io.FileNotFoundException: d:\dev%20java\github\liferay\liferay-portal\util-taglib\..\api\tag
libs\index.html (The system cannot find the path specified)
[java] at java.io.FileOutputStream.open(Native Method)
[java] at java.io.FileOutputStream.<init>(FileOutputStream.java:194)
[java] at java.io.FileOutputStream.<init>(FileOutputStream.java:84)
[java] at org.apache.xalan.transformer.TransformerImpl.createSerializationHandler(TransformerImpl.java:1197)
[java] ... 8 more
BUILD FAILED
d:\dev java\github\liferay\liferay-portal\build-maven.xml:90: The following error occurred while executing this line:
d:\dev java\github\liferay\liferay-portal\build-maven.xml:72: The following error occurred while executing this line:
d:\dev java\github\liferay\liferay-portal\build-maven.xml:134: The following error occurred while executing this line:
d:\dev java\github\liferay\liferay-portal\util-taglib\build.xml:77: Java returned: 1

I verified that if I move my liferay-portal source to a install path that has no spaces, this command will not fail.
I've done some research and there doesn't seem to be a way for us to santize paths on our end. It appears to be a bug in the TLDDoc class itself. I'm proposing that we fix this by copying taglibs to a system temp dir (which don't have spaces in path generally) and then performing the TLDDoc command and then copying it back to original output directory and deleting the temp folder.