13. November 2011

Apache Tomcat 7 Maven plugin

I was searching for Apache Tomcat 7 Maven plugin. I found only messages that no such thing exists and that I have to use some workaround. Finally I found link at StackOwerflow that pointed me to the testing version of  such a plugin.

You just need to configure repository and update mojo definition.


      <name>Apache Snapshots</name>

You can run Tomcat7 by: mvn tomcat7:run

You can read more about this new version of Tomcat Maven plugin at tomcat.apache.org.

This plugin is still under development.

BTW: List Maven plugins hosted at Apache.org is available at maven.apache.org/plugins.

1. January 2011

WordPress – Raw HTML and problem with videos

When you want to embed video from Youtube or Vimeo in WordPress article you just enter URL of video into text.

There is one very useful plugin Raw HTML. This plugins allows you to include HTML content in post.

I was facing strange issue. When I turned on Raw HTML plugin then all embed videos stopped working. I was searching for cause of the problem. It seems that there is problem with priority of filter "wpautop" in Raw HTML code.

Original source from Raw HTML contains following code - raw_html.php - line: 139

add_filter( $tag, 'maybe_'.$func, 3 );

Some WordPress instances simply does not work with this value. I was playing with this priority value. I changed it to 8 and video started working again.

add_filter( $tag, 'maybe_'.$func, 8 );

Default installation of WordPress does not have this problem with Raw HTML plugin.

Now you can enjoy embed videos again.