geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r433457 - in /geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car: InstallConfigMojo.java PackageBuilder.java PackageMojo.java PlanProcessorMojo.java
Date Tue, 22 Aug 2006 01:40:19 GMT
Author: jdillon
Date: Mon Aug 21 18:40:18 2006
New Revision: 433457

URL: http://svn.apache.org/viewvc?rev=433457&view=rev
Log:
Added some more param docs
Setting initial values to keep IDEA from complaining
Merged PackageBuilder into PackageMojo to reduce code (no more dup setters/getters/fields)
Using logging to output details

Removed:
    geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/PackageBuilder.java
Modified:
    geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/InstallConfigMojo.java
    geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/PackageMojo.java
    geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/PlanProcessorMojo.java

Modified: geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/InstallConfigMojo.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/InstallConfigMojo.java?rev=433457&r1=433456&r2=433457&view=diff
==============================================================================
--- geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/InstallConfigMojo.java
(original)
+++ geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/InstallConfigMojo.java
Mon Aug 21 18:40:18 2006
@@ -25,23 +25,20 @@
 import org.apache.geronimo.kernel.repository.DefaultArtifactManager;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.FileWriteMonitor;
-import org.apache.geronimo.kernel.repository.MissingDependencyException;
 import org.apache.geronimo.kernel.repository.Dependency;
 import org.apache.geronimo.kernel.repository.WritableListableRepository;
 import org.apache.geronimo.system.repository.Maven2Repository;
 import org.apache.geronimo.system.configuration.RepositoryConfigurationStore;
 import org.apache.geronimo.system.resolver.ExplicitDefaultArtifactResolver;
 
-import org.apache.geronimo.plugin.MojoSupport;
-
 import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.project.MavenProject;
-import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.logging.Log;
 
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.BufferedInputStream;
 
 import java.util.Iterator;
 import java.util.HashSet;
@@ -59,14 +56,12 @@
 public class InstallConfigMojo
     extends AbstractCarMojo
 {
-    public static final FileWriteMonitor LOG_COPY_START = new StartFileWriteMonitor();
-
     /**
      * Root file of the TargetRepository.
      *
      * @parameter expression="${project.build.directory}"
      */
-    private String targetRoot;
+    private String targetRoot = null;
 
     /**
      * The location of the target repository relative to targetRoot.
@@ -74,7 +69,7 @@
      * @parameter default-value="archive-tmp/repository"
      * @required
      */
-    private String targetRepository;
+    private String targetRepository = null;
 
     /**
      * Configuration to be installed specified as groupId/artifactId/version/type
@@ -83,7 +78,7 @@
      * @parameter
      * @optional
      */
-    private String artifact;
+    private String artifact = null;
 
     /**
      * Location of the source repository for the dependencies
@@ -91,7 +86,7 @@
      * @parameter expression="${localRepository}"
      * @required
      */
-    private ArtifactRepository sourceRepository;
+    private ArtifactRepository sourceRepository = null;
     
     /**
      * The location where the properties mapping will be generated.
@@ -99,7 +94,7 @@
      * @parameter expression="${project.build.directory}/explicit-versions.properties"
      * @required
      */
-    private File explicitResolutionProperties;
+    private File explicitResolutionProperties = null;
 
     private ArtifactResolver artifactResolver;
 
@@ -167,27 +162,31 @@
         return dependenciesSet;
     }
 
