portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdore...@apache.org
Subject svn commit: r562725 [3/33] - in /portals/pluto/branches/1.1-286-trunk-merge: ./ assembly/ assembly/src/ assembly/src/main/ assembly/src/main/assembly/ assembly/src/main/resources/ maven-pluto-plugin/ maven-pluto-plugin/src/ maven-pluto-plugin/src/main/...
Date Sat, 04 Aug 2007 14:41:49 GMT
Added: portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AbstractManagementMojo.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AbstractManagementMojo.java?view=auto&rev=562725
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AbstractManagementMojo.java (added)
+++ portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AbstractManagementMojo.java Sat Aug  4 07:41:23 2007
@@ -0,0 +1,193 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.maven;
+
+import org.apache.maven.artifact.factory.ArtifactFactory;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.resolver.ArtifactResolver;
+import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
+import org.apache.maven.artifact.resolver.ArtifactResolutionException;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.pluto.util.install.ServerConfig;
+import org.apache.pluto.util.install.InstallationConfig;
+import org.apache.pluto.util.install.PortalInstallerFactory;
+import org.apache.pluto.util.install.PortalInstaller;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Iterator;
+import java.util.Collection;
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * Abstract Mojo for installation tasks.
+ *
+ * @since 07/29/2005
+ */
+public abstract class AbstractManagementMojo extends AbstractPlutoMojo {
+
+    /**
+     * @parameter expression="${domain}"
+     */
+    protected String domain = "PlutoDomain";
+
+    /**
+     * @parameter expression="${server}"
+     */
+    protected String server = "PlutoServer";
+
+    /**
+     * @parameter expression="${host}"
+     */
+    protected String host = "localhost";
+
+    /**
+     * @parameter expression="${port}"
+     */
+    protected int port;
+
+    /**
+     * @component
+     */
+    protected ArtifactFactory artifactFactory;
+
+    /**
+     * @component
+     */
+    protected ArtifactResolver artifactResolver;
+
+    /**
+     * @parameter expression="${localRepository}
+     */
+    protected ArtifactRepository artifactRepository;
+
+    /**
+     * @parameter expression="${project.remoteArtifactRepositories}"
+     */
+    protected List remoteRepositories;
+
+    /**
+     * @parameter expression="${ctx}" default-value="pluto"
+     *
+     */
+    protected String portalContext;
+
+    /**
+     * @parameter expression="${pom.currentVersion} default="1.0-SNAPSHOT"
+     */
+    protected String version;
+
+    /**
+     *  at parameter expression="${portletApps}"
+     */
+    protected Map portletApps = new HashMap();
+
+    protected AbstractManagementMojo() {
+    	// Do nothing.
+    }
+
+    protected List getSharedDependencies() throws ArtifactNotFoundException, ArtifactResolutionException {
+       return getDependencies(InstallationDependency.getSharedDependencies());
+    }
+
+    protected List getEndorsedDependencies() throws ArtifactNotFoundException, ArtifactResolutionException {
+       return getDependencies(InstallationDependency.getEndorsedDependencies());
+    }
+
+    private List getDependencies(Collection artifacts) throws ArtifactNotFoundException, ArtifactResolutionException {
+        List list = new ArrayList();
+        Iterator it = artifacts.iterator();
+        while(it.hasNext()) {
+            InstallationDependency dep = (InstallationDependency)it.next();
+            Artifact artifact = artifactFactory.createArtifactWithClassifier(
+                    dep.getGroupId(), dep.getArtifactId(), dep.getVersion(), dep.getType(), null
+            );
+
+            artifactResolver.resolve(artifact, remoteRepositories, artifactRepository);
+            if(artifact.getFile() == null) {
+                getLog().warn("Unable to find file for artifact: "+artifact.getArtifactId());
+            }
+
+            list.add(artifact.getFile());
+        }
+        return list;
+    }
+
+    protected ServerConfig getServerConfig() {
+        ServerConfig config = new ServerConfig();
+        config.setDomain(domain);
+        config.setHost(host);
+        config.setPort(port);
+        config.setServer(server);
+        return config;
+    }
+
+    protected PortalInstaller getHandler() {
+        return PortalInstallerFactory.getAppServerHandler(installationDirectory);
+    }
+
+    protected InstallationConfig createInstallationConfig() throws ArtifactNotFoundException, ArtifactResolutionException {
+        InstallationConfig config = new InstallationConfig();
+        config.setInstallationDirectory(installationDirectory);
+        config.setPortalContextPath(portalContext);
+        config.setPortalApplication(getPortalApplication());
+        config.setPortletApplications(getPortletApplications());
+        config.setEndorsedDependencies(getEndorsedDependencies());
+        config.setSharedDependencies(getSharedDependencies());
+        config.setServerConfig(getServerConfig());
+        return config;
+    }
+
+    private File getPortalApplication() throws ArtifactNotFoundException, ArtifactResolutionException  {
+        InstallationDependency dep = InstallationDependency.PORTAL;
+        Artifact artifact = artifactFactory.createBuildArtifact(
+           dep.getGroupId(), dep.getArtifactId(), dep.getVersion(), dep.getType()
+        );
+        artifactResolver.resolve(artifact, remoteRepositories, artifactRepository);
+        return artifact.getFile();
+    }
+
+    private Map getPortletApplications() throws ArtifactNotFoundException, ArtifactResolutionException {
+        Map files = new HashMap();
+        InstallationDependency dep = InstallationDependency.TESTSUITE;
+        Artifact artifact = artifactFactory.createBuildArtifact(
+                dep.getGroupId(), dep.getArtifactId(), dep.getVersion(), dep.getType()
+        );
+        artifactResolver.resolve(artifact, remoteRepositories, artifactRepository);
+
+        files.put("testsuite", artifact.getFile());
+        /*
+        Iterator apps = portletApps.iterator();
+        while(apps.hasNext()) {
+            //files.add(artifactFactory.createBuildArtifact(
+            //    InstallMojo.GROUP_ID, apps.next().toString(), version, "war"
+            //).getFile());
+        }
+        */
+        return files;
+    }
+
+    protected void doValidate() throws Exception {
+        if(installationDirectory == null || !installationDirectory.exists()) {
+            throw new MojoExecutionException("A valid installation directory must be provided in order to install pluto.");
+
+        }
+    }
+}

Added: portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AbstractPlutoMojo.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AbstractPlutoMojo.java?view=auto&rev=562725
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AbstractPlutoMojo.java (added)
+++ portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AbstractPlutoMojo.java Sat Aug  4 07:41:23 2007
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.maven;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.project.MavenProject;
+
+import java.io.File;
+
+/**
+ * @todo Document
+ * @since Jul 30, 2005
+ */
+public abstract class AbstractPlutoMojo extends AbstractMojo {
+
+    /**
+     * @parameter expression="${installDir}"
+     */
+    protected File installationDirectory;
+
+    /**
+     * @parameter expression="${project}"
+     * @required
+     * @readonly
+     */
+    protected MavenProject project;
+
+    public void execute() throws MojoExecutionException {
+        // Validation of the installDir property is done by maven.
+        try {
+            doValidate();
+            doExecute();
+        } catch (MojoExecutionException ex) {
+            throw ex;
+        } catch (Exception ex) {
+            throw new MojoExecutionException("Error Installing Pluto", ex);
+        }
+    }
+
+    /**
+     * Process the actual execution.
+     * @throws Exception
+     */
+    protected abstract void doExecute() throws Exception;
+
+    protected abstract void doValidate() throws Exception;
+}

