【问题标题】:liferay auto deploy not workingliferay 自动部署不起作用
【发布时间】:2014-01-21 12:59:53
【问题描述】:

我正在尝试在 liferay 6.2 中构建主题。我能够构建主题,但自动部署不起作用。 我已经在 portal-setup-wizard.properties 中设置了 autodeploy 目录,比如

auto.deploy.enabled=true

auto.deploy.deploy.dir=${liferay.home}/deploy

build.user.properties 中的条目是

app.server.portal.dir = D:\Projects\Site\liferay-portal-6.2.0-ce-ga1\tomcat-7.0.42\webapps\ROOT app.server.lib.global.dir = D:\Projects\Site\liferay-portal-6.2.0-ce-ga1\tomcat-7.0.42\lib\ext app.server.deploy.dir = D:\Projects\Site\liferay-portal-6.2.0-ce-ga1\tomcat-7.0.42\webapps app.server.type = tomcat app.server.dir = D:\Projects\Site\liferay-portal-6.2.0-ce-ga1\tomcat-7.0.42

当构建成功时,我在控制台中收到消息

将 1 个文件复制到 D:\Projects\Site\bundles\deploy

我无法从部署目录路径的位置进行纠正。我没有指定 D:\Projects\Site\bundles\deploy 任何位置。

【问题讨论】:

    标签: java liferay liferay-6


    【解决方案1】:

    自动部署目录应该在 portal-ext.properties 中设置,而不是在 portal-setup-wizard.properties 中。

    我在 build.user.properties 文件中也缺少 app.server.parent.dir。应该是

    app.server.parent.dir=D:\Projects\Site\liferay-portal-6.2.0-ce-ga1

    【讨论】:

    • 请注意,portal-setup-wizard.properties 也可以正常工作,但会被认为是意外的。另请注意,此文件通常定义 liferay.home - 如果您将安装移动到其他位置,此值仍保持不变,并可能导致意外行为
    • 那么理想情况下,我们应该在portal-setup-wizard.properties 或portal-ext.properties 中的何处编写门户配置
    • Liferay 默认在 portal-setup-wizard.properties 中设置 liferay.home,我们可以使用它来设置我们的 liferay 根目录。
    【解决方案2】:

    确保portal-setup-wizard.properties 具有正确的 Liferay 主页设置。有时,我们重命名 liferay 主文件夹,但忘记更新 portal-setup-wizard.properties 文件。

    【讨论】:

      【解决方案3】:

      确保门户热部署工作正常:

      找到你的主题的战争文件,它位于 D:\Projects\Site\bundles\deploy 并将其复制到 Portal 的部署文件夹。如果它从这里消失,热部署工作。

      确保您的登录名是user

      确保您使用与门户版本相同的 Plugin SDK 版本

      检查插件 SDK 的 build.properties 是否具有适当的 tomcat 版本,例如:

      app.server.tomcat.dir=${app.server.parent.dir}/tomcat-7.0.62
      

      确保您的插件 SDK 知道门户在哪里

      我的登录名是 peter,这是我的 build.peter.properties 文件,它位于插件的 SDK 目录中(我使用 Linux):

      app.server.parent.dir=/home/peter/apps/liferay-portal-6.2-ce-ga5
      

      如果你的tomcat版本和build.properties文件中的不一样, ,但假设是 7.0.42,也将其放入 build.your-login-name.properties 文件中:

      app.server.tomcat.dir=${app.server.parent.dir}/tomcat-7.0.42
      

      SDK 将构建好的 war 文件放入 Portal 的部署目录就足够了,假设您只是解压缩的 liferay 包而不是调整目录。

      【讨论】:

        【解决方案4】:

        C:\server\profiles\AppSrv01\bin\liferay

        C:\server\profiles\AppSrv01\liferay

        重命名liferay文件夹,任何一个,但确保不要重命名未被服务器使用的文件夹

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 2015-09-30
          • 1970-01-01
          • 2023-03-21
          • 2017-12-28
          • 1970-01-01
          • 2023-03-27
          • 1970-01-01
          相关资源
          最近更新 更多