-    private void execute(Artifact configId) throws Exception {
+    private void execute(final Artifact configArtifact) throws Exception {
+        assert configArtifact != null;
+
         LinkedHashSet dependencies;
 
+        StartFileWriteMonitor monitor = new StartFileWriteMonitor(log);
+
         // does this configuration exist?
-        if (!sourceRepo.contains(configId)) {
-            throw new NoSuchConfigException(configId);
+        if (!sourceRepo.contains(configArtifact)) {
+            throw new NoSuchConfigException(configArtifact);
         }
 
         // is this config already installed?
-        if (targetStore.containsConfiguration(configId)) {
-            log.info("Configuration " + configId + " already present in configuration store");
+        if (targetStore.containsConfiguration(configArtifact)) {
+            log.info("Configuration already present in configuration store: " + configArtifact);
             return;
         }
 
-        if (sourceStore.containsConfiguration(configId)) {
+        if (sourceStore.containsConfiguration(configArtifact)) {
             // Copy the configuration into the target configuration store
-            if (!targetStore.containsConfiguration(configId)) {
-                File sourceFile = sourceRepo.getLocation(configId);
-                InputStream in = new FileInputStream(sourceFile);
+            if (!targetStore.containsConfiguration(configArtifact)) {
+                File sourceFile = sourceRepo.getLocation(configArtifact);
+                InputStream in = new BufferedInputStream(new FileInputStream(sourceFile));
                 try {
-                    targetStore.install(in, (int)sourceFile.length(), configId, LOG_COPY_START);
+                    targetStore.install(in, (int)sourceFile.length(), configArtifact, monitor);
                 }
                 finally {
                     in.close();
@@ -196,7 +195,7 @@
 
             // Determine the dependencies of this configuration
             try {
-                ConfigurationData configurationData = targetStore.loadConfiguration(configId);
+                ConfigurationData configurationData = targetStore.loadConfiguration(configArtifact);
                 Environment environment = configurationData.getEnvironment();
                 dependencies = new LinkedHashSet();
                 for (Iterator iterator = environment.getDependencies().iterator(); iterator.hasNext();)
{
@@ -204,26 +203,26 @@
                     dependencies.add(dependency.getArtifact());
                 }
 
-                log.info("Installed configuration " + configId);
+                log.info("Installed configuration: " + configArtifact);
             }
             catch (IOException e) {
-                throw new InvalidConfigException("Unable to load configuration: " + configId,
e);
+                throw new InvalidConfigException("Unable to load configuration: " + configArtifact,
e);
             }
             catch (NoSuchConfigException e) {
-                throw new InvalidConfigException("Unable to load configuration: " + configId,
e);
+                throw new InvalidConfigException("Unable to load configuration: " + configArtifact,
e);
             }
         }
         else {
-            if (!sourceRepo.contains(configId)) {
-                throw new RuntimeException("Dependency: " + configId + " not found in local
maven repo: for configuration: " + artifact);
+            if (!sourceRepo.contains(configArtifact)) {
+                throw new RuntimeException("Dependency: " + configArtifact + " not found
in local maven repo: for configuration: " + this.artifact);
             }
 
             // Copy the artifact into the target repo
-            if (!targetRepo.contains(configId)) {
-                File sourceFile = sourceRepo.getLocation(configId);
-                InputStream in = new FileInputStream(sourceFile);
+            if (!targetRepo.contains(configArtifact)) {
+                File sourceFile = sourceRepo.getLocation(configArtifact);
+                InputStream in = new BufferedInputStream(new FileInputStream(sourceFile));
                 try {
-                    targetRepo.copyToRepository(in, (int)sourceFile.length(), configId, LOG_COPY_START);
+                    targetRepo.copyToRepository(in, (int)sourceFile.length(), configArtifact,
monitor);
                 }
                 finally {
                     in.close();
@@ -231,23 +230,27 @@
             }
 
             // Determine the dependencies of this artifact
-            dependencies = sourceRepo.getDependencies(configId);
+            dependencies = sourceRepo.getDependencies(configArtifact);
         }
         
         dependencies = artifactResolver.resolveInClassLoader(dependencies);
         for (Iterator iterator = dependencies.iterator(); iterator.hasNext();) {
-            Artifact artifact = (Artifact) iterator.next();
-            execute(artifact);
+            Artifact a = (Artifact)iterator.next();
+            execute(a);
         }
     }
 
-    private static class StartFileWriteMonitor implements FileWriteMonitor {
+    private static class StartFileWriteMonitor
+        implements FileWriteMonitor
+    {
+        private Log log;
+
+        public StartFileWriteMonitor(final Log log) {
+            this.log = log;
+        }
+
         public void writeStarted(String fileDescription, int fileSize) {
-            //
-            // FIXME: Using logging?
-            //
-            
-            System.out.println("Copying " + fileDescription);
+            log.info("Copying: " + fileDescription);
         }
 
         public void writeProgress(int bytes) {

Modified: geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/PackageMojo.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/PackageMojo.java?rev=433457&r1=433456&r2=433457&view=diff
==============================================================================
--- geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/PackageMojo.java
(original)
+++ geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/PackageMojo.java
Mon Aug 21 18:40:18 2006
@@ -20,10 +20,31 @@
 import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.HashSet;
+import java.net.URI;
 
 import org.apache.geronimo.deployment.PluginBootstrap2;
 import org.apache.geronimo.system.configuration.RepositoryConfigurationStore;
 import org.apache.geronimo.system.repository.Maven2Repository;
+import org.apache.geronimo.system.resolver.ExplicitDefaultArtifactResolver;
+import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.KernelRegistry;
+import org.apache.geronimo.kernel.KernelFactory;
+import org.apache.geronimo.kernel.Naming;
+import org.apache.geronimo.kernel.repository.DefaultArtifactManager;
+import org.apache.geronimo.kernel.log.GeronimoLogging;
+import org.apache.geronimo.kernel.management.State;
+import org.apache.geronimo.kernel.config.ConfigurationManager;
+import org.apache.geronimo.kernel.config.ConfigurationUtil;
+import org.apache.geronimo.kernel.config.ConfigurationData;
+import org.apache.geronimo.kernel.config.KernelConfigurationManager;
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.ReferencePatterns;
+import org.apache.geronimo.gbean.AbstractNameQuery;
 
 import org.apache.maven.archiver.MavenArchiveConfiguration;
 import org.apache.maven.archiver.MavenArchiver;
@@ -124,7 +145,7 @@
     private ArrayList deploymentConfigs;
 
     /**
-     * ???
+     * The name of the deployer which will be used to deploy the CAR.
      *
      * @parameter expression="org.apache.geronimo.configs/geronimo-gbean-deployer/${geronimoVersion}/car?j2eeType=Deployer,name=Deployer"
      * @required
@@ -132,7 +153,7 @@
     private String deployerName = null;
 
     /**
-     * ???
+     * The plan file for the CAR.
      *
      * @parameter expression="${project.build.directory}/plan/plan.xml"
      * @required
@@ -140,22 +161,25 @@
     private File planFile = null;
 
     /**
-     * ???
+     * The file to include as a module of the CAR.
      *
      * @parameter
      */
     private File moduleFile = null;
 
     /**
-     * ???
+     * An {@link ArtifactItem} to include as a module of the CAR.
      *
      * @parameter
      */
     private ArtifactItem module = null;
-    
+
     /**
      * The location where the properties mapping will be generated.
      *
+     * <p>
+     * Probably don't wanto to change this.
+     *
      * @parameter expression="${project.build.directory}/explicit-versions.properties"
      */
     private File explicitResolutionProperties = null;
@@ -210,12 +234,12 @@
         }
 
         generateExplicitVersionProperties(explicitResolutionProperties);
-        
+
         if (bootstrap) {
             executeBootShell();
         }
         else {
-            executePackageBuilderShell();
+            buildPackage();
         }
 
         // Build the archive
@@ -227,8 +251,7 @@
 
     private File getArtifactInRepositoryDir() {
         //
-        // HACK: Generate the filename in the repo... really should delegate this to the
-        //       repo impl, but need to condense PackageMojo and PackageBuilder first
+        // HACK: Generate the filename in the repo... really should delegate this to the
repo impl
         //
 
         File dir = new File(targetRepository, project.getGroupId().replace('.', '/'));
@@ -255,32 +278,6 @@
         boot.bootstrap();
     }
 
-    public void executePackageBuilderShell() throws Exception {
-        log.debug("Starting builder shell...");
-
-        PackageBuilder builder = new PackageBuilder();
-
-        //
-        // NOTE: May need to run this in a controlled classloader (w/reflection or a proxy)
-        //
-        //       http://www.nabble.com/PackageBuilderShellMojo-%28m2%29-and-classloaders-p5271991.html
-        //
-
-        builder.setDeployerName(deployerName);
-        builder.setDeploymentConfig(deploymentConfigs);
-        builder.setModuleFile(moduleFile);
-        builder.setPlanFile(planFile);
-        builder.setRepository(repository);
-        builder.setRepositoryClass(Maven2Repository.class.getName());
-        builder.setConfigurationStoreClass(MavenConfigStore.class.getName());
-        builder.setTargetRepository(targetRepository);
-        builder.setTargetRepositoryClass(Maven2Repository.class.getName());
-        builder.setTargetConfigurationStoreClass(RepositoryConfigurationStore.class.getName());
-        builder.setExplicitResolutionLocation(explicitResolutionProperties.getAbsolutePath());
-
-        builder.execute();
-    }
-
     /**
      * Generates the configuration archive.
      */
@@ -299,7 +296,7 @@
             if (classesDirectory.isDirectory()) {
                 archiver.getArchiver().addDirectory(classesDirectory);
             }
-            
+
             if (classpath != null) {
                 archive.addManifestEntry("Class-Path", getClassPath());
             }
@@ -348,5 +345,225 @@
         log.debug("Using classpath: " + buff);
 
         return buff.toString();
+    }
+
+    //
+    // Deployment
+    //
+
+    private static final String KERNEL_NAME = "geronimo.maven";
+
+    /**
+     * Reference to the kernel that will last the lifetime of this classloader.
+     * The KernelRegistry keeps soft references that may be garbage collected.
+     */
+    private static Kernel kernel;
+
+    private static AbstractName targetConfigStoreAName;
+
+    private static AbstractName targetRepositoryAName;
+
+    private boolean targetSet;
+
+    public void buildPackage() throws Exception {
+        log.info("Packaging module configuration: " + planFile);
+
+
+        Kernel kernel = createKernel();
+        if (!targetSet) {
+            kernel.stopGBean(targetRepositoryAName);
+            kernel.setAttribute(targetRepositoryAName, "root", targetRepository.toURI());
+            kernel.startGBean(targetRepositoryAName);
+
+            if (kernel.getGBeanState(targetConfigStoreAName) != State.RUNNING_INDEX) {
+                throw new IllegalStateException("After restarted repository then config store
is not running");
+            }
+
+            targetSet = true;
+        }
+
+        log.debug("Starting configuration...");
+
+        // start the Configuration we're going to use for this deployment
+        ConfigurationManager configurationManager = ConfigurationUtil.getConfigurationManager(kernel);
+        try {
+            for (Iterator iterator = deploymentConfigs.iterator(); iterator.hasNext();) {
+                String artifactName = (String) iterator.next();
+                org.apache.geronimo.kernel.repository.Artifact configName =
+                        org.apache.geronimo.kernel.repository.Artifact.create(artifactName);
+                if (!configurationManager.isLoaded(configName)) {
+                    configurationManager.loadConfiguration(configName);
+                    configurationManager.startConfiguration(configName);
+                }
+            }
+        } finally {
+            ConfigurationUtil.releaseConfigurationManager(kernel, configurationManager);
+        }
+
+        log.debug("Deploying...");
+
+        AbstractName deployer = locateDeployer(kernel);
+        invokeDeployer(kernel, deployer, targetConfigStoreAName.toString());
+    }
+
+    /**
+     * Create a Geronimo Kernel to contain the deployment configurations.
+     */
+    private synchronized Kernel createKernel() throws Exception {
+        // first return our cached version
+        if (kernel != null) {
+            return kernel;
+        }
+
+        log.debug("Creating kernel...");
+
+        // check the registry in case someone else created one
+        kernel = KernelRegistry.getKernel(KERNEL_NAME);
+        if (kernel != null) {
+            return kernel;
+        }
+
+        GeronimoLogging geronimoLogging = GeronimoLogging.getGeronimoLogging("WARN");
+        if (geronimoLogging == null) {
+            geronimoLogging = GeronimoLogging.DEBUG;
+        }
+        GeronimoLogging.initialize(geronimoLogging);
+
+        // boot one ourselves
+        kernel = KernelFactory.newInstance().createKernel(KERNEL_NAME);
+        kernel.boot();
+
+        bootDeployerSystem();
+
+        return kernel;
+    }
+
+    /**
+     * Boot the in-Maven deployment system.
+     *
+     * <p>
+     * This contains Repository and ConfigurationStore GBeans that map to
+     * the local maven installation.
+     */
+    private void bootDeployerSystem() throws Exception {
+        log.debug("Booting deployer system...");
+
+        org.apache.geronimo.kernel.repository.Artifact baseId =
+                new org.apache.geronimo.kernel.repository.Artifact("geronimo", "packaging",
"fixed", "car");
+        Naming naming = kernel.getNaming();
+        ConfigurationData bootstrap = new ConfigurationData(baseId, naming);
+        ClassLoader cl = getClass().getClassLoader();
+        Set repoNames = new HashSet();
+
+        // Source repo
+        GBeanData repoGBean = bootstrap.addGBean("SourceRepository", GBeanInfo.getGBeanInfo(Maven2Repository.class.getName(),
cl));
+        URI repositoryURI = repository.toURI();
+        repoGBean.setAttribute("root", repositoryURI);
+        repoNames.add(repoGBean.getAbstractName());
+
+        // Target repo
+        GBeanData targetRepoGBean = bootstrap.addGBean("TargetRepository", GBeanInfo.getGBeanInfo(Maven2Repository.class.getName(),
cl));
+        URI targetRepositoryURI = targetRepository.toURI();
+        targetRepoGBean.setAttribute("root", targetRepositoryURI);
+        repoNames.add(targetRepoGBean.getAbstractName());
+        targetRepositoryAName = targetRepoGBean.getAbstractName();
+
+        GBeanData artifactManagerGBean = bootstrap.addGBean("ArtifactManager", DefaultArtifactManager.GBEAN_INFO);
+        GBeanData artifactResolverGBean = bootstrap.addGBean("ArtifactResolver", ExplicitDefaultArtifactResolver.GBEAN_INFO);
+        artifactResolverGBean.setAttribute("versionMapLocation", explicitResolutionProperties.getAbsolutePath());
+        ReferencePatterns repoPatterns = new ReferencePatterns(repoNames);
+        artifactResolverGBean.setReferencePatterns("Repositories", repoPatterns);
+        artifactResolverGBean.setReferencePattern("ArtifactManager", artifactManagerGBean.getAbstractName());
+
+        Set storeNames = new HashSet();
+
+        // Source config store
+        GBeanInfo configStoreInfo = GBeanInfo.getGBeanInfo(MavenConfigStore.class.getName(),
cl);
+        GBeanData storeGBean = bootstrap.addGBean("ConfigStore", configStoreInfo);
+        if (configStoreInfo.getReference("Repository") != null) {
+            storeGBean.setReferencePattern("Repository", repoGBean.getAbstractName());
+        }
+        storeNames.add(storeGBean.getAbstractName());
+
+        // Target config store
+        GBeanInfo targetConfigStoreInfo = GBeanInfo.getGBeanInfo(RepositoryConfigurationStore.class.getName(),
cl);
+        GBeanData targetStoreGBean = bootstrap.addGBean("TargetConfigStore", targetConfigStoreInfo);
+        if (targetConfigStoreInfo.getReference("Repository") != null) {
+            targetStoreGBean.setReferencePattern("Repository", targetRepoGBean.getAbstractName());
+        }
+        storeNames.add(targetStoreGBean.getAbstractName());
+
+        targetConfigStoreAName = targetStoreGBean.getAbstractName();
+        targetSet = true;
+
+        GBeanData attrManagerGBean = bootstrap.addGBean("AttributeStore", MavenAttributeStore.GBEAN_INFO);
+        GBeanData configManagerGBean = bootstrap.addGBean("ConfigManager", KernelConfigurationManager.GBEAN_INFO);
+        configManagerGBean.setReferencePatterns("Stores", new ReferencePatterns(storeNames));
+        configManagerGBean.setReferencePattern("AttributeStore", attrManagerGBean.getAbstractName());
+        configManagerGBean.setReferencePattern("ArtifactManager", artifactManagerGBean.getAbstractName());
+        configManagerGBean.setReferencePattern("ArtifactResolver", artifactResolverGBean.getAbstractName());
+        configManagerGBean.setReferencePatterns("Repositories", repoPatterns);
+
+        ConfigurationUtil.loadBootstrapConfiguration(kernel, bootstrap, cl);
+    }
+
+    /**
+     * Locate a Deployer GBean matching the deployerName pattern.
+     *
+     * @param kernel the kernel to search.
+     * @return the ObjectName of the Deployer GBean
+     *
+     * @throws IllegalStateException if there is not exactly one GBean matching the deployerName
pattern
+     */
+    private AbstractName locateDeployer(final Kernel kernel) {
+        AbstractName name = new AbstractName(URI.create(deployerName));
+
+        Iterator i = kernel.listGBeans(new AbstractNameQuery(name)).iterator();
+        if (!i.hasNext()) {
+            throw new IllegalStateException("No deployer found matching deployerName: " +
name);
+        }
+
+        AbstractName deployer = (AbstractName)i.next();
+        if (i.hasNext()) {
+            throw new IllegalStateException("Multiple deployers found matching deployerName:
" + name);
+        }
+
+        return deployer;
+    }
+
+    private static final String[] DEPLOY_SIGNATURE = {
+        boolean.class.getName(),
+        File.class.getName(),
+        File.class.getName(),
+        File.class.getName(),
+        Boolean.TYPE.getName(),
+        String.class.getName(),
+        String.class.getName(),
+        String.class.getName(),
+        String.class.getName(),
+        String.class.getName(),
+        String.class.getName(),
+        String.class.getName(),
+        String.class.getName(),
+    };
+
+    private List invokeDeployer(final Kernel kernel, final AbstractName deployer, final String
targetConfigStore) throws Exception {
+        Object[] args = {
+            Boolean.FALSE, // Not in-place
+            planFile,
+            moduleFile,
+            null, // Target file
+            Boolean.TRUE, // Install
+            null, // main-class
+            null, // main-gbean
+            null, // main-method
+            null, // Manifest configurations
+            null, // class-path
+            null, // endorsed-dirs
+            null, // extension-dirs
+            targetConfigStore
+        };
+
+        return (List) kernel.invoke(deployer, "deploy", args, DEPLOY_SIGNATURE);
     }
 }

Modified: geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/PlanProcessorMojo.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/PlanProcessorMojo.java?rev=433457&r1=433456&r2=433457&view=diff
==============================================================================
--- geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/PlanProcessorMojo.java
(original)
+++ geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/PlanProcessorMojo.java
Mon Aug 21 18:40:18 2006
@@ -19,11 +19,10 @@
 
 import java.io.File;
 import java.io.StringWriter;
-import java.util.HashMap;
+
 import java.util.Iterator;
 import java.util.LinkedHashSet;
 import java.util.List;
-import java.util.Map;
 import java.util.Properties;
 
 import javax.xml.namespace.QName;
@@ -67,25 +66,25 @@
      * @parameter expression="${basedir}/src/plan"
      * @required
      */
-    private File sourceDir;
+    private File sourceDir = null;
 
     /**
      * @parameter expression="${project.build.directory}/plan"
      * @required
      */
-    private File targetDir;
+    private File targetDir = null;
 
     /**
      * @parameter default-value="plan.xml"
      * @required
      */
-    private String planFileName;
+    private String planFileName = null;
 
     /**
      * @parameter expression="${project.build.directory}/plan/plan.xml"
      * @required
      */
-    private File targetFile;
+    private File targetFile = null;
 
     private VelocityContext createContext() {
         VelocityContext context = new VelocityContext();



Mime
View raw message