1

I have a Liferay project that was originally created as a portlet type (i.e., under ${Liferay plugin SDK folder}/portlets). Later on, it became essentially a hook type also as JSP overrides and such were added. When I tried to build the project by running ant compile, I got errors like The import com.liferay.portal.util.CookieKeys cannot be resolved. I don't get this error when the project is compiled in the Liferay IDE which is able to recognize Liferay projects of mixed types. I was wondering if there is anyone here who has had experience with compilation such Liferay projects from the command line.

VC1
  • 1,660
  • 4
  • 25
  • 42
Chry Cheng
  • 3,378
  • 5
  • 47
  • 79

1 Answers1

4

Make sure your build.${username}.properties at the root of your ${Liferay plugin SDK folder} has the following settings:

app.server.type = tomcat
app.server.dir = /path/to/tomcat

Then you should be able to re-compile from command line. The reason it works in Liferay IDE is that it adds compile dependencies to your project automatically if you have specified a Liferay Tomcat runtime.

gamerson
  • 5,220
  • 1
  • 28
  • 45