Added: portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AbstractPortletMojo.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AbstractPortletMojo.java?view=auto&rev=562725
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AbstractPortletMojo.java (added)
+++ portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AbstractPortletMojo.java Sat Aug  4 07:41:23 2007
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.maven;
+
+/**
+ * @todo Document
+ * @since Jul 30, 2005
+ */
+public abstract class AbstractPortletMojo extends AbstractPlutoMojo {
+
+
+}

Added: portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AssembleMojo.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AssembleMojo.java?view=auto&rev=562725
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AssembleMojo.java (added)
+++ portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AssembleMojo.java Sat Aug  4 07:41:23 2007
@@ -0,0 +1,316 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.maven;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.logging.Log;
+import org.apache.pluto.util.UtilityException;
+import org.apache.pluto.util.assemble.Assembler;
+import org.apache.pluto.util.assemble.AssemblerConfig;
+import org.apache.pluto.util.assemble.AssemblerFactory;
+
+/**
+ * The AssembleMojo is responsible for assembling a web application for deployment
+ * into the Pluto portlet container.  Assembly, in this context, is the process of
+ * updating a web application's WEB-INF/web.xml with Pluto specific parameters for 
+ * deployment in Pluto.   
+ * <p>
+ * This Mojo is able to operate on individual descriptors by specifying 
+ * <code>portletXml</code>, <code>webXml</code>, and <code>webXmlDestination</code>.
+ * If your project uses standard Maven 2 directory layouts, the defaults will
+ * provide proper values.
+ * <p/>
+ * Example Maven 2 <code>pom.xml</code> usage:
+ * <pre>
+ * &lt;project&gt;
+ *   ...
+ *   &lt;build&gt;
+ *      &lt;plugins&gt;
+ *          &lt;plugin&gt;
+ *              &lt;groupId&gt;org.apache.pluto&lt;/groupId&gt;
+ *              &lt;artifactId&gt;maven-pluto-plugin&lt;/artifactId&gt;
+ *          &lt;/plugin&gt;
+ *      &lt;/plugins&gt;
+ *   &lt;/build&gt;
+ *   ...
+ * &lt;/project&gt;
+ * </pre>
+ * <p>
+ * This Mojo can also operate on entire WAR or EAR archive files by specifying
+ * a list of archive path names in <code>archives</code>.
+ * <p/>
+ * Example Maven 2 <code>pom.xml</code> usage:
+ * <pre>
+ * &lt;project&gt;
+ *   ...
+ *   &lt;build&gt;
+ *      &lt;plugins&gt;
+ *          &lt;plugin&gt;
+ *              &lt;groupId&gt;org.apache.pluto&lt;/groupId&gt;
+ *              &lt;artifactId&gt;maven-pluto-plugin&lt;/artifactId&gt;
+ *              &lt;executions&gt;
+ *                  &lt;execution&gt;
+ *                      &lt;phase&gt;package&lt;/phase&gt;
+ *                      &lt;goals&gt;
+ *                          &lt;goal&gt;assemble&lt;/goal&gt;
+ *                      &lt;/goals&gt;
+ *                      &lt;configuration&gt;
+ *                          &lt;assemblyOutputDirectory&gt;${project.build.directory}/assembled-wars&lt;/assemblyOutputDirectory&gt;
+ *                          &lt;archives&gt;
+ *                              &lt;assembleArchive&gt;
+ *                                  ${project.build.directory}/wartoassemble.war
+ *                              &lt;/assembleArchive&gt;
+ *                              &lt;assembleArchive&gt;
+ *                                  ${project.build.directory}/anotherwartoassemble.war
+ *                              &lt;/assembleArchive&gt;
+ *                          &lt;/archives&gt;
+ *                      &lt;/configuration&gt;
+ *                  &lt;/execution&gt;
+ *              &lt;/executions&gt;
+ *          &lt;/plugin&gt;
+ *      &lt;/plugins&gt;
+ *   &lt;/build&gt;
+ *   ...
+ * &lt;/project&gt;
+ * </pre>
+ * 
+ * @since Jul 30, 2005
+ * @see org.apache.pluto.util.assemble.Assembler 
+ * 
+ * @goal assemble
+ * @description prepares a web application as a portlet application
+ * @phase process-resources
+ */
+public class AssembleMojo extends AbstractPortletMojo {
+
+	// Private Member Variables ------------------------------------------------
+
+    /**
+     * The portlet application descriptor (<code>WEB-INF/portlet.xml</code>).
+     * @parameter expression="${basedir}/src/main/webapp/WEB-INF/portlet.xml"
+     * @required
+     */
+    private File portletXml;
+
+    /**
+     * The original webapp descriptor (<code>WEB-INF/web.xml</code>).
+     * @parameter expression="${basedir}/src/main/webapp/WEB-INF/web.xml"
+     * @required
+     */
+    private File webXml;
+
+    /**
+     * The file to which the updated webapp descriptor is written.
+     * @parameter expression="${project.build.directory}/pluto-resources/web.xml"
+     */
+    private File webXmlDestination;
+
+    /**
+     * The name of the dispatch servlet class to use
+     * @parameter
+     */
+    private String dispatchServletClass;
+    
+    /**
+     * A list of archive files to assemble.  Only EAR and WAR file
+     * types are supported.  
+     * <p/>
+     * Each value in the list is the absolute pathname to the 
+     * archive being assembled.
+     * <p/>
+     * This parameter is mutually exclusive with portletXml, webXml, 
+     * and webXmlDestination parameters.  
+     * 
+     * @parameter alias="warFiles"
+     */
+    private List archives;
+
+    /**
+     * @deprecated see archives parameter
+     * @parameter
+     */
+    private List warFiles;
+    
+    /**
+     * Destination directory the assembled files are written out to.
+     * @parameter alias="warFilesDestination" expression="${project.build.directory}/pluto-assembled-wars"
+     */
+    private File assemblyOutputDirectory;
+    
+    /**
+     * Destination directory the assembled files are written out to.
+     * @parameter
+     * @deprecated see assemblyOutputDirectory parameter
+     */
+    private File warFilesDestination;
+
+    // AbstractPlutoMojo Impl --------------------------------------------------
+
+    protected void doExecute() throws MojoExecutionException {       
+        
+        // Log parameter values.
+    	Log log = getLog();
+        if (log.isInfoEnabled()) {
+            if (archives == null || archives.isEmpty()) {
+                log.info("Reading web.xml from :" + webXml.getAbsolutePath());
+                log.info("Reading portlet.xml from: " + portletXml.getAbsolutePath());
+                log.info("Writing web.xml to: " + webXmlDestination.getAbsolutePath());
+            }               
+        }
+        
+        try {
+            // Assemble portlet app by updating web.xml.
+            if (archives == null || archives.isEmpty()) {        
+                AssemblerConfig config = createAssemblerConfig();
+                Assembler assembler = AssemblerFactory.getFactory()
+            		    .createAssembler(config);
+                assembler.assemble(config);
+            } else {
+                for (Iterator i = archives.iterator(); i.hasNext();) {
+                    File archive = new File(i.next().toString());
+                    if (log.isInfoEnabled()) {
+                        log.info("Assembling archive file " + archive.getAbsolutePath() + 
+                                " to directory " + assemblyOutputDirectory.getAbsolutePath());
+                    }                
+                    AssemblerConfig config = createArchiveAssemblerConfig(archive, assemblyOutputDirectory);
+                    Assembler assembler = AssemblerFactory.getFactory()
+                        .createAssembler(config);
+                    assembler.assemble(config);
+                }
+            }
+        } catch (UtilityException e) {
+            log.error("Assembly failed: " + e.getMessage(), e);
+        }
+    }
+
+    protected void doValidate() throws MojoExecutionException {
+        Log log = getLog();
+        
+        // Support for the old 'warFiles' mojo parameter.  Apparently
+        // the alias for the 'archives' parameter doesn't work properly.
+        if (! (warFiles == null || warFiles.isEmpty()) ) {
+            log.warn( "'warFiles' parameter is deprecated.  Use 'archives' parameter instead." );
+            if ( archives == null ) {
+                archives = new ArrayList();
+            }
+            archives.addAll( warFiles );
+        }
+        
+        // Warn if the old 'warFilesDestination' mojo parameter is used
+        if ( warFilesDestination != null ) {
+            log.warn( "'warFilesDestination' parameter is deprecated.  Use 'assemblyOutputDirectory' instead." );
+            assemblyOutputDirectory = warFilesDestination;
+        }
+        
+        // If a list of war files are supplied:
+        //   1) webXml, portletXml, and webXmlDestination parameters are ignored
+        //   2) verify the files in the List exist.
+        //   3) verify the destination is a directory, or create it if it doesn't exist.
+        
+        // A list of files was supplied so we ignore other parameters. 
+        if (archives != null && !archives.isEmpty()) {
+            if (webXml != null) {
+                log.debug("archives parameter and webXml parameter are mutually exclusive.  Ignoring webXml parameter.");
+            }
+            if (portletXml != null) {
+                log.debug("archives parameter and portletXml parameter are mutually exclusive.  Ignoring portletXml parameter.");
+            }
+            if (webXmlDestination != null) {
+                log.debug("archives parameter and webXmlDestination parameter are mutually exclusive.  Ignoring webXmlDestination parameter.");
+            }
+            
+            // verify each file can be found
+            for (Iterator i = archives.iterator(); i.hasNext();) {
+                File f = new File(i.next().toString());
+                if (!f.exists()) {
+                    log.warn("File " + f.getAbsolutePath() + " does not exist.");
+                    i.remove();
+                    continue;
+                }
+                if (!f.canRead()) {
+                    log.warn("File " + f.getAbsolutePath() + " exists but cannot be read.");
+                    i.remove();
+                    continue;
+                }
+            }
+            
+            // check to see if the warFiles list is now empty
+            if (archives.isEmpty()) {
+                throw new MojoExecutionException("No war files could be installed due errors.");
+            }
+             
+            // check to see if the dest dir exists or create it.
+            if (!assemblyOutputDirectory.exists()) {
+                if (log.isDebugEnabled()) {
+                    log.debug("Creating destination directory for assembled war files: " + assemblyOutputDirectory.getAbsolutePath());
+                }
+                try {                    
+                    if(!assemblyOutputDirectory.mkdirs()) {
+                        throw new MojoExecutionException("Unable to create destination directory for assembled war files: " + 
+                                assemblyOutputDirectory.getAbsolutePath());
+                    }                        
+                } catch (SecurityException e) {
+                    throw new MojoExecutionException("Unable to create destination directory for assembled war files: " + e.getMessage(), e);
+                }
+            } else {
+                if (!assemblyOutputDirectory.isDirectory()) {
+                    throw new MojoExecutionException("Specified destination for assembled war files " +
+                            assemblyOutputDirectory.getAbsolutePath() + " is not a directory!");
+                }
+                if (!assemblyOutputDirectory.canRead()||!assemblyOutputDirectory.canWrite()) {
+                    throw new MojoExecutionException("Unable to read or write to destination directory for assembed war files.  " +
+                            "Check permissions on the directory " + assemblyOutputDirectory.getAbsolutePath());
+                }
+            }
+            
+        // A list of archive files was not provided, so use the other parameters instead.
+            
+        } else {            
+            if (webXml == null || !webXml.exists()) {
+                throw new MojoExecutionException("Web application descriptor must be a valid web.xml");
+            }
+            if (portletXml == null || !portletXml.exists()) {
+                throw new MojoExecutionException("Portlet descriptor must be a valid portlet.xml");
+            }
+        }
+    }
+
+    // Private Methods ---------------------------------------------------------
+
+    private AssemblerConfig createAssemblerConfig() {
+        AssemblerConfig config = new AssemblerConfig();
+        config.setPortletDescriptor(portletXml);
+        config.setWebappDescriptor(webXml);
+        config.setDestination(webXmlDestination);
+        config.setDispatchServletClass(dispatchServletClass);
+        return config;
+    }
+    
+    private AssemblerConfig createArchiveAssemblerConfig(File archiveToAssemble, File destinationDirectory) {
+        AssemblerConfig config = new AssemblerConfig();
+        config.setDispatchServletClass(dispatchServletClass);
+        config.setSource(archiveToAssemble);
+        config.setDestination(destinationDirectory);
+        return config;
+    }
+
+}

