liferay portal 在tomcat调试

转自:https://web.liferay.com/de/community/wiki/-/wiki/Main/Eclipse+Debugging+Liferay+on+Tomcat#section-Eclipse+Debugging+Liferay+on+Tomcat-(Older+versions)+With+a+straightforward+launch+configuration

 

Using a Launch Configuration specifically created to run Tomcat directly, bypassing Eclipse.

  1. Open "Run Configurations..." under the Run button
  2. Under Java Applications node in the tree, right click and "New"
  3. On Main tab, select the portal source code project or your EXT project
  4. In the Main class put org.apache.catalina.startup.Bootstrap, don't check any check boxes
  5. Go to Arguments tab, in the Program arguments type: start
  6. In VM arguments put like:

这里的参数 

-Xmx2600M

-XX:PermSize=128M

-XX:MaxPermSize=512M

-Xmx512m
-XX:PermSize=32m
-XX:MaxPermSize=160m
-Dfile.encoding=UTF8
-Duser.timezone=GMT
-Djava.security.auth.login.config=${tomcat-root-folder}/conf/jaas.config
-Dcatalina.base=${tomcat-root-folder}
-Dcatalina.home=${tomcat-root-folder}  
-Djava.io.tmpdir=${tomcat-root-folder}/temp

Optional If you want to retain the tomcat logging settings include the following arguments.

-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=${tomcat-root-folder}/conf/logging.properties

Change ${tomcat-root-folder} to point at your tomcat deployment root folder

  1. In the Working directory, make it: Other: ${tomcat-root-folder}/bin. Again, change ${tomcat-root-folder} accordingly
  2. In Classpath tab, remove ALL User entries, do NOT remove the JRE System library
  3. Select User Entries and "Add External JArs", find the bootstrap.jar file from the ${tomcat-root-folder}/bin folder and add only that one
  4. In the Source tab, select any related project, but also the main project. For example, if you want to also debug a plugin, add it's source path here
  5. Under Common tab check Run and Debug
  6. Apply all changes
  7. Now whenever you want to debug, just go to the debug button/drop down and click. The server should startup on console.

猜你喜欢

转载自qq85609655.iteye.com/blog/2316854