Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-35823

"ant direct-deploy" does not add liferay-portlet-ext.tld correctly

    Details

      Description

      ISSUE
      Running "ant direct-deploy" on any portlet that needs liferay-portlet-ext.tld would not deploy correctly into the portlet. That is because liferay-portlet-ext.tld is not being imported over into the portlet's tld folder when the portlet is being deployed. Attached is a sample portlet I built to demonstrate this issue.

      The following criteria are required in order to reproduce this bug:

      • The portlet must have an empty tld folder before being deployed.
      • The portlet's web.xml must reference liferay-portlet-ext.tld.

      Steps to reproduce:
      1. Create a portlet with the specifications listed above.
      2. Make sure your plugins SDK is pointing towards your liferay tomcat bundle.
      3. Run "ant direct-deploy" within the portlet folder.
      4. Start up Liferay.

      Result:
      On master you will notice that all other tlds have been imported into /WEB-INF/tld folder of the deployed portlet, except for liferay-portlet-ext.tld.

      Additionally, on 6.2 and 6.1 you will see error message:

      WARNING: Failed to process TLD with path [http://liferay.com/tld/portlet] and URI [/WEB-INF/tld/liferay-portlet-ext.tld]
      java.net.MalformedURLException
      	at java.net.URL.<init>(URL.java:601)
      	at java.net.URL.<init>(URL.java:464)
      	at java.net.URL.<init>(URL.java:413)
      	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:648)
      	at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:186)
      	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:772)
      	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
      	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
      	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
      	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
      	at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)
      	at org.apache.catalina.startup.TldConfig.tldScanStream(TldConfig.java:515)
      	at org.apache.catalina.startup.TldConfig.tldScanWebXml(TldConfig.java:328)
      	at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:243)
      	at org.apache.catalina.startup.TldConfig.lifecycleEvent(TldConfig.java:540)
      	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
      	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1099)
      	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1621)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      	at java.lang.Thread.run(Thread.java:662)

      If you go into /WEB-INF/tld folder for the deployed portlet, you will notice that all other tlds have been imported, except for liferay-portlet-ext.tld.

      REASONING
      The reason why this issue occurs is because of the java arguments being set when direct-deploy is being called. If you look in build-common-portlet.xml, the jvarg is setting "-Ddeployer.portlet-ext.taglib.dtd". However, in BaseDeployer.java, the property being read is "deployer.portlet.ext.taglib.dtd".

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  3 years, 50 weeks, 1 day ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.1 CE GA2