Skip to content

Commit

Permalink
The plugin is updated so it can be deployed on dotCMS 3.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
yasindilekci committed Sep 27, 2016
1 parent f1fde57 commit 826cafd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 37 deletions.
37 changes: 9 additions & 28 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>nl.isaac.dotcms.plugin.minifier</groupId>
<artifactId>isaac-dotcms-minifier</artifactId>
<version>2.5.1</version>
<version>3.0.0</version>
<packaging>bundle</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -58,8 +58,7 @@
<Export-Package>nl.isaac.dotcms.minify.viewtool,
nl.isaac.dotcms.minify.api,
com.google.javascript.jscomp</Export-Package>
<Import-Package>nl.isaac.dotcms.minify.viewtool,
org.osgi.framework,
<Import-Package>com.dotcms.repackage.org.osgi.framework,
com.dotmarketing.osgi,
com.dotmarketing.beans,
com.dotmarketing.plugin.business,
Expand Down Expand Up @@ -119,14 +118,8 @@
<dependency>
<groupId>com.dotcms</groupId>
<artifactId>dotcms</artifactId>
<version>2.5.1</version>
<version>3.0.1</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
Expand All @@ -135,27 +128,15 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.main</artifactId>
<version>4.2.1</version>
<groupId>com.dotcms.lib</groupId>
<artifactId>dot.elasticsearch</artifactId>
<version>0.90.3_2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.http.api</artifactId>
<version>2.2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.osgi.compendium</artifactId>
<version>1.4.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
<version>3.6.0</version>
<groupId>com.dotcms.lib</groupId>
<artifactId>dot.felix</artifactId>
<version>4.2.1_1</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
13 changes: 6 additions & 7 deletions src/main/java/nl/isaac/dotcms/minify/osgi/MinifierActivator.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@
import nl.isaac.dotcms.util.osgi.ExtendedGenericBundleActivator;
import nl.isaac.dotcms.util.osgi.ViewToolScope;

import org.apache.felix.http.api.ExtHttpService;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import org.osgi.service.http.NamespaceException;
import org.osgi.util.tracker.ServiceTracker;

import com.dotcms.repackage.org.apache.felix.http.api.ExtHttpService;
import com.dotcms.repackage.org.osgi.framework.BundleContext;
import com.dotcms.repackage.org.osgi.framework.ServiceReference;
import com.dotcms.repackage.org.osgi.service.http.NamespaceException;
import com.dotcms.repackage.org.osgi.util.tracker.ServiceTracker;
import com.dotmarketing.filters.CMSFilter;
import com.dotmarketing.util.Logger;

Expand Down Expand Up @@ -48,8 +47,8 @@ public void start(BundleContext context) throws Exception {
CMSFilter.addExclude("/app/servlets/MinifyServlet");
CMSFilter.addExclude("/app/servlets/MinifyServlet");
CMSFilter.addExclude( filterPattern);

}


/**
* Mostly boilerplate to get the httpservice where we can register the {@link #minifyServlet}, we also create the servlet here.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@


import org.apache.velocity.tools.view.context.ViewContext;
import org.osgi.framework.BundleContext;

import com.dotcms.repackage.org.osgi.framework.BundleContext;
import com.dotmarketing.osgi.GenericBundleActivator;


/**
* Provides a convenience method for adding viewtools.
* @author Maarten
Expand All @@ -16,7 +17,6 @@ public abstract class ExtendedGenericBundleActivator extends GenericBundleActiva
@Override
protected void initializeServices(BundleContext context) throws Exception {
super.initializeServices(context);

}

protected void addViewTool(BundleContext context, Class<?> viewtoolClass, String key, ViewToolScope scope) {
Expand Down

0 comments on commit 826cafd

Please sign in to comment.