On Windows, XDoclet plugin fails in building CMS Tag Library
------------------------------------------------------------

                 Key: MAGNOLIA-3076
                 URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-3076
             Project: Magnolia
          Issue Type: Bug
          Components: build
         Environment: Windows XP Professional 2002, Service Pack 3
            Reporter: Diego Schivo
            Assignee: Grégory Joseph
         Attachments: build-error.txt, build-error2.txt, QDoxPlugin.patch

See attachment: build-error.txt.
The problem was already discussed in the user mailing list 
(http://www.mail-archive.com/[email protected]/msg01734.html).

The problematic setting is in trunk/pom.xml:
{code}
<restrictedpath>file://${settings.localRepository}</restrictedpath>
{code}

I think the prefix "file://" is system-dependent, because method 
QDoxPlugin.setRestrictedpath() [qdox-1.9.jar] uses the "restrictedpath" value 
as a file location (not an URL):
{code}
String f = new File(folder).getCanonicalPath();
{code}

So, fore example, in windows:
- new File("C:/windows").getCanonicalPath() - OK
- new File(new URL("file:///C:/windows").getFile()).getCanonicalPath() - OK
- new File("file:///C:/windows").getCanonicalPath() - KO

Removing the prefix "file://" does not help, because a similar error occurs a 
bit later: see build-error2.txt.
This second error occurs because Maven2SourceProvider.getURLs() 
[maven2-xdoclet2-plugin.jar] returns a list of urls in the form of:
{code}
jar:file:/E:/magnolia/repository/info/magnolia/magnolia-taglib-cms/4.3-SNAPSHOT/magnolia-taglib-cms-4.3-SNAPSHOT-sources.jar!/info/magnolia/cms/util/Resource.java
{code}
where "jar" is considered as the protocol, and "file:/..." as the file.
So QDoxPlugin.inRestrictedFolder() passes 
javaClass.getSource().getURL().getFile() to Plugin.isIn(), which again calls 
File.getCanonicalPath() on files starting with "file://".

I fixed the problem on my windows environment by rebuilding generama-1.2.4.jar 
with a patched QDoxPlugin class (also attached).


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to