Added: portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/InstallMojo.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/InstallMojo.java?view=auto&rev=562725
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/InstallMojo.java (added)
+++ portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/InstallMojo.java Sat Aug  4 07:41:23 2007
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.maven;
+
+/**
+ * @goal install
+ * @description the pluto ApplicationServerHook goal installs the pluto portal into the specified application server
+ * @requiresDependencyResolution runtime
+ *
+ */
+public class InstallMojo extends AbstractManagementMojo {
+
+    protected void doExecute() throws Exception {
+        getHandler().install(createInstallationConfig());
+    }
+}

Added: portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/InstallationDependency.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/InstallationDependency.java?view=auto&rev=562725
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/InstallationDependency.java (added)
+++ portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/InstallationDependency.java Sat Aug  4 07:41:23 2007
@@ -0,0 +1,209 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.maven;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Properties;
+
+/**
+ *
+ */
+class InstallationDependency {    
+    
+    private static final Properties VERSION_PROPERTIES = new Properties();
+    private static final String PROPERTIES_FILE = "/versions.properties";
+    static
+    {
+        try 
+        {
+            VERSION_PROPERTIES.load(InstallationDependency.class.getResourceAsStream(PROPERTIES_FILE));
+        } 
+        catch (IOException e) 
+        {
+            throw new RuntimeException("Cannot load " + PROPERTIES_FILE + " from the classpath!", e);
+        }
+    }
+
+    public static final InstallationDependency PORTLET_API =
+        new InstallationDependency("javax.portlet", "portlet-api", 
+                VERSION_PROPERTIES.getProperty("portlet-api.version"));
+
+    public static final InstallationDependency  DESCRIPTOR_API =
+        new InstallationDependency("org.apache.pluto", "pluto-descriptor-api", 
+                VERSION_PROPERTIES.getProperty("pluto.version"));
+
+    public static final InstallationDependency  DESCRIPTOR_IMPL =
+            new InstallationDependency("org.apache.pluto", "pluto-descriptor-impl", 
+                    VERSION_PROPERTIES.getProperty("pluto.version"));
+
+    public static final InstallationDependency  CONTAINER =
+            new InstallationDependency("org.apache.pluto", "pluto-container", 
+                    VERSION_PROPERTIES.getProperty("pluto.version"));
+
+    public static final InstallationDependency  TAGLIB =
+            new InstallationDependency("org.apache.pluto", "pluto-taglib", 
+                    VERSION_PROPERTIES.getProperty("pluto.version"));
+
+    public static final InstallationDependency  PORTAL =
+            new InstallationDependency("org.apache.pluto", "pluto-portal", 
+                    VERSION_PROPERTIES.getProperty("pluto.version"), "war");
+
+    public static final InstallationDependency  TESTSUITE =
+            new InstallationDependency("org.apache.pluto", "pluto-testsuite", 
+                    VERSION_PROPERTIES.getProperty("pluto.version"), "war");
+
+    public static final InstallationDependency  CASTOR =
+            new InstallationDependency("org.codehaus.castor", "castor", 
+                    VERSION_PROPERTIES.getProperty("castor.version"));
+
+    public static final InstallationDependency  COMMONS_LOGGING_API =
+            new InstallationDependency("commons-logging", "commons-logging-api",
+                    VERSION_PROPERTIES.getProperty("commons-logging.version"));
+
+    public static final InstallationDependency  XERCES =
+            new InstallationDependency("xerces", "xercesImpl", 
+                    VERSION_PROPERTIES.getProperty("xercesImpl.version"));
+
+    public static final InstallationDependency  XML_PARSER_APIS =
+            new InstallationDependency("xerces", "xmlParserAPIs", 
+                    VERSION_PROPERTIES.getProperty("xmlParserAPIs.version"));
+    
+    
+    public static final InstallationDependency JAXB_API =
+		new InstallationDependency("javax.xml.bind","jaxb-api",
+				VERSION_PROPERTIES.getProperty("jaxb.version"));
+    public static final InstallationDependency JAXB_IMPL =
+		new InstallationDependency("com.sun.xml.bind","jaxb-impl",
+				VERSION_PROPERTIES.getProperty("jaxb-impl.version"));
+    
+    public static final InstallationDependency STAX_API =
+		new InstallationDependency("stax","stax-api",
+				VERSION_PROPERTIES.getProperty("stax.api.version"));
+    public static final InstallationDependency STAX_IMPL =
+		new InstallationDependency("stax","stax",
+				VERSION_PROPERTIES.getProperty("stax.impl.version"));
+    
+    public static final InstallationDependency XALAN =
+		new InstallationDependency("xalan","xalan",
+				VERSION_PROPERTIES.getProperty("xalan.version"));
+    public static final InstallationDependency ACTIVATION =
+		new InstallationDependency("javax.activation","activation",
+				VERSION_PROPERTIES.getProperty("activation.version"));
+    
+
+    private static final List ENDORSED = new ArrayList();
+    private static final List SHARED = new ArrayList();
+
+    static {
+//        ENDORSED.add(XERCES);
+//        ENDORSED.add(XML_PARSER_APIS);
+        SHARED.add(XERCES);
+        SHARED.add(XML_PARSER_APIS);
+
+        SHARED.add(PORTLET_API);
+        SHARED.add(DESCRIPTOR_API);
+        SHARED.add(DESCRIPTOR_IMPL);
+        SHARED.add(CONTAINER);
+        SHARED.add(TAGLIB);
+        SHARED.add(CASTOR);
+        SHARED.add(COMMONS_LOGGING_API);
+//        SHARED.add(CASTOR);
+        
+        SHARED.add(JAXB_API);
+        SHARED.add(JAXB_IMPL);
+        
+        SHARED.add(STAX_API);
+        SHARED.add(STAX_IMPL);
+        
+        SHARED.add(ACTIVATION);
+
+
+    }
+
+
+    public static Collection getEndorsedDependencies() {
+        return Collections.unmodifiableCollection(ENDORSED);
+    }
+
+    public static Collection getSharedDependencies() {
+        return Collections.unmodifiableCollection(SHARED);
+    }
+
+    private String groupId;
+    private String artifactId;
+    private String version;
+    private String type;
+
+    public InstallationDependency(String groupId, String artifactId, String version) {
+        this(groupId, artifactId, version, "jar");
+    }
+
+    public InstallationDependency(String groupId, String artifactId, String version, String type) {
+        if (version == null || version.trim().equalsIgnoreCase(""))
+        {
+            throw new RuntimeException("Missing or invalid property for artifact " + 
+                    artifactId + " in " + PROPERTIES_FILE + "!");
+        }
+        
+        this.groupId = groupId;
+        this.artifactId = artifactId;
+        this.version = version;
+        this.type = type;
+    }
+
+
+    public String getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(String groupId) {
+        this.groupId = groupId;
+    }
+
+    public String getArtifactId() {
+        return artifactId;
+    }
+
+    public void setArtifactId(String artifactId) {
+        this.artifactId = artifactId;
+    }
+
+    public String getVersion() {
+        return version;
+    }
+
+    public void setVersion(String version) {
+        this.version = version;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+    
+}

Added: portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/ReinstallMojo.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/ReinstallMojo.java?view=auto&rev=562725
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/ReinstallMojo.java (added)
+++ portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/ReinstallMojo.java Sat Aug  4 07:41:23 2007
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.maven;
+
+import org.apache.pluto.util.install.InstallationConfig;
+
+
+/**
+ * @goal reinstall
+ * @requiresDependencyResolution runtime
+ */
+public class ReinstallMojo extends AbstractManagementMojo {
+
+    public ReinstallMojo() {
+
+    }
+
+    protected void doExecute() throws Exception {
+        InstallationConfig config = createInstallationConfig();
+        getHandler().uninstall(config);
+        getHandler().install(config);
+    }
+}

Added: portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/UninstallMojo.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/UninstallMojo.java?view=auto&rev=562725
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/UninstallMojo.java (added)
+++ portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/UninstallMojo.java Sat Aug  4 07:41:23 2007
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.maven;
+
+/**
+ * @goal uninstall
+ * @requiresDependencyResolution runtime
+ */
+public class UninstallMojo extends AbstractManagementMojo {
+
+    protected void doExecute() throws Exception {
+        getHandler().uninstall(createInstallationConfig());
+   }
+}

Added: portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/resources/versions.properties
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/resources/versions.properties?view=auto&rev=562725
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/resources/versions.properties (added)
+++ portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/resources/versions.properties Sat Aug  4 07:41:23 2007
@@ -0,0 +1,51 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with
+#  the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+
+# The properties defined in this file should align with the names of the 
+# <property> elements of Pluto's parent POM. This property file is 
+# interpolated and placed in the maven-pluto-plugin jar, and is 
+# used by the InstallationDependency class.
+portlet-api.version=${portlet-api.version}
+servlet-api.version=${servlet-api.version}
+jsp-api.version=${jsp-api.version}
+jstl.version=${jstl.version}
+taglibs.standard.version=${taglibs.standard.version}
+#removed in trunk version 543704
+xerces.version=${xerces.version}
+xercesImpl.version=${xerces.version}
+xmlParserAPIs.version=${xerces.version}
+castor.version=${castor.version}
+commons-digester.version=${commons-digester.version}
+commons-cli.version=${commons-cli.version}
+commons-httpclient.version=${commons-httpclient.version}
+commons-beanutils.version=${commons-beanutils.version}
+commons-logging.version=${commons-logging.version}
+log4j.version=${log4j.version}
+springframework.version=${springframework.version}
+plexus.version=${plexus.version}
+maven.version=${maven.version}
+ant.version=${ant.version}
+junit.version=${junit.version}
+jmock.version=${jmock.version}
+# The version of Pluto's parent POM.
+pluto.version=${pom.version}
+jaxb.version=${jaxb.version}
+jaxb-impl.version=${jaxb-impl.version}
+xalan.version=${xalan.version}
+activation.version=${activation.version}
+stax.api.version=${stax.api.version}
+stax.impl.version=${stax.impl.version}

Added: portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/scripts/hello.mmld
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/scripts/hello.mmld?view=auto&rev=562725
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/scripts/hello.mmld (added)
+++ portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/main/scripts/hello.mmld Sat Aug  4 07:41:23 2007
@@ -0,0 +1,33 @@
+<!--
+Copyright 2004 The Apache Software Foundation.
+Licensed  under the  Apache License,  Version 2.0  (the "License");
+you may not use  this file  except in  compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed  under the  License is distributed on an "AS IS" BASIS,
+WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or
+implied.
+
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<mojo xmlns="marmalade:mojo">
+  <metadata>
+    <goal>hello</goal>
+    <description>Say Hello to the World.</description>
+    <parameters>
+      <parameter>
+        <name>salutation</name>
+        <expression>#project.build.directory</expression>
+        <description>Description of what this parameter is used for.</description>
+      </parameter>
+    </parameters>
+  </metadata>
+  <execute>
+    <c:out xmlns:c="marmalade:core">Hello, World</c:out>
+  </execute>
+</mojo>
+

Added: portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/site/site.xml
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/site/site.xml?view=auto&rev=562725
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/site/site.xml (added)
+++ portals/pluto/branches/1.1-286-trunk-merge/maven-pluto-plugin/src/site/site.xml Sat Aug  4 07:41:23 2007
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Copyright 2005-2006 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project name="Maven">
+  <bannerLeft>
+    <name>Pluto Maven Plugin</name>
+    <src>http://portals.apache.org/pluto/images/pluto.png</src>
+    <href>http://portals.apache.org/pluto</href>
+  </bannerLeft>
+  <bannerRight>
+    <src>http://portals.apache.org/pluto/images/banner.png</src>
+  </bannerRight>
+  <body>
+    <links>
+      <item name="Pluto Home" href="http://portals.apache.org/pluto"/>
+      <item name="JSR 168" href="http://jcp.org/en/jsr/detail?id=168"/>
+	  <item name="Chinese Translation" href="http://heavyz.sourceforge.net/pluto_zh/pluto-container"/>
+    </links>
+
+	<menu name="Pluto Ant Tasks">
+      <item name="Getting Started" href="/getting-started.html"/>
+	</menu>
+
+    ${reports}
+  </body>
+</project>

Added: portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/pom.xml
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/pom.xml?view=auto&rev=562725
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/pom.xml (added)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/pom.xml Sat Aug  4 07:41:23 2007
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2005-2006 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  
+  <parent>
+    <groupId>org.apache.pluto</groupId>
+    <artifactId>pluto</artifactId>
+    <version>1.1.0-286-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>pluto-ant-tasks</artifactId> 
+  <packaging>jar</packaging>
+  <name>Pluto Ant Tasks</name> 
+  <description>The Pluto Ant Tasks are used to assemble, deploy, and publish portlets to the Pluto Portal Driver.</description>
+  
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.pluto</groupId>
+      <artifactId>pluto-util</artifactId>
+      <version>${pom.version}</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>ant</groupId>
+      <artifactId>ant</artifactId>
+      <version>${ant.version}</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+
+  <build> 
+    <scriptSourceDirectory>src/main/scripts</scriptSourceDirectory> 
+    <plugins>
+      <plugin>
+        <artifactId>maven-site-plugin</artifactId>
+        <configuration>
+          <resourcesDirectory>${basedir}/../pluto-site/src/site/resources</resourcesDirectory>
+        </configuration>
+      </plugin>
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <configuration>
+          <descriptor>src/assemble/bin.xml</descriptor>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  
+</project>
+
+

Added: portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/src/assemble/bin.xml
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/src/assemble/bin.xml?view=auto&rev=562725
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/src/assemble/bin.xml (added)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/src/assemble/bin.xml Sat Aug  4 07:41:23 2007
@@ -0,0 +1,55 @@
+<!--
+  Copyright 2005-2006 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<assembly>
+  <id>bin</id>
+  <formats>
+    <format>tar.gz</format>
+    <format>tar.bz2</format>
+    <format>zip</format>
+  </formats>
+  <fileSets>
+    <fileSet>
+      <directory>../</directory>
+      <outputDirectory>/</outputDirectory>
+      <includes>
+        <include>README*</include>
+		<include>LICENSE*</include>
+		<include>NOTICE*</include>
+      </includes>
+    </fileSet>
+    <fileSet>
+      <directory>target</directory>
+	  <outputDirectory></outputDirectory>
+      <includes>
+        <include>*.jar</include>
+      </includes>
+    </fileSet>
+    <fileSet>
+      <directory>target/site</directory>
+	  <outputDirectory>docs</outputDirectory>
+      <includes>
+        <include>**/*.*</include>
+      </includes>
+    </fileSet>
+  </fileSets>
+  <dependencySets>
+    <dependencySet>
+	  <outputDirectory>lib</outputDirectory>
+      <scope>runtime</scope>
+    </dependencySet>
+  </dependencySets>
+</assembly>
+

Added: portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/src/assemble/src.xml
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/src/assemble/src.xml?view=auto&rev=562725
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/src/assemble/src.xml (added)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/src/assemble/src.xml Sat Aug  4 07:41:23 2007
@@ -0,0 +1,36 @@
+<!--
+  Copyright 2005-2006 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<assembly>
+  <id>src</id>
+  <formats>
+    <format>tar.gz</format>
+    <format>tar.bz2</format>
+    <format>zip</format>
+  </formats>
+  <fileSets>
+    <fileSet>
+      <includes>
+        <include>README*</include>
+        <include>LICENSE*</include>
+        <include>NOTICE*</include>
+        <include>pom.xml</include>
+      </includes>
+    </fileSet>
+    <fileSet>
+      <directory>src</directory>
+    </fileSet>
+  </fileSets>
+</assembly>

Added: portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/src/main/java/org/apache/pluto/ant/AssembleTask.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/src/main/java/org/apache/pluto/ant/AssembleTask.java?view=auto&rev=562725
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/src/main/java/org/apache/pluto/ant/AssembleTask.java (added)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/src/main/java/org/apache/pluto/ant/AssembleTask.java Sat Aug  4 07:41:23 2007
@@ -0,0 +1,320 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.ant;
+
+import java.io.File;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+
+import org.apache.pluto.util.UtilityException;
+import org.apache.pluto.util.assemble.Assembler;
+import org.apache.pluto.util.assemble.AssemblerConfig;
+import org.apache.pluto.util.assemble.AssemblerFactory;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.DirectoryScanner;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.FileSet;
+
+/**
+ * TODO JavaDoc
+ *
+ * @version 1.0
+ * @since Nov 23, 2005
+ */
+public class AssembleTask extends Task {
+
+    /**
+     * Path to the portlet descriptor 
+     * (normally <code>WEB-INF/portlet.xml</code>)
+     * <p/>
+     * If <code>webapp</code> is specified, this File will
+     * be resolved relative to <code>webapp</code>
+     */
+    private File portletxml;
+
+    /**
+     * Path to the unassembled servlet descriptor 
+     * (normally <code>WEB-INF/web.xml</code>)
+     * <p/>
+     * If <code>webapp</code> is specified, this File will
+     * be resolved relative to <code>webapp</code>
+     */
+    private File webxml;
+    
+    /**
+     * Path the assembled servlet descriptor will
+     * be written to.
+     */
+    private File destfile;
+
+    /** 
+     * The base directory of the exploded web application to assemble.
+     * If set, <code>webXml</code> and <code>portletXml</code>
+     * will be resolved relative to this directory.
+     */
+    private File webapp;
+
+    /**
+     * Path to the archive to assemble.  EAR and WAR 
+     * packaging formats are supported.
+     */
+    private File archive;
+
+    /**
+     * Destination directory the assembled archives
+     * are written out to.
+     */
+    private File destdir;
+    
+    /**
+     * Collection allowing multiple files to be assembled
+     * at once.
+     */
+    private Collection archiveFileSets = new LinkedList();
+
+    public File getPortletxml() {
+        if(webapp != null)
+            return new File(webapp, "WEB-INF/portlet.xml");
+        return portletxml;
+    }
+
+    public void setPortletxml(File portletxml) {
+        this.portletxml = portletxml;
+    }
+
+    public File getWebxml() {
+        if(webapp != null)
+            return new File(webapp, "WEB-INF/web.xml");
+        return webxml;
+    }
+
+    public void setWebxml(File webxml) {
+        this.webxml = webxml;
+    }
+
+    public File getDestfile() {
+        if(destfile != null)
+            return destfile;
+        return getWebxml();
+    }
+
+    public void setDestfile(File destfile) {
+        this.destfile = destfile;
+    }
+
+    public File getWebapp() {
+        return webapp;
+    }
+
+    public void setWebapp(File webapp) {
+        this.webapp = webapp;
+    }
+
+    /**
+     * Note this methods remains to support
+     * backwards compatiblity.
+     * 
+     * @deprecated see <code>getArchive()</code>
+     */
+    public File getWar() {
+        return this.archive;
+    }
+
+    /**
+     * Note this methods remains to support
+     * backwards compatiblity.
+     * 
+     * @param war
+     * @deprecated see <code>setArchive(File)</code>
+     */
+    public void setWar(File war) {
+        this.archive = war;
+    }
+    
+    public File getArchive() {
+        return this.archive;
+    }
+    
+    public void setArchive(File archive) {
+        this.archive = archive;
+    }
+
+    public File getDestdir() {
+        if (destdir == null) {
+            return (archive != null ? archive.getParentFile() : null);
+        }
+        return this.destdir;
+    }
+
+    public void setDestdir(File destDir) {
+        this.destdir = destDir;
+    }
+
+    /**
+     * Note this method remains to support 
+     * backwards compatiblity.
+     * 
+     * @param fileSet
+     * @deprecated use addArchives instead
+     */
+    public void addWars(FileSet fileSet) {
+        this.archiveFileSets.add(fileSet);
+    }
+    
+    public void addArchives(FileSet fileSet) {
+        this.archiveFileSets.add(fileSet);
+    }
+
+    public void execute() throws BuildException {
+
+        validateArgs();
+
+        try {
+            if (this.archiveFileSets.size() > 0) {
+                for (final Iterator fileSetItr = this.archiveFileSets.iterator(); fileSetItr.hasNext();) {
+                    final FileSet fileSet = (FileSet)fileSetItr.next();
+                    final DirectoryScanner directoryScanner = fileSet.getDirectoryScanner(this.getProject());
+
+                    final File basedir = directoryScanner.getBasedir();
+                    final String[] includedFiles = directoryScanner.getIncludedFiles();
+
+                    for (int index = 0; index < includedFiles.length; index++) {
+                        AssemblerConfig config = new AssemblerConfig();
+
+                        final File archiveSource = new File(basedir, includedFiles[index]);
+                        config.setSource(archiveSource);
+                        config.setDestination(getDestdir());
+
+                        this.log("Assembling '" + archiveSource + "' to '" + getDestdir() + "'");
+                        Assembler assembler = AssemblerFactory.getFactory().createAssembler(config);
+                        assembler.assemble(config);
+                    }
+                }
+            }
+            else {
+                AssemblerConfig config = new AssemblerConfig();
+
+                final File archiveSource = getArchive();
+                if (archiveSource != null) {
+                    config.setSource(archiveSource);
+                    config.setDestination(getDestdir());
+                    this.log("Assembling '" + archiveSource + "' to '" + getDestdir() + "'");
+                }
+                else {
+                    config.setPortletDescriptor(getPortletxml());
+                    config.setWebappDescriptor(getWebxml());
+                    config.setDestination(getDestfile());
+                    this.log("Assembling '" + getWebxml() + "' to '" + getDestfile() + "'");
+                }
+
+                Assembler assembler = AssemblerFactory.getFactory().createAssembler(config);
+                assembler.assemble(config);
+            }
+        }
+
+        catch(UtilityException ue) {
+            throw new BuildException(ue);
+        }
+    }
+
+    private void validateArgs() throws BuildException {
+        //Check if running with webapp arg
+        if(webapp != null) {
+            if(!webapp.exists()) {
+               throw new BuildException("webapp "+webapp.getAbsolutePath()+ " does not exist");
+            }
+
+            if (archive != null) {
+                throw new BuildException("archive (or war) should not be specified if webapp is specified");
+            }
+            if (this.archiveFileSets.size() > 0) {
+                throw new BuildException("archive (or wars) should not be specified if webapp is specified");
+            }
+            // TODO check this
+            if (destdir != null) {
+                throw new BuildException("destfile should not be specified if webapp is specified");
+            }
+
+            return;
+        }
+
+        //Check if running with war arg
+        if (archive != null) {
+            if(!archive.exists()) {
+                throw new BuildException("Archive file "+archive.getAbsolutePath()+ " does not exist");
+            }
+
+            if (this.archiveFileSets.size() > 0) {
+                throw new BuildException("archives (or wars) should not be specified if archive (or war) is specified");
+            }
+            if (webapp != null) {
+                throw new BuildException("webapp should not be specified if archive (or war) is specified");
+            }
+            if (destfile != null) {
+                throw new BuildException("destfile should not be specified if archive (or war) is specified");
+            }
+            if (portletxml != null) {
+                throw new BuildException("portletxml should not be specified if archive (or war) is specified");
+            }
+            if (webxml != null) {
+                throw new BuildException("webxml should not be specified if archive (or war) is specified");
+            }
+
+            return;
+        }
+
+        //Check if running with archives or wars arg
+        if (this.archiveFileSets.size() > 0) {
+            if (archive != null) {
+                throw new BuildException("archives (or wars) should not be specified if archive (or war) is specified");
+            }
+            if (webapp != null) {
+                throw new BuildException("webapp should not be specified if archives (or wars) is specified");
+            }
+            if (destfile != null) {
+                throw new BuildException("destfile should not be specified if archives (or wars) is specified");
+            }
+            if (portletxml != null) {
+                throw new BuildException("portletxml should not be specified if archive (or wars) is specified");
+            }
+            if (webxml != null) {
+                throw new BuildException("webxml should not be specified if archives (or wars) is specified");
+            }
+
+            return;
+        }
+
+        //Check if running with portletxml && webxml args
+        if(portletxml == null || !portletxml.exists()) {
+            throw new BuildException("portletxml "+portletxml+" does not exist");
+        }
+        if(webxml == null || !webxml.exists()) {
+            throw new BuildException("webxml "+webxml + " does not exist");
+        }
+        if (archive != null) {
+            throw new BuildException("archive (or war) should not be specified if portletxml and webxml are specified");
+        }
+        if (this.archiveFileSets.size() > 0) {
+            throw new BuildException("archives (or wars) should not be specified if portletxml and webxml are specified");
+        }
+        if (destdir != null) {
+            // TODO check this
+            throw new BuildException("destfile should not be specified if portletxml and webxml are aspecified");
+        }
+    }
+}

Added: portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/src/main/java/org/apache/pluto/ant/ExamineArchiveTask.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/src/main/java/org/apache/pluto/ant/ExamineArchiveTask.java?view=auto&rev=562725
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/src/main/java/org/apache/pluto/ant/ExamineArchiveTask.java (added)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/src/main/java/org/apache/pluto/ant/ExamineArchiveTask.java Sat Aug  4 07:41:23 2007
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.ant;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.util.jar.JarEntry;
+import java.util.jar.JarInputStream;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+
+public class ExamineArchiveTask extends Task {
+    
+    private File archive = null;
+    
+    public void execute() throws BuildException {
+        try {
+        
+            JarInputStream jarIn = new JarInputStream( new FileInputStream( archive ) );
+            JarEntry entry;
+            while ( ( entry = jarIn.getNextJarEntry() ) != null ) {
+                String name = entry.getName();
+                long crc = entry.getCrc();
+                long size = entry.getSize();
+                long compressedSize = entry.getCompressedSize();
+                int compressMethod = entry.getMethod();
+                long timeStamp = entry.getTime();
+                int hashCode = entry.hashCode();
+                
+                StringBuffer out = new StringBuffer();
+                
+                out.append( "Name: " + name + "\n" );
+                out.append( "  Size: "                  + Long.toHexString( size ) + " " );
+                out.append( "  Compressed Size: "       + Long.toHexString( compressedSize ) + " " );
+                out.append( "  Compression Method: "    + compressMethod + " " );
+                out.append( "  Timestamp: "             + Long.toHexString( timeStamp ) + " " );
+                out.append( "  HashCode: "              + Integer.toHexString( hashCode ) + " " );
+                out.append( "  CRC: "                   + Long.toHexString( crc ) + " " );
+                
+                System.out.println( out.toString() );
+                
+            }
+        
+        } catch ( Exception e ) {
+            throw new BuildException( e.getMessage(), e );
+        }
+        
+    }
+    
+    public void setArchive( File archive ) {
+        this.archive = archive;
+    }
+    
+    public File getArchive( ) {
+        return this.archive;
+    }
+
+}

Added: portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/src/site/apt/getting-started.apt
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/src/site/apt/getting-started.apt?view=auto&rev=562725
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/src/site/apt/getting-started.apt (added)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/src/site/apt/getting-started.apt Sat Aug  4 07:41:23 2007
@@ -0,0 +1,59 @@
+~~
+~~ Copyright 2005-2006 The Apache Software Foundation.
+~~
+~~ Licensed under the Apache License, Version 2.0 (the "License");
+~~ you may not use this file except in compliance with the License.
+~~ You may obtain a copy of the License at
+~~
+~~      http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing, software
+~~ distributed under the License is distributed on an "AS IS" BASIS,
+~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+~~ See the License for the specific language governing permissions and
+~~ limitations under the License.
+~~
+ 
+ ------
+ Getting Started
+ ------
+ David H. DeWolf
+ ------
+ 23 Nov 2005
+ ------
+
+Getting Started
+
+  The Pluto Ant Tasks have been created to assist those not using
+  maven with the assembly, deployment, and publishing of Maven.
+  A usage example is shown below:
+
+---------------
+
+  <path id="classes">
+    <!--
+      Pluto Ant Tasks depend upon the following libraries:
+        * pluto-ant-tasks-${version}.jar
+        * pluto-util-${version}.jar
+        * pluto-descriptor-api-${version}.jar
+        * pluto-descriptor-util-${version}.jar
+        * commons-logging-1.0.4.jar
+        * castor-0.9.6
+      -->
+    <fileset dir="/path/to/pluto-libraries" includes="**/*.jar"/>
+    <fileset dir="/path/to/commons-logging" includes="**/*.jar"/>
+    <fileset dir="/path/to/castor" includes="**/*.jar"/>
+  </path>
+
+  <typedef name="passemble" classname="org.apache.pluto.ant.AssembleTask"
+		  classpathref="classes"/>
+
+   <target name="passemble">
+     <passemble 
+       webxml="src/config/web.xml" 
+       portletxml="src/config/portlet.xml" 
+       destfile="src/webapp/WEB-INF/web.xml"/>
+   </target>
+
+---------------
+

Added: portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/src/site/site.xml
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/src/site/site.xml?view=auto&rev=562725
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/src/site/site.xml (added)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-ant-tasks/src/site/site.xml Sat Aug  4 07:41:23 2007
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Copyright 2005-2006 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project name="Maven">
+  <bannerLeft>
+    <name>Pluto Ant Plugin</name>
+    <src>http://portals.apache.org/pluto/images/pluto.png</src>
+    <href>http://portals.apache.org/pluto</href>
+  </bannerLeft>
+  <bannerRight>
+    <src>http://portals.apache.org/pluto/images/banner.png</src>
+  </bannerRight>
+  <body>
+    <links>
+      <item name="Pluto Home" href="http://portals.apache.org/pluto"/>
+      <item name="JSR 168" href="http://jcp.org/en/jsr/detail?id=168"/>
+	  <item name="Chinese Translation" href="http://heavyz.sourceforge.net/pluto_zh/pluto-container"/>
+    </links>
+
+	<menu name="Pluto Ant Tasks">
+      <item name="Getting Started" href="/getting-started.html"/>
+	</menu>
+
+    ${reports}
+  </body>
+</project>

Added: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/pom.xml
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/pom.xml?view=auto&rev=562725
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/pom.xml (added)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/pom.xml Sat Aug  4 07:41:23 2007
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2005-2006 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  
+  <parent>
+    <groupId>org.apache.pluto</groupId>
+    <artifactId>pluto</artifactId>
+    <version>1.1.0-286-SNAPSHOT</version>
+  </parent>
+  
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.pluto</groupId>
+  <artifactId>pluto-container</artifactId>
+  <packaging>jar</packaging>
+  <name>Pluto Portlet Container</name>
+  <description>The pluto portlet container.</description>
+  
+  
+  <dependencies>
+
+    <!-- Pluto Support Libraries =========================================== -->
+    <dependency>
+      <groupId>org.apache.pluto</groupId>
+      <artifactId>pluto-descriptor-api</artifactId>
+      <version>${pom.version}</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+       <groupId>org.apache.pluto</groupId>
+       <artifactId>pluto-descriptor-impl</artifactId>
+       <version>${pom.version}</version>
+       <scope>runtime</scope>
+    </dependency>
+
+    <!-- Other Support Libraries =========================================== -->
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <version>${commons-logging.version}</version>
+      <scope>compile</scope>
+    </dependency>
+	<dependency>
+	  <groupId>stax</groupId>
+	  <artifactId>stax</artifactId>
+	  <version>${stax.impl.version}</version>
+	</dependency>
+	<dependency>
+	  <groupId>stax</groupId>
+	  <artifactId>stax</artifactId>
+	  <version>${stax.impl.version}</version>
+	</dependency>
+    
+    <!-- Specification Libraries =========================================== -->
+    <dependency>
+      <groupId>javax.portlet</groupId>
+      <artifactId>portlet-api</artifactId>
+      <version>${portlet-api.version}</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+      <version>${servlet-api.version}</version>
+      <scope>provided</scope>
+    </dependency>
+
+    <!-- Testing Libraries ================================================= -->
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>${junit.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>jmock</groupId>
+      <artifactId>jmock</artifactId>
+      <version>${jmock.version}</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <!-- Assembly Plugin: Create Distributions =========================== -->
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <configuration>
+          <descriptor>src/assemble/bin.xml</descriptor>
+        </configuration>
+      </plugin>
+      <!-- Surefire Plugin: Exec Tests ===================================== -->
+      <plugin>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <includes>
+            <include>**/*Test.java</include>
+          </includes>
+          <excludes>
+            <exclude>**/PlutoTestCase.java</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
+      <plugin>
+        <artifactId>maven-site-plugin</artifactId>
+        <configuration>
+          <resourcesDirectory>${basedir}/../pluto-site/src/site/resources</resourcesDirectory>
+        </configuration>
+      </plugin>
+      <plugin>
+      	<groupId>org.apache.maven.plugins</groupId>
+      	<artifactId>maven-compiler-plugin</artifactId>
+      	<!-- best lock down version of the plugin too -->
+      	<configuration>
+      		<source>1.5</source>
+      		<target>1.5</target>
+      	</configuration>
+      </plugin>
+    </plugins>
+  </build>
+  
+</project>
+
+
+
+

Added: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/assemble/bin.xml
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/assemble/bin.xml?view=auto&rev=562725
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/assemble/bin.xml (added)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/assemble/bin.xml Sat Aug  4 07:41:23 2007
@@ -0,0 +1,54 @@
+<!--
+  Copyright 2005-2006 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<assembly>
+  <id>bin</id>
+  <formats>
+    <format>tar.gz</format>
+    <format>tar.bz2</format>
+    <format>zip</format>
+  </formats>
+  <fileSets>
+    <fileSet>
+      <directory>../</directory>
+      <outputDirectory>/</outputDirectory>
+      <includes>
+        <include>README*</include>
+		<include>LICENSE*</include>
+		<include>NOTICE*</include>
+      </includes>
+    </fileSet>
+    <fileSet>
+      <directory>target</directory>
+	  <outputDirectory>/</outputDirectory>
+      <includes>
+        <include>*.jar</include>
+      </includes>
+    </fileSet>
+    <fileSet>
+      <directory>target/site</directory>
+	  <outputDirectory>docs</outputDirectory>
+      <includes>
+        <include>**/*.*</include>
+      </includes>
+    </fileSet>
+  </fileSets>
+  <dependencySets>
+    <dependencySet>
+	  <outputDirectory>lib</outputDirectory>
+      <scope>runtime</scope>
+    </dependencySet>
+  </dependencySets>
+</assembly>

Added: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/Constants.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/Constants.java?view=auto&rev=562725
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/Constants.java (added)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/Constants.java Sat Aug  4 07:41:23 2007
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto;
+
+/**
+ * Constant values used to bind internal portlet objects as attributes,
+ * typically to a request.
+ * @version 1.0
+ */
+public class Constants {
+
+    /**
+     * The key used to bind the <code>PortletRequest</code> to the underlying
+     * <code>HttpServletRequest</code>.
+     */
+    public final static String PORTLET_REQUEST = "javax.portlet.request";
+
+    /**
+     * The key used to bind the <code>PortletResponse</code> to the underlying
+     * <code>HttpServletRequest</code>.
+     */
+    public final static String PORTLET_RESPONSE = "javax.portlet.response";
+
+    /**
+     * The key used to bind the <code>PortletConfig</code> to the underlying
+     * PortletConfig.
+     */
+    public final static String PORTLET_CONFIG = "javax.portlet.config";
+
+    /**
+     *
+     */
+    public final static String TITLE_KEY = "javax.portlet.title";
+
+    /**
+     *
+     */
+    public final static String SHORT_TITLE_KEY = "javax.portlet.short-title";
+
+    /**
+     * 
+     */
+    public final static String KEYWORDS_KEY = "javax.portlet.keywords";
+
+    /**
+     * The key used to bind the method of processing being requested by the
+     * container to the underlying <code>PortletRquest</code>.
+     */
+    public final static String METHOD_ID = "org.apache.pluto.core.method";
+
+    /**
+     * The unique method identifier for render requests.  Render requests are
+     * requested through a call to the {@link PortletContainer#doRender(org.apache.pluto.PortletWindow,
+        * javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)}
+     * method.
+     */
+    public final static Integer METHOD_RENDER = new Integer(1);
+
+    /**
+     * The unique method identifier for render requests.  Render requests are
+     * requested through a call to the {@link PortletContainer#doAction(org.apache.pluto.PortletWindow,
+        * javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)}
+     * method.
+     */
+    public final static Integer METHOD_ACTION = new Integer(3);
+
+    /**
+     * The unique method identifier for render requests.  Render requests are
+     * requested through a call to the {@link PortletContainer#doLoad(org.apache.pluto.PortletWindow,
+        * javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)}
+     * method.
+     */
+    public final static Integer METHOD_NOOP = new Integer(5);
+
+    /**
+     * The unique method identifier for resource Serving requests.  Resource requests are
+     * requested through a call to the {@link PortletContainer#doServeResource(PortletWindow,
+     *  javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)}
+     * method.
+     */
+    public final static Integer METHOD_RESOURCE = new Integer(7);
+    
+    /**
+     * The unique method identifier for render requests.  Render requests are
+     * requested through a call to the {@link PortletContainer#doEvent(org.apache.pluto.PortletWindow,
+     * javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)}
+     * method.
+     */
+    public final static Integer METHOD_EVENT = new Integer(9);
+    
+	/**
+	 * the public key, to store the EventProvider in the Request
+	 */
+	public static final String PROVIDER = "EventProvider";
+	
+	/**
+	 * The public key, to store the event name in the request 
+	 */
+	public static final String EVENT_NAME = "EventName";
+	
+	/**
+	 * The public key, to store the PublicRenderProvider in the request
+	 */
+	public static final String PUBLIC_RENDER_PARAMETER_PROVIDER = "PublicRenderParameterProvider";
+	
+	/**
+	 * The public key, to store, if the render parameter are already cleared in the request
+	 */
+	public static final String RENDER_ALREADY_CLEARED = "RenderAlreadyCleared";
+
+	public static final String EVENT_NUMBER = "EventNumber";
+
+	public static final int MAX_EVENTS_SIZE = 10;
+
+	public static final long THREAD_DELAY_TIME = 300;
+
+}

Added: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/EventContainer.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/EventContainer.java?view=auto&rev=562725
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/EventContainer.java (added)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/EventContainer.java Sat Aug  4 07:41:23 2007
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto;
+
+
+import java.io.IOException;
+
+import javax.portlet.PortletException;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.portlet.Event;
+
+/**
+ * The publicized entry point into Pluto for firing events
+ * @author <a href="mailto:chrisra@cs.uni-jena.de">Christian Raschka</a>
+ */
+public interface EventContainer {
+	
+	/**
+     * Indicates that an event should be fired in the current request and calls
+     * the processEvent method of this portlet.
+     * @param internalPortletWindow the portlet Window
+     * @param request               the servlet request
+     * @param response              the servlet response
+	 * @param eventNumber 
+     * @throws PortletException          if one portlet has trouble fulfilling
+     *                                   the request
+     * @throws PortletContainerException if the portlet container implementation
+     *                                   has trouble fulfilling the request
+     */
+	public void fireEvent(HttpServletRequest request, HttpServletResponse response, 
+			PortletWindow window, Event event) throws PortletException, IOException;
+	
+	public ServletContext getServletContext();
+}



Mime
View raw message