Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-3076

On Windows, XDoclet plugin fails in building CMS Tag Library

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • None
    • build, templating
    • None
    • Windows XP Professional 2002, Service Pack 3

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

      Checklists

        Acceptance criteria

        Attachments

          1. build-error.txt
            5 kB
          2. build-error2.txt
            4 kB
          3. QDoxPlugin.patch
            1 kB

          Activity

            People

              gjoseph Magnolia International
              diegoschivo Diego Schivo
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD