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

Tables for services created via the build-service target in ext do not get automatically created on startup

    Details

      Description

      When you create a new service with the build-service target from build-common-ext.xml it will not create the tables for the generated entities automatically on startup of the server

      A possible solution creating the targets below and calling <antcall target="merge-sql" /> at the end of the build-service task

      <target name="check-merge-sql">
      <available property="run.merge.sql" file="docroot/WEB-INF/sql" type="dir"/>
      </target>

      <!--

      Workaround for the problem of ext service tables not being created.
      See : http://www.liferay.com/community/forums/-/message_boards/message/5301710
      -->

      <target name="merge-sql" depends="check-merge-sql" if="run.merge.sql" >
      <concat destfile="docroot/WEB-INF/ext-impl/src/com/liferay/portal/tools/sql/dependencies/portal-tables.sql" fixlastline="true">
      <zipentry zipfile="${app.server.lib.portal.dir}/portal-impl.jar" name="com/liferay/portal/tools/sql/dependencies/portal-tables.sql" />
      <fileset file="docroot/WEB-INF/sql/portal-tables.sql" />
      </concat>

      <concat destfile="docroot/WEB-INF/ext-impl/src/com/liferay/portal/tools/sql/dependencies/indexes.sql" fixlastline="true">
      <zipentry zipfile="${app.server.lib.portal.dir}/portal-impl.jar" name="com/liferay/portal/tools/sql/dependencies/indexes.sql" />
      <fileset file="docroot/WEB-INF/sql/indexes.sql" />
      </concat>

      <concat destfile="docroot/WEB-INF/ext-impl/src/com/liferay/portal/tools/sql/dependencies/sequences.sql" fixlastline="true">
      <zipentry zipfile="${app.server.lib.portal.dir}/portal-impl.jar" name="com/liferay/portal/tools/sql/dependencies/sequences.sql" />
      <fileset file="docroot/WEB-INF/sql/sequences.sql" />
      </concat>

      <concat destfile="docroot/WEB-INF/ext-impl/src/com/liferay/portal/tools/sql/dependencies/indexes.properties" fixlastline="true">
      <zipentry zipfile="${app.server.lib.portal.dir}/portal-impl.jar" name="com/liferay/portal/tools/sql/dependencies/indexes.properties" />
      <fileset file="docroot/WEB-INF/sql/indexes.properties" />
      </concat>
      </target>

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                9 years, 11 weeks, 4 days ago

                Packages

                Version Package
                --Sprint 11/12
                6.2.0 CE M2