[MAGNOLIA-3076] On Windows, XDoclet plugin fails in building CMS Tag Library Created: 12/Feb/10  Updated: 04/Nov/15  Resolved: 04/Nov/15

Status: Closed
Project: Magnolia
Component/s: build, templating
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Diego Schivo Assignee: Magnolia International
Resolution: Won't Do Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows XP Professional 2002, Service Pack 3


Attachments: Text File QDoxPlugin.patch     Text File build-error.txt     Text File build-error2.txt    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

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

The problematic setting is in trunk/pom.xml:

<restrictedpath>file://${settings.localRepository}</restrictedpath>

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):

String f = new File(folder).getCanonicalPath();

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:

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

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).



 Comments   
Comment by Michael Mühlebach [ 04/Nov/15 ]

Given the thousands of other issues we have open that are more highly requested, we won't be able to address this issue in the foreseeable future. Instead we will focus on issues with a higher impact, and more votes.
Thanks for taking the time to raise this issue. As you are no doubt aware this issue has been on our backlog for some time now with very little movement.
I'm going to close this to set expectations so the issue doesn't stay open for years with few updates. If the issue is still relevant please feel free to reopen it or create a new issue.

Generated at Mon Feb 12 03:42:57 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.