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

Compiling from source fails on systems that have utf-8 as platform encodiing

    Details

      Description

      I was unable to compile liferay on a linux system that has its platform encoding set to utf 8

      jteam@liferay:~/liferay/portal-5.2.3-src$ echo $LANG
      en_US.UTF-8

      to fix it i modified the compile target in build-common-java.xml to look like this

      <target name="compile">
      <mkdir dir="classes" />

      <copy todir="classes">
      <fileset dir="src" excludes="*/.java" />
      </copy>

      <if>
      <equals arg1="${javac.compiler}" arg2="modern" />
      <then>
      <javac
      classpathref="project.classpath"
      compiler="${javac.compiler}"
      debug="${javac.debug}"
      deprecation="${javac.deprecation}"
      destdir="classes"
      fork="${javac.fork}"
      memoryMaximumSize="${javac.memoryMaximumSize}"
      nowarn="${javac.nowarn}"
      srcdir="src"
      encoding="windows-1252"
      />
      </then>
      <else>
      <javac
      classpathref="project.classpath"
      compiler="${javac.compiler}"
      debug="${javac.debug}"
      deprecation="${javac.deprecation}"
      destdir="classes"
      nowarn="${javac.nowarn}"
      srcdir="src"
      encoding="windows-1252"
      />
      </else>
      </if>
      </target>

      eg with the encoding attribute set on the javac task

        Attachments

          Activity

            People

            Assignee:
            michael.saechang Michael Saechang
            Reporter:
            jelmer Jelmer Kuperus (Inactive)
            Participants of an Issue:
            Recent user:
            Esther Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              9 years, 7 weeks ago

                Packages

                Version Package
                --Sprint 11/12
                6.2.0 CE M2