From: <mol...@us...> - 2010-06-18 15:26:05
|
Revision: 2684 http://openutils.svn.sourceforge.net/openutils/?rev=2684&view=rev Author: molaschi Date: 2010-06-18 15:25:59 +0000 (Fri, 18 Jun 2010) Log Message: ----------- TAGCLOUD-8 added mgnltasks 4.1.2 and remove SamplesExtractionTasks Modified Paths: -------------- trunk/openutils-mgnltagcloud/pom.xml trunk/openutils-mgnltagcloud/src/main/java/net/sourceforge/openutils/mgnltagcloud/setup/TagCloudModuleVersionHandler.java Removed Paths: ------------- trunk/openutils-mgnltagcloud/src/main/java/net/sourceforge/openutils/mgnltagcloud/setup/SamplesExtractionTask.java Modified: trunk/openutils-mgnltagcloud/pom.xml =================================================================== --- trunk/openutils-mgnltagcloud/pom.xml 2010-06-18 15:05:48 UTC (rev 2683) +++ trunk/openutils-mgnltagcloud/pom.xml 2010-06-18 15:25:59 UTC (rev 2684) @@ -123,6 +123,11 @@ </dependency> <dependency> <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-mgnltasks</artifactId> + <version>4.1.2</version> + </dependency> + <dependency> + <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils-mgnlcontrols</artifactId> <version>4.0.7</version> </dependency> Deleted: trunk/openutils-mgnltagcloud/src/main/java/net/sourceforge/openutils/mgnltagcloud/setup/SamplesExtractionTask.java =================================================================== --- trunk/openutils-mgnltagcloud/src/main/java/net/sourceforge/openutils/mgnltagcloud/setup/SamplesExtractionTask.java 2010-06-18 15:05:48 UTC (rev 2683) +++ trunk/openutils-mgnltagcloud/src/main/java/net/sourceforge/openutils/mgnltagcloud/setup/SamplesExtractionTask.java 2010-06-18 15:25:59 UTC (rev 2684) @@ -1,91 +0,0 @@ -/** - * - * Magnolia tag cloud module (http://www.openmindlab.com/lab/products/mgnltagcloud.html) - * Copyright(C) 2010-2010, Openmind S.r.l. http://www.openmindonline.it - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -package net.sourceforge.openutils.mgnltagcloud.setup; - -import info.magnolia.cms.core.HierarchyManager; -import info.magnolia.cms.core.Path; -import info.magnolia.module.InstallContext; -import info.magnolia.module.delta.AbstractTask; -import info.magnolia.module.delta.TaskExecutionException; -import info.magnolia.module.files.FileExtractionLogger; -import info.magnolia.module.files.FileExtractor; -import info.magnolia.module.files.MD5CheckingFileExtractor; - -import java.io.IOException; - -import org.apache.commons.lang.StringUtils; - - -/** - * Extract samples files to webapp root. - * @author cstrappazzon - * @version $Id$ - */ -public class SamplesExtractionTask extends AbstractTask -{ - - public SamplesExtractionTask() - { - super("Samples extraction", "Extracts jsp files for samples."); - } - - /** - * {@inheritDoc} - */ - public void execute(final InstallContext ctx) throws TaskExecutionException - { - final HierarchyManager hm = ctx.getConfigHierarchyManager(); - final MD5CheckingFileExtractor extractor = new MD5CheckingFileExtractor(new FileExtractionLogger() - { - - public void error(String message) - { - ctx.warn(message); - } - }, hm); - try - { - extractor.extractFiles(new FileExtractor.Transformer() - { - - public String accept(String resourcePath) - { - final boolean thisIsAFileWeWant = resourcePath.startsWith("/mgnl-files/") - && StringUtils.contains(resourcePath, "/samples-tagcloud/"); - if (!thisIsAFileWeWant) - { - return null; - } - final String relTargetPath = StringUtils.removeStart(resourcePath, "/mgnl-files/"); - return Path.getAbsoluteFileSystemPath(relTargetPath); - } - - }); - } - catch (IOException e) - { - throw new TaskExecutionException("Could not extract files for module " - + ctx.getCurrentModuleDefinition() - + ": " - + e.getMessage(), e); - } - } - -} Modified: trunk/openutils-mgnltagcloud/src/main/java/net/sourceforge/openutils/mgnltagcloud/setup/TagCloudModuleVersionHandler.java =================================================================== --- trunk/openutils-mgnltagcloud/src/main/java/net/sourceforge/openutils/mgnltagcloud/setup/TagCloudModuleVersionHandler.java 2010-06-18 15:05:48 UTC (rev 2683) +++ trunk/openutils-mgnltagcloud/src/main/java/net/sourceforge/openutils/mgnltagcloud/setup/TagCloudModuleVersionHandler.java 2010-06-18 15:25:59 UTC (rev 2684) @@ -22,6 +22,7 @@ import info.magnolia.cms.core.SystemProperty; import info.magnolia.module.InstallContext; import info.magnolia.module.delta.Task; +import it.openutils.mgnltasks.SamplesExtractionTask; import it.openutils.mgnltasks.SimpleModuleVersionHandler; import java.util.ArrayList; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |