Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
mokhtar hatampoor
unpack portlet-impl.jar and use that under tomcat lib dir
March 30, 2011 3:26 AM
Answer

mokhtar hatampoor

Rank: New Member

Posts: 17

Join Date: December 27, 2007

Recent Posts

hi
i want unpack portlet-impl.jar under tomcat lib dir and use this.
because when portlet-impl.jar been packed when i change one class, i should use ant to compile many classes that this take time.

if portlet-impl.jar be unpack, only one class that i changed must be compiled and deployed under tomcat lib directory.

but when i unpack portlet-impl.jar under tomcat, portal not none and browser not bring site.

please help me!
Hitoshi Ozawa
RE: unpack portlet-impl.jar and use that under tomcat lib dir
March 30, 2011 5:10 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7954

Join Date: March 23, 2010

Recent Posts

When you build Liferay from source the first time, it will compile all the source code. However, on the second time, it will only compile the source you've modified.

Tomcat used to allow replacement of class files. JBoss has a stricter restriction and may cause an error especially if the Java version that you're using is different from the Java version Liferay.com used to compile.

That said, you should be using EXT plugin and HOOK. This way, you only have to compile the class you've created.
Manish Kumar Gupta
RE: unpack portlet-impl.jar and use that under tomcat lib dir
March 30, 2011 7:58 AM
Answer

Manish Kumar Gupta

LIFERAY STAFF

Rank: Liferay Master

Posts: 535

Join Date: May 15, 2008

Recent Posts

I agree with Hitoshi that you should use Ext.

If you want to unpack portal-impl, you should use WEB-INF/lib of portal and not tomcat lib.
Hitoshi Ozawa
RE: unpack portlet-impl.jar and use that under tomcat lib dir
March 30, 2011 12:13 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7954

Join Date: March 23, 2010

Recent Posts

FYI: Information on Hook and Ext plugin is available on the following pages:

Hook:
http://www.liferay.com/community/wiki/-/wiki/Main/Portal+Hook+Plugins

Ext Plugin
http://www.liferay.com/community/wiki/-/wiki/Main/Ext+Plugin
mokhtar hatampoor
RE: unpack portlet-impl.jar and use that under tomcat lib dir
March 30, 2011 10:18 PM
Answer

mokhtar hatampoor

Rank: New Member

Posts: 17

Join Date: December 27, 2007

Recent Posts

tanks alot
i develop my code in liferay core not ext.

Manish Kumar Gupta:
If you want to unpack portal-impl, you should use WEB-INF/lib of portal and not tomcat lib.

what is your purpose from above . please explain more.
mokhtar hatampoor
RE: unpack portlet-impl.jar and use that under tomcat lib dir
March 30, 2011 10:33 PM
Answer

mokhtar hatampoor

Rank: New Member

Posts: 17

Join Date: December 27, 2007

Recent Posts

Hitoshi Ozawa:
When you build Liferay from source the first time, it will compile all the source code. However, on the second time, it will only compile the source you've modified.

hi.
you said correct. but my purpose is that with ant, compile take time.
for example when i change one class and compile with my editor (intellij), time to compile is 3 second.
but when i run "ant deploy" under portal-impl for compile and deploy my one class , this is 55 second.
Hitoshi Ozawa
RE: unpack portlet-impl.jar and use that under tomcat lib dir
March 31, 2011 1:17 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7954

Join Date: March 23, 2010

Recent Posts

you said correct. but my purpose is that with ant, compile take time.


You mean build takes time.

Well, you should then create hook or ext plugin because it's may not work otherwise.
A hook or an ext plugin just creates a war file with your changed class. It's probably easier than opening up a jar file and overwriting the class file and restarting Liferay.