Uploaded image for project: 'PUBLIC - Liferay IDE'
  1. PUBLIC - Liferay IDE
  2. IDE-926

build.<user>.properties is not properly updated based on new app.server.type prefixes

    Details

      Description

      See LPS-34422

      Updating from:

      build.properties

      app.server.type=tomcat
      app.server.dir=${project.dir}/../bundles/tomcat-7.0.34
      app.server.deploy.dir=${app.server.dir}/webapps
      app.server.lib.global.dir=${app.server.dir}/lib/ext
      app.server.portal.dir=${app.server.dir}/webapps/ROOT

      to

      app.server.type=tomcat

      app.server.parent.dir=${project.dir}/../bundles

      app.server.tomcat.dir=${app.server.parent.dir}/tomcat-7.0.34
      app.server.tomcat.deploy.dir=${app.server.tomcat.dir}/webapps
      app.server.tomcat.lib.global.dir=${app.server.tomcat.dir}/lib/ext
      app.server.tomcat.portal.dir=${app.server.tomcat.dir}/webapps/ROOT

      This allows us to proactively preset all the values for all the different application servers and then choose which one to use. This commit changes the possible ways of setting it, but does not change any behavior.

      There is some "magic" to keep backwards compatibility that was done in build-common.xml.

      If you look at 9d25ffc2d80e4cd3fdda90990ebf10015277ede8

      <if>
      <isset property="app.server.dir" />
      <then>
      <if>
      <isset property="app.server.type" />
      <then>
      <propertycopy from="app.server.dir" name="app.server.${app.server.type}.dir" />
      </then>
      <else>
      <propertycopy from="app.server.dir" name="app.server.tomcat.dir" />
      </else>
      </if>
      </then>
      </if>

      That block was inserted right before build.properties is loaded so that developers who had:

      build.bob.properties set with:

      app.server.dir=/my-tomcat-dir

      will still work, although technically, the new notation ought to be:

      app.server.type=tomcat
      app.server.tomcat.dir=/my-tomcat-dir

      or

      app.server.type=jetty
      app.server.jetty.dir=/my-jetty-dir

      This backwards compatibility hack assumes that users didn't customize the other app.server.* properties. If they did, it'll still work since those were specifically customized. The hack won't even be needed for those cases.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                5 years, 15 weeks, 1 day ago

                Packages

                Version Package
                2.0.0 M1