You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2006/10/31 18:11:16 UTC

svn commit: r469565 [2/3] - in /maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src: main/java/org/apache/maven/plugin/eclipse/ main/java/org/apache/maven/plugin/eclipse/writers/rad/ main/resources/org/apache/maven/plugin/eclipse/ test/java/or...

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadLibCopier.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadLibCopier.java?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadLibCopier.java (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadLibCopier.java Tue Oct 31 09:11:12 2006
@@ -0,0 +1,152 @@
+package org.apache.maven.plugin.eclipse.writers.rad;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.eclipse.Constants;
+import org.apache.maven.plugin.eclipse.Messages;
+import org.apache.maven.plugin.eclipse.writers.AbstractEclipseWriter;
+import org.apache.maven.plugin.ide.IdeDependency;
+import org.apache.maven.plugin.logging.Log;
+import org.apache.maven.project.MavenProject;
+import org.codehaus.plexus.util.FileUtils;
+
+import java.io.File;
+import java.io.IOException;
+
+/**
+ * Copy all dependent jar in the directorys where RAD6 needs then to use the
+ * runtime enviorment in RAD6. so all dependent jars in the EAR rootdirectory
+ * and all dependend jars in the WAR WEB-INF/lib directory
+ * 
+ * @author <a href="mailto:nir@cfc.at">Richard van Nieuwenhoven</a>
+ */
+public class RadLibCopier
+    extends AbstractEclipseWriter
+{
+
+    /**
+     * copy the jars in the apropreate directorys.
+     * 
+     * @throws MojoExecutionException
+     *             when writing the config files was not possible
+     */
+    public void write()
+        throws MojoExecutionException
+    {
+        MavenProject project = config.getProject();
+        IdeDependency[] deps = config.getDeps();
+
+        String packaging = project.getPackaging();
+        if ( Constants.PROJECT_PACKAGING_EAR.equals( packaging ) )
+        {
+            handleEarLibs( deps );
+        }
+        else if ( Constants.PROJECT_PACKAGING_WAR.equals( packaging ) )
+        {
+            handleWarLibs( deps );
+        }
+    }
+
+    /**
+     * Copies the Artifact after building the destination file name if
+     * overridden. This method also checks if the classifier is set and adds it
+     * to the destination file name if needed.
+     * 
+     * @param deps
+     *            representing the dependencies to be copied.
+     * @param destDir
+     *            where should the atifact go.
+     * 
+     * @throws MojoExecutionException
+     *             with a message if an error occurs.
+     * 
+     * @see DependencyUtil#copyFile(File, File, Log)
+     * @see DependencyUtil#getFormattedFileName(Artifact, boolean)
+     */
+    private void copyArtifact( IdeDependency[] deps, File destDir )
+        throws MojoExecutionException
+    {
+        String[] oldFiles = FileUtils.getFilesFromExtension( destDir.getAbsolutePath(),
+                                                             new String[] { Constants.PROJECT_PACKAGING_JAR } );
+        for ( int index = 0; index < oldFiles.length; index++ )
+        {
+            if ( !new File( oldFiles[index] ).delete() )
+            {
+                log.error( Messages.getString( "Rad6LibCopier.cantdeletefile", new Object[] { oldFiles[index] } ) );
+            }
+        }
+        for ( int index = 0; index < deps.length; index++ )
+        {
+            if ( !deps[index].isTestDependency() && !deps[index].isProvided() && !deps[index].isReferencedProject()
+                && !deps[index].isSystemScoped() )
+            {
+                copyFile( deps[index].getFile(), new File( destDir, deps[index].getFile().getName() ), log );
+            }
+        }
+    }
+
+    /**
+     * Does the actual copy of the file and logging.
+     * 
+     * @param artifact
+     *            represents the file to copy.
+     * @param destFile
+     *            file name of destination file.
+     * @param log
+     *            to use for output.
+     * @throws MojoExecutionException
+     *             with a message if an error occurs.
+     */
+    private void copyFile( File artifact, File destFile, Log log )
+        throws MojoExecutionException
+    {
+        try
+        {
+            log.info( "Copying " + artifact.getAbsolutePath() + " to " + destFile );
+            FileUtils.copyFile( artifact, destFile );
+        }
+        catch ( IOException e )
+        {
+            throw new MojoExecutionException( "Error copying artifact from " + artifact + " to " + destFile, e );
+        }
+    }
+
+    /**
+     * EARs need the jars in the root directory.
+     * 
+     * @param deps
+     *            dependencys to include
+     * @throws MojoExecutionException
+     *             if the copying fails
+     */
+    private void handleEarLibs( IdeDependency[] deps )
+        throws MojoExecutionException
+    {
+        File targetDir = config.getProject().getBasedir();
+        copyArtifact( deps, targetDir );
+    }
+
+    /**
+     * WARs need the jars in the WEB-INF/lib directory.
+     * 
+     * @param deps
+     *            dependencys to include
+     * @throws MojoExecutionException
+     *             if the copying fails
+     */
+    private void handleWarLibs( IdeDependency[] deps )
+        throws MojoExecutionException
+    {
+        File basedir = config.getProject().getBasedir();
+        
+        String srcMainWebappWebInfLibDirName = basedir.getAbsolutePath() + File.separatorChar + "src"
+            + File.separatorChar + "main" + File.separatorChar + "webapp" + File.separatorChar + "WEB-INF"
+            + File.separatorChar + "lib";
+
+        File srcMainWebappWebInfLibDir = new File( srcMainWebappWebInfLibDirName );
+        srcMainWebappWebInfLibDir.mkdirs();
+
+        copyArtifact( deps, srcMainWebappWebInfLibDir );
+    }
+
+}

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadLibCopier.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadLibCopier.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadManifestWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadManifestWriter.java?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadManifestWriter.java (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadManifestWriter.java Tue Oct 31 09:11:12 2006
@@ -0,0 +1,340 @@
+package org.apache.maven.plugin.eclipse.writers.rad;
+
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.model.Resource;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.eclipse.Constants;
+import org.apache.maven.plugin.eclipse.EclipseSourceDir;
+import org.apache.maven.plugin.eclipse.Messages;
+import org.apache.maven.plugin.eclipse.writers.AbstractEclipseWriter;
+import org.apache.maven.plugin.eclipse.writers.AbstractWtpResourceWriter;
+import org.apache.maven.plugin.ide.IdeDependency;
+import org.apache.maven.project.MavenProject;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.jar.Attributes;
+import java.util.jar.Manifest;
+
+/**
+ * Create or adapt the manifest files for the RAD6 runtime dependencys.
+ * attention these will not be used for the real ear these are just to get the
+ * runtime enviorment using the maven dependencys.
+ * 
+ * @author <a href="mailto:nir@cfc.at">Richard van Nieuwenhoven </a>
+ */
+public class RadManifestWriter
+    extends AbstractEclipseWriter
+{
+
+    private static final String MANIFEST_MF_FILENAME = "MANIFEST.MF";
+
+    private static final String META_INF_DIRECTORY = "META-INF";
+
+    private static final String WEBAPP_RESOURCE_DIR = "src" + File.separatorChar + "main" + File.separatorChar
+        + "webapp";
+
+    /**
+     * Search the project for the existing META-INF directory where the manifest
+     * should be located.
+     * 
+     * @return the apsolute path to the META-INF directory
+     */
+    public String getMetaInfBaseDirectory( MavenProject project )
+    {
+        String metaInfBaseDirectory = null;
+        Iterator iterator = project.getResources().iterator();
+        while ( iterator.hasNext() )
+        {
+            metaInfBaseDirectory = ( (Resource) iterator.next() ).getDirectory();
+            
+            File metaInfDirectoryFile = new File( metaInfBaseDirectory + File.separatorChar + META_INF_DIRECTORY );
+            
+            if ( !metaInfDirectoryFile.isDirectory() )
+            {
+                metaInfBaseDirectory = null;
+            }
+        }
+        
+        if ( metaInfBaseDirectory == null && config.getProject().getPackaging().equals( Constants.PROJECT_PACKAGING_WAR ) )
+        {
+            metaInfBaseDirectory = config.getProject().getBasedir().getAbsolutePath() + File.separatorChar + WEBAPP_RESOURCE_DIR;
+            
+            if ( !new File( metaInfBaseDirectory + File.separatorChar + META_INF_DIRECTORY ).exists() )
+            {
+                metaInfBaseDirectory = null;
+            }
+        }
+        
+        return metaInfBaseDirectory;
+    }
+
+    /**
+     * Write the manifest files use an existing one it it exists (it will be
+     * overwritten!! in a war use webapp/META-INF else use the generated rad6
+     * sourcefolder
+     * 
+     * @see AbstractWtpResourceWriter#write(EclipseSourceDir[],
+     *      ArtifactRepository, File)
+     * @param sourceDirs
+     *            all eclipse source directorys
+     * @param localRepository
+     *            the local reposetory
+     * @param buildOutputDirectory
+     *            build output directory (target)
+     * @throws MojoExecutionException
+     *             when writing the config files was not possible
+     */
+    public void write()
+        throws MojoExecutionException
+    {
+        String metaInfBaseDirectory = getMetaInfBaseDirectory( config.getProject() );
+        
+        if ( metaInfBaseDirectory == null )
+        {
+            // TODO: if this really is an error, shouldn't we stop the build??
+            log.error( Messages.getString( "EclipseCleanMojo.nofilefound", new Object[] { META_INF_DIRECTORY } ) );
+            return;
+        }
+        
+        Manifest manifest = createNewManifest();
+
+        File manifestFile = new File( metaInfBaseDirectory + File.separatorChar + META_INF_DIRECTORY + File.separatorChar + MANIFEST_MF_FILENAME );
+
+        if ( shouldNewManifestFileBeWritten( manifest, manifestFile ) )
+        {
+            try
+            {
+                FileOutputStream stream = new FileOutputStream( manifestFile );
+                
+                manifest.write( stream );
+                
+                stream.close();
+                
+                verifyManifestBasedirInSourceDirs( metaInfBaseDirectory );
+                
+            }
+            catch ( Exception e )
+            {
+                log.error( Messages.getString( "EclipsePlugin.cantwritetofile", new Object[] { metaInfBaseDirectory
+                    + File.separatorChar + MANIFEST_MF_FILENAME } ) );
+            }
+
+        }
+    }
+
+    // NOTE: This could change the config!
+    private void verifyManifestBasedirInSourceDirs( String metaInfBaseDirectory )
+    {
+        EclipseSourceDir[] sourceDirs = config.getSourceDirs();
+        
+        if ( sourceDirs != null )
+        {
+            boolean foundMetaInfBaseDirectory = false;
+            
+            for ( int i = 0; i < sourceDirs.length; i++ )
+            {
+                EclipseSourceDir esd = sourceDirs[i];
+                
+                if ( esd.getPath().equals( metaInfBaseDirectory ) )
+                {
+                    foundMetaInfBaseDirectory = true;
+                    break;
+                }
+            }
+            
+            if ( !foundMetaInfBaseDirectory )
+            {
+                EclipseSourceDir dir = new EclipseSourceDir( metaInfBaseDirectory, null, true, false, null, null );
+                
+                EclipseSourceDir[] newSourceDirs = new EclipseSourceDir[ sourceDirs.length + 1 ];
+                newSourceDirs[ sourceDirs.length ] = dir;
+                
+                System.arraycopy( sourceDirs, 0, newSourceDirs, 0, sourceDirs.length );
+                
+                config.setSourceDirs( newSourceDirs );
+            }
+        }
+    }
+
+    /**
+     * Add one dependency to the black seperated classpath stringbuffer. Wenn
+     * the project is available in the reactor (current build) then the project
+     * is used else the jar representing the artifact.
+     * 
+     * @param classpath
+     *            existing classpath to append
+     * @param dependency
+     *            dependency to append as jar or as project
+     */
+    private void addDependencyToClassPath( StringBuffer classpath, IdeDependency dependency )
+    {
+        if ( !dependency.isTestDependency() && !dependency.isProvided() )
+        {
+            // blank is the separetor in manifest classpaths
+            if ( classpath.length() != 0 )
+            {
+                classpath.append( ' ' );
+            }
+            // if the dependency is a workspace project add the project and not
+            // the jar
+            if ( !dependency.isReferencedProject() )
+            {
+                classpath.append( dependency.getFile().getName() );
+            }
+            else
+            {
+                classpath.append( dependency.getArtifactId() + ".jar" );
+            }
+        }
+    }
+
+    /**
+     * Check if the two manifests are equal. Manifest.equal can not be used
+     * because of the special case the Classpath entr, witch must be comaired
+     * sorted so that a different oder in the classpath does not result in "not
+     * equal". This not not realy correct but in this case it is more important
+     * to reduce the number of version-controll files.
+     * 
+     * @param manifest
+     *            the new manifest
+     * @param existingManifest
+     *            to compaire the new one with
+     * @return are the manifests equal
+     */
+    private boolean areManifestsEqual( Manifest manifest, Manifest existingManifest )
+    {
+        Set keys = new HashSet();
+        Attributes existingMap = existingManifest.getMainAttributes();
+        Attributes newMap = manifest.getMainAttributes();
+        keys.addAll( existingMap.keySet() );
+        keys.addAll( newMap.keySet() );
+        Iterator iterator = keys.iterator();
+        while ( iterator.hasNext() )
+        {
+            Attributes.Name key = (Attributes.Name) iterator.next();
+            String newValue = (String) newMap.get( key );
+            String existingValue = (String) existingMap.get( key );
+            // special case classpath... they are qual when there entries
+            // are equal
+            if ( Attributes.Name.CLASS_PATH.equals( key ) )
+            {
+                newValue = orderClasspath( newValue );
+                existingValue = orderClasspath( existingValue );
+            }
+            if ( ( newValue == null || !newValue.equals( existingValue ) )
+                && ( existingValue == null || !existingValue.equals( newValue ) ) )
+            {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Convert all dependencies in a blank seperated list of jars and projects
+     * representing the classpath.
+     * 
+     * @return the blank separeted classpath string
+     */
+    private String constructManifestClasspath()
+    {
+        StringBuffer stringBuffer = new StringBuffer();
+        IdeDependency[] deps = config.getDeps();
+        
+        for ( int index = 0; index < deps.length; index++ )
+        {
+            addDependencyToClassPath( stringBuffer, deps[index] );
+        }
+        
+        return stringBuffer.toString();
+    }
+
+    /**
+     * Create a manifest contaigning the required classpath.
+     * 
+     * @return the newly created manifest
+     */
+    private Manifest createNewManifest()
+    {
+        Manifest manifest = new Manifest();
+        manifest.getMainAttributes().put( Attributes.Name.MANIFEST_VERSION, "1.0" );
+        manifest.getMainAttributes().put( Attributes.Name.CLASS_PATH, constructManifestClasspath() );
+        return manifest;
+    }
+
+    /**
+     * Aphabeticaly sort the classpath. Do this by splitting it up, sort the
+     * entries and gleue them together again.
+     * 
+     * @param newValue
+     *            classpath to sort
+     * @return the sorted classpath
+     */
+    private String orderClasspath( String newValue )
+    {
+        String[] entries = newValue.split( " " );
+        Arrays.sort( entries );
+        StringBuffer buffer = new StringBuffer( newValue.length() );
+        for ( int index = 0; index < entries.length; index++ )
+        {
+            buffer.append( entries[index] );
+            buffer.append( ' ' );
+        }
+        return buffer.toString();
+    }
+
+    /**
+     * Read and parse the existing manifest file.
+     * 
+     * @param manifestFile
+     *            file
+     * @return the read manifest
+     * @throws IOException
+     *             if the file could not be read
+     */
+    private Manifest readExistingManifest( File manifestFile )
+        throws IOException
+    {
+        Manifest existingManifest = new Manifest();
+        FileInputStream inputStream = new FileInputStream( manifestFile );
+        existingManifest.read( inputStream );
+        inputStream.close();
+        return existingManifest;
+    }
+
+    /**
+     * Verify is the manifest sould be overwritten this sould take in account
+     * that the manifest should only be written if the contents of the classpath
+     * was changed not the order. The classpath sorting oder should be ignored.
+     * 
+     * @param manifest
+     *            the newly created classpath
+     * @param manifestFile
+     *            the file where the manifest
+     * @return if the new manifest file must be written
+     */
+    private boolean shouldNewManifestFileBeWritten( Manifest manifest, File manifestFile )
+    {
+        try
+        {
+            Manifest existingManifest = readExistingManifest( manifestFile );
+            if ( areManifestsEqual( manifest, existingManifest ) )
+            {
+                log.info( Messages.getString( "EclipseCleanMojo.unchanged", manifestFile.getAbsolutePath() ) );
+                return false;
+            }
+        }
+        catch ( Exception e )
+        {
+            log.debug( Messages.getString( "EclipseCleanMojo.nofilefound", manifestFile.getAbsolutePath() ) );
+        }
+        return true;
+    }
+}

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadManifestWriter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadManifestWriter.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebSettingsWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebSettingsWriter.java?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebSettingsWriter.java (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebSettingsWriter.java Tue Oct 31 09:11:12 2006
@@ -0,0 +1,147 @@
+package org.apache.maven.plugin.eclipse.writers.rad;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.eclipse.Constants;
+import org.apache.maven.plugin.eclipse.Messages;
+import org.apache.maven.plugin.eclipse.writers.AbstractEclipseWriter;
+import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter;
+import org.codehaus.plexus.util.xml.XMLWriter;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+
+/**
+ * Creates a .settings folder for Eclipse WTP 1.x release and writes out the
+ * configuration under it.
+ * 
+ * @author <a href="mailto:nir@cfc.at">Richard van Nieuwenhoven </a>
+ */
+public class RadWebSettingsWriter
+    extends AbstractEclipseWriter
+{
+
+    private static final String COM_IBM_ETOOLS_SITEEDIT_WIZARDS_PROJECTFEATURE_WEB_SITE_FEATURE = "com.ibm.etools.siteedit.wizards.projectfeature.WebSiteFeature";
+
+    private static final String WEBSETTINGS_CONTEXT_ROOT = "context-root";
+
+    private static final String WEBSETTINGS_FEATURE = "feature";
+
+    private static final String WEBSETTINGS_FEATURE_ID = "feature-id";
+
+    private static final String WEBSETTINGS_FEATURES = "features";
+
+    private static final String WEBSETTINGS_FILENAME = ".websettings";
+
+    private static final String WEBSETTINGS_JSP_LEVEL = "jsp-level";
+
+    private static final String WEBSETTINGS_PROJECT_TYPE = "project-type";
+
+    private static final String WEBSETTINGS_TEMPLATEFEATURE = "templatefeature";
+
+    private static final String WEBSETTINGS_VERSION = "version";
+
+    private static final String WEBSETTINGS_WEBCONTENT = "webcontent";
+
+    private static final String WEBSETTINGS_WEBSETTINGS = "websettings";
+
+    /**
+     * the context root to use for this project
+     */
+    private String warContextRoot;
+
+    /**
+     * required default constructor.
+     * 
+     * @param warContextRoot
+     *            the context root to use for this project
+     */
+    public RadWebSettingsWriter( String warContextRoot )
+    {
+        this.warContextRoot = warContextRoot;
+    }
+
+    /**
+     * write the websettings file for RAD6 if needed.
+     * @throws MojoExecutionException
+     *             when writing the config files was not possible
+     */
+    public void write()
+        throws MojoExecutionException
+    {
+        FileWriter w;
+        if ( Constants.PROJECT_PACKAGING_WAR.equalsIgnoreCase( config.getProject().getPackaging() ) )
+        {
+            try
+            {
+                w = new FileWriter( new File( config.getEclipseProjectDirectory(), WEBSETTINGS_FILENAME ) );
+            }
+            catch ( IOException ex )
+            {
+                throw new MojoExecutionException( Messages.getString( "EclipsePlugin.erroropeningfile" ), ex ); //$NON-NLS-1$
+            }
+
+            XMLWriter writer = new PrettyPrintXMLWriter( w, "UTF-8", null );
+            writeModuleTypeFacetCore( writer );
+            IOUtil.close( w );
+        }
+    }
+
+    /**
+     * write the websettings file for RAD6.
+     * 
+     * @param writer
+     *            where to write to
+     */
+    private void writeModuleTypeFacetCore( XMLWriter writer )
+    {
+        writer.startElement( WEBSETTINGS_WEBSETTINGS );
+        writer.addAttribute( WEBSETTINGS_VERSION, "600" );
+        writer.startElement( WEBSETTINGS_WEBCONTENT );
+        writer.writeText( "src/main/webapp" );
+        writer.endElement();
+        writer.startElement( WEBSETTINGS_CONTEXT_ROOT );
+        writer.writeText( getContextRoot( warContextRoot ) );
+        writer.endElement();
+        writer.startElement( WEBSETTINGS_PROJECT_TYPE );
+        writer.writeText( "J2EE" );
+        writer.endElement();
+        writer.startElement( WEBSETTINGS_JSP_LEVEL );
+        writer.writeText( "1.3" );
+        writer.endElement();
+        writer.startElement( WEBSETTINGS_FEATURES );
+        writer.startElement( WEBSETTINGS_FEATURE );
+        writer.startElement( WEBSETTINGS_FEATURE_ID );
+        writer.writeText( WEBSETTINGS_TEMPLATEFEATURE );
+        writer.endElement();
+        writer.endElement();
+        writer.startElement( WEBSETTINGS_FEATURE );
+        writer.startElement( WEBSETTINGS_FEATURE_ID );
+        writer.writeText( COM_IBM_ETOOLS_SITEEDIT_WIZARDS_PROJECTFEATURE_WEB_SITE_FEATURE );
+        writer.endElement();
+        writer.endElement();
+        writer.endElement();
+        writer.endElement();
+    }
+
+    /**
+     * Create the ContextRoot for this project, the default is the artifact id
+     * 
+     * @param warContextRoot
+     *            set as a configuration property.
+     * @return the context root to use
+     */
+    private String getContextRoot( String warContextRoot )
+    {
+        if ( warContextRoot == null || warContextRoot.length() == 0 )
+        {
+            return config.getProject().getArtifactId();
+        }
+        else
+        {
+            return warContextRoot;
+        }
+    }
+
+}

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebSettingsWriter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebSettingsWriter.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebsiteConfigWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebsiteConfigWriter.java?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebsiteConfigWriter.java (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebsiteConfigWriter.java Tue Oct 31 09:11:12 2006
@@ -0,0 +1,87 @@
+package org.apache.maven.plugin.eclipse.writers.rad;
+
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.eclipse.Constants;
+import org.apache.maven.plugin.eclipse.EclipseSourceDir;
+import org.apache.maven.plugin.eclipse.Messages;
+import org.apache.maven.plugin.eclipse.writers.AbstractEclipseWriter;
+import org.apache.maven.plugin.eclipse.writers.AbstractWtpResourceWriter;
+import org.apache.maven.project.MavenProject;
+import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter;
+import org.codehaus.plexus.util.xml.XMLWriter;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+
+/**
+ * Creates a .settings folder for Eclipse WTP 1.x release and writes out the
+ * configuration under it.
+ * 
+ * @author <a href="mailto:nir@cfc.at">Richard van Nieuwenhoven</a>
+ */
+public class RadWebsiteConfigWriter
+    extends AbstractEclipseWriter
+{
+
+    private static final String WEBSITE_CONFIG_FILENAME = ".website-config";
+
+    private static final String WEBSITE_CONFIG_STRUCTURE = "structure";
+
+    private static final String WEBSITE_CONFIG_VERSION = "version";
+
+    private static final String WEBSITE_CONFIG_WEBSITE = "website";
+
+    /**
+     * write the website-config file for RAD6 if needed.
+     * 
+     * @see AbstractWtpResourceWriter#write(EclipseSourceDir[],
+     *      ArtifactRepository, File)
+     * @param sourceDirs
+     *            all eclipse source directorys
+     * @param localRepository
+     *            the local reposetory
+     * @param buildOutputDirectory
+     *            build output directory (target)
+     * @throws MojoExecutionException
+     *             when writing the config files was not possible
+     */
+    public void write()
+        throws MojoExecutionException
+    {
+        MavenProject project = config.getProject();
+
+        FileWriter w;
+        if ( Constants.PROJECT_PACKAGING_WAR.equalsIgnoreCase( project.getPackaging() ) )
+        {
+            try
+            {
+                w = new FileWriter( new File( config.getEclipseProjectDirectory(), WEBSITE_CONFIG_FILENAME ) );
+            }
+            catch ( IOException ex )
+            {
+                throw new MojoExecutionException( Messages.getString( "EclipsePlugin.erroropeningfile" ), ex ); //$NON-NLS-1$
+            }
+            XMLWriter writer = new PrettyPrintXMLWriter( w, "UTF-8", null );
+            writeModuleTypeFacetCore( writer );
+            IOUtil.close( w );
+        }
+    }
+
+    /**
+     * write the website-config file.
+     * 
+     * @param writer
+     *            wher to write to
+     */
+    private void writeModuleTypeFacetCore( XMLWriter writer )
+    {
+        writer.startElement( WEBSITE_CONFIG_WEBSITE );
+        writer.addAttribute( WEBSITE_CONFIG_VERSION, "600" );
+        writer.startElement( WEBSITE_CONFIG_STRUCTURE );
+        writer.endElement();
+        writer.endElement();
+    }
+}

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebsiteConfigWriter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebsiteConfigWriter.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/resources/org/apache/maven/plugin/eclipse/messages.properties
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/resources/org/apache/maven/plugin/eclipse/messages.properties?view=diff&rev=469565&r1=469564&r2=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/resources/org/apache/maven/plugin/eclipse/messages.properties (original)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/resources/org/apache/maven/plugin/eclipse/messages.properties Tue Oct 31 09:11:12 2006
@@ -38,4 +38,6 @@
 
 EclipseOSGiManifestWriter.nomanifestfile=The references manifest file doesn''t exist, plugin dependencies will not be updated: {0}
 
-IdeDependency.cantreadfile=Unable to read file: {0}
\ No newline at end of file
+IdeDependency.cantreadfile=Unable to read file: {0}
+
+Rad6LibCopier.cantdeletefile=Failed to delete file: {0}
\ No newline at end of file

Modified: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/AbstractEclipsePluginTestCase.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/AbstractEclipsePluginTestCase.java?view=diff&rev=469565&r1=469564&r2=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/AbstractEclipsePluginTestCase.java (original)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/AbstractEclipsePluginTestCase.java Tue Oct 31 09:11:12 2006
@@ -15,17 +15,6 @@
  */
 package org.apache.maven.plugin.eclipse;
 
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Properties;
-
 import org.apache.maven.cli.ConsoleDownloadMonitor;
 import org.apache.maven.embedder.MavenEmbedder;
 import org.apache.maven.embedder.MavenEmbedderConsoleLogger;
@@ -35,9 +24,24 @@
 import org.apache.maven.plugin.ide.IdeUtils;
 import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.PlexusTestCase;
+import org.codehaus.plexus.archiver.ArchiverException;
+import org.codehaus.plexus.archiver.jar.JarArchiver;
+import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.StringUtils;
 
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileInputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Properties;
+
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @author <a href="mailto:fgiust@apache.org">Fabrizio Giustina</a>
@@ -56,8 +60,23 @@
      * Test repository directory.
      */
     protected File localRepositoryDir = getTestFile( "target/test-classes/m2repo" );
+    
+    /**
+     * Location in test localRepository for staging the plugin jar.
+     */
+    protected File pluginFile = new File( localRepositoryDir, "/org/apache/maven/plugins/maven-eclipse-plugin/current/maven-eclipse-plugin-current.jar" );
+    
+    /**
+     * Location in test localRepository for staging the plugin metadata.
+     */
+    protected File metadataFile = new File( localRepositoryDir, "/org/apache/maven/plugins/maven-eclipse-plugin/maven-metadata-local.xml" );
 
     /**
+     * Location in test localRepository for staging the plugin POM.
+     */
+    protected File pomFile = new File( localRepositoryDir, "/org/apache/maven/plugins/maven-eclipse-plugin/current/maven-eclipse-plugin-current.pom" );
+    
+    /**
      * @see org.codehaus.plexus.PlexusTestCase#setUp()
      */
     protected void setUp()
@@ -72,9 +91,52 @@
         this.maven.setInteractiveMode( false );
         this.maven.start();
 
+        stagePlugin();
+
         super.setUp();
     }
 
+    protected void stagePlugin()
+        throws ArchiverException, IOException
+    {
+        pluginFile.getParentFile().mkdirs();
+        
+        JarArchiver jarArchiver = new JarArchiver();
+        jarArchiver.setDestFile( pluginFile );
+        jarArchiver.addDirectory( new File( "target/classes" ) );
+        
+        jarArchiver.createArchive();
+        
+        FileWriter writer = null;
+        try
+        {
+            metadataFile.getParentFile().mkdirs();
+            
+            writer = new FileWriter( metadataFile );
+            
+            writer.write( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
+                    "\n<metadata>" +
+                    "\n  <groupId>org.apache.maven.plugins</groupId>" +
+                    "\n  <artifactId>maven-eclipse-plugin</artifactId>" +
+                    "\n  <versioning>" +
+                    "\n    <latest>current</latest>" +
+                    "\n    <release>current</release>" +
+                    "\n    <versions>" +
+                    "\n      <version>current</version>" +
+                    "\n    </versions>" +
+                    "\n    <lastUpdated>" + System.currentTimeMillis() + "</lastUpdated>" +
+                    "\n  </versioning>" +
+                    "\n</metadata>" );
+        }
+        finally
+        {
+            IOUtil.close( writer );
+        }
+        
+        pomFile.getParentFile().mkdirs();
+        FileUtils.copyFile( new File( "pom.xml" ), pomFile );
+    }
+
     /**
      * @see org.codehaus.plexus.PlexusTestCase#tearDown()
      */
@@ -93,7 +155,7 @@
     protected void testProject( String projectName )
         throws Exception
     {
-        testProject( projectName, new Properties() );
+        testProject( projectName, new Properties(), "clean", "eclipse" );
     }
 
     /**
@@ -101,10 +163,25 @@
      * @param projectName project directory
      * @param properties additional properties
      * @throws Exception any exception generated during test
+     * @deprecated Use {@link #testProject(String,Properties,String,String)} instead
      */
     protected void testProject( String projectName, Properties properties )
         throws Exception
     {
+        testProject( projectName, properties, "clean", "eclipse" );
+    }
+
+    /**
+     * Execute the eclipse:eclipse goal on a test project and verify generated files.
+     * @param projectName project directory
+     * @param properties additional properties
+     * @param cleanGoal TODO
+     * @param genGoal TODO
+     * @throws Exception any exception generated during test
+     */
+    protected void testProject( String projectName, Properties properties, String cleanGoal, String genGoal )
+        throws Exception
+    {
 
         File basedir = getTestFile( "target/test-classes/projects/" + projectName );
 
@@ -128,8 +205,8 @@
         }
 
         this.maven.execute( project, Arrays.asList( new String[] {
-            "org.apache.maven.plugins:maven-eclipse-plugin:clean",
-            "org.apache.maven.plugins:maven-eclipse-plugin:eclipse" } ), eventMonitor, new ConsoleDownloadMonitor(),
+            "org.apache.maven.plugins:maven-eclipse-plugin:current:" + cleanGoal,
+            "org.apache.maven.plugins:maven-eclipse-plugin:current:" + genGoal } ), eventMonitor, new ConsoleDownloadMonitor(),
                             properties, basedir );
 
         compareDirectoryContent( basedir, projectOutputDir, "" );

Modified: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java?view=diff&rev=469565&r1=469564&r2=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java (original)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java Tue Oct 31 09:11:12 2006
@@ -138,7 +138,7 @@
     {
         Properties props = new Properties();
         props.put( "outputDirectory", "bin" );
-        testProject( "project-15", props );
+        testProject( "project-15", props, "clean", "eclipse" );
     }
 
     //Commented out: failing due to MNG-2025

Modified: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/InstallPluginsMojoTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/InstallPluginsMojoTest.java?view=diff&rev=469565&r1=469564&r2=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/InstallPluginsMojoTest.java (original)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/InstallPluginsMojoTest.java Tue Oct 31 09:11:12 2006
@@ -36,7 +36,7 @@
 
     private static final String VERSION = "0.0.9";
 
-    private static final String SOURCE_PATH = "M2REPO/org/codehaus/m2eclipse/" + ARTIFACT_ID + "/" + VERSION + "/"
+    private static final String SOURCE_PATH = "/org/codehaus/m2eclipse/" + ARTIFACT_ID + "/" + VERSION + "/"
         + ARTIFACT_ID + "-" + VERSION + ".jar";
 
     private File sourceFile;
@@ -170,11 +170,18 @@
     {
         fileManager = new TestFileManager( "InstallPluginsMojo.test.", "" );
 
-        URL resource = Thread.currentThread().getContextClassLoader().getResource( SOURCE_PATH );
+        URL resource = null;
+        
+        resource = Thread.currentThread().getContextClassLoader().getResource( "m2repo" + SOURCE_PATH );
+        
+        if ( resource == null )
+        {
+            resource = Thread.currentThread().getContextClassLoader().getResource( "M2REPO" + SOURCE_PATH );
+        }
 
         if ( resource == null )
         {
-            throw new IllegalStateException( "Cannot find test source jar: " + SOURCE_PATH + " in context classloader!" );
+            throw new IllegalStateException( "Cannot find test source jar: (m2repo|M2REPO)" + SOURCE_PATH + " in context classloader!" );
         }
 
         sourceFile = new File( resource.getPath() );

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/RadPluginTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/RadPluginTest.java?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/RadPluginTest.java (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/RadPluginTest.java Tue Oct 31 09:11:12 2006
@@ -0,0 +1,238 @@
+/*
+ * Copyright 2001-2005 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.maven.plugin.eclipse;
+
+import java.io.File;
+import java.io.FileReader;
+import java.util.Arrays;
+import java.util.Properties;
+
+import org.apache.maven.cli.ConsoleDownloadMonitor;
+import org.apache.maven.embedder.MavenEmbedderConsoleLogger;
+import org.apache.maven.embedder.PlexusLoggerAdapter;
+import org.apache.maven.monitor.event.DefaultEventMonitor;
+import org.apache.maven.monitor.event.EventMonitor;
+import org.apache.maven.plugin.ide.IdeUtils;
+import org.apache.maven.project.MavenProject;
+import org.codehaus.plexus.util.FileUtils;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
+import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ */
+public class RadPluginTest
+    extends AbstractEclipsePluginTestCase
+{
+    public void testProject1()
+        throws Exception
+    {
+        testProject( "project-rad-1", new Properties(), "rad-clean", "rad" );
+    }
+
+    public void testProject2()
+        throws Exception
+    {
+        testProject( "project-rad-2", new Properties(), "rad-clean", "rad" );
+        File generatedManifest = getTestFile( "src/test/resources/projects/project-rad-2/src/main/webapp/META-INF/MANIFEST.MF" );
+        File expectedManifest = getTestFile( "src/test/resources/projects/project-rad-2/src/main/webapp/META-INF/expected_MANIFEST.MF" );
+        assertFileEquals( this.localRepositoryDir.getCanonicalPath(), generatedManifest, expectedManifest );
+
+    }
+
+    public void testProject3()
+        throws Exception
+    {
+        testProject( "project-rad-3", new Properties(), "rad-clean", "rad" );
+        File generatedManifest = getTestFile( "src/test/resources/projects/project-rad-3/ejbModule/META-INF/MANIFEST.MF" );
+        File expectedManifest = getTestFile( "src/test/resources/projects/project-rad-3/ejbModule/META-INF/expected_MANIFEST.MF" );
+        assertFileEquals( this.localRepositoryDir.getCanonicalPath(), generatedManifest, expectedManifest );
+    }
+
+    public void testProject4()
+        throws Exception
+    {
+        testProject( "project-rad-4", new Properties(), "rad-clean", "rad" );
+    }
+
+    public void testProject5()
+        throws Exception
+    {
+        File basedir = getTestFile( "src/test/resources/projects/project-rad-5" );
+
+        FileUtils.deleteDirectory( getTestFile( "src/test/resources/projects/project-rad-5/project-rad-1/META-INF" ) );
+        getTestFile( "src/test/resources/projects/project-rad-5/project-rad-1/META-INF" ).mkdir();
+
+        MavenProject project = this.maven.readProjectWithDependencies( new File( basedir, "pom.xml" ) );
+        MavenProject project2 = this.maven
+            .readProjectWithDependencies( new File(
+                                                    getTestFile( "src/test/resources/projects/project-rad-5/project-rad-2" ),
+                                                    "pom.xml" ) );
+        MavenProject project3 = this.maven
+            .readProjectWithDependencies( new File(
+                                                    getTestFile( "src/test/resources/projects/project-rad-5/project-rad-3" ),
+                                                    "pom.xml" ) );
+
+        EventMonitor eventMonitor = new DefaultEventMonitor( new PlexusLoggerAdapter( new MavenEmbedderConsoleLogger() ) );
+
+        String outputDirPath = IdeUtils.getPluginSetting( project, "maven-eclipse-plugin", "outputDir", null );
+        File outputDir;
+
+        if ( outputDirPath == null )
+        {
+            outputDir = basedir;
+        }
+        else
+        {
+            outputDir = new File( basedir, outputDirPath );
+            outputDir.mkdirs();
+            new File( outputDir, project.getArtifactId() );
+        }
+        this.maven.execute( Arrays.asList( new MavenProject[] { project, project2, project3 } ), Arrays
+            .asList( new String[] {
+                "install",
+                "org.apache.maven.plugins:maven-eclipse-plugin:current:rad-clean",
+                "org.apache.maven.plugins:maven-eclipse-plugin:current:rad" } ), eventMonitor, new ConsoleDownloadMonitor(),
+                            new Properties(), basedir );
+        MavenProject project1 = this.maven
+            .readProjectWithDependencies( new File(
+                                                    getTestFile( "src/test/resources/projects/project-rad-5/project-rad-1" ),
+                                                    "pom.xml" ) );
+        this.maven.execute( Arrays.asList( new MavenProject[] { project1, project2, project3 } ), Arrays
+            .asList( new String[] {
+                "install",
+                "org.apache.maven.plugins:maven-eclipse-plugin:current:rad-clean",
+                "org.apache.maven.plugins:maven-eclipse-plugin:current:rad" } ), eventMonitor, new ConsoleDownloadMonitor(),
+                            new Properties(), basedir );
+
+        // jar muss reincoliert sein
+        assertTrue( getTestFile( "src/test/resources/projects/project-rad-5/project-rad-1/maven-core-98.0.jar" )
+            .exists() );
+
+        Xpp3Dom applicationXml = Xpp3DomBuilder
+            .build( new FileReader(
+                                    getTestFile( "src/test/resources/projects/project-rad-5/project-rad-1/META-INF/application.xml" ) ) );
+        Xpp3Dom modulesmapsXml = Xpp3DomBuilder
+            .build( new FileReader(
+                                    getTestFile( "src/test/resources/projects/project-rad-5/project-rad-1/META-INF/.modulemaps" ) ) );
+
+        assertNotNull( modulesmapsXml );
+
+        Xpp3Dom webappModule = applicationXml.getChildren( "module" )[0];
+        Xpp3Dom ejbModule = applicationXml.getChildren( "module" )[1];
+        if ( webappModule.getChild( "web" ) == null )
+        {
+            webappModule = applicationXml.getChildren( "module" )[1];
+            ejbModule = applicationXml.getChildren( "module" )[0];
+        }
+
+        assertEquals( "project-rad-2.war", webappModule.getChild( "web" ).getChild( "web-uri" ).getValue() );
+        assertEquals( "project-rad-2", webappModule.getChild( "web" ).getChild( "context-root" ).getValue() );
+        assertEquals( "project-rad-3.jar", ejbModule.getChild( "ejb" ).getValue() );
+
+    }
+
+    public void testProject5_2()
+        throws Exception
+    {
+
+        FileUtils.deleteDirectory( getTestFile( "src/test/resources/projects/project-rad-5/project-rad-1/META-INF" ) );
+        FileUtils.copyDirectory( getTestFile( "src/test/resources/projects/project-rad-5/project-rad-1/META-INF-2" ),
+                                 getTestFile( "src/test/resources/projects/project-rad-5/project-rad-1/META-INF" ) );
+
+        File basedir = getTestFile( "src/test/resources/projects/project-rad-5" );
+        MavenProject project = this.maven.readProjectWithDependencies( new File( basedir, "pom.xml" ) );
+        MavenProject project2 = this.maven
+            .readProjectWithDependencies( new File(
+                                                    getTestFile( "src/test/resources/projects/project-rad-5/project-rad-2" ),
+                                                    "pom.xml" ) );
+        MavenProject project3 = this.maven
+            .readProjectWithDependencies( new File(
+                                                    getTestFile( "src/test/resources/projects/project-rad-5/project-rad-3" ),
+                                                    "pom.xml" ) );
+
+        EventMonitor eventMonitor = new DefaultEventMonitor( new PlexusLoggerAdapter( new MavenEmbedderConsoleLogger() ) );
+
+        String outputDirPath = IdeUtils.getPluginSetting( project, "maven-eclipse-plugin", "outputDir", null );
+        File outputDir;
+
+        if ( outputDirPath == null )
+        {
+            outputDir = basedir;
+        }
+        else
+        {
+            outputDir = new File( basedir, outputDirPath );
+            outputDir.mkdirs();
+            new File( outputDir, project.getArtifactId() );
+        }
+        this.maven.execute( Arrays.asList( new MavenProject[] { project, project2, project3 } ), Arrays
+            .asList( new String[] {
+                "install",
+                "org.apache.maven.plugins:maven-eclipse-plugin:current:rad-clean",
+                "org.apache.maven.plugins:maven-eclipse-plugin:current:rad" } ), eventMonitor, new ConsoleDownloadMonitor(),
+                            new Properties(), basedir );
+        MavenProject project1 = this.maven
+            .readProjectWithDependencies( new File(
+                                                    getTestFile( "src/test/resources/projects/project-rad-5/project-rad-1" ),
+                                                    "pom.xml" ) );
+        this.maven.execute( Arrays.asList( new MavenProject[] { project1, project2, project3 } ), Arrays
+            .asList( new String[] {
+                "install",
+                "org.apache.maven.plugins:maven-eclipse-plugin:current:rad-clean",
+                "org.apache.maven.plugins:maven-eclipse-plugin:current:rad" } ), eventMonitor, new ConsoleDownloadMonitor(),
+                            new Properties(), basedir );
+
+        assertTrue( getTestFile( "src/test/resources/projects/project-rad-5/project-rad-1/maven-core-98.0.jar" )
+            .exists() );
+
+        File application1 = new File(
+                                      "src/test/resources/projects/project-rad-5/project-rad-1/META-INF/application.xml" );
+        File application2 = new File(
+                                      "src/test/resources/projects/project-rad-5/project-rad-1/META-INF-2/application.xml" );
+        File modulemaps1 = new File( "src/test/resources/projects/project-rad-5/project-rad-1/META-INF/.modulemaps" );
+        File modulemaps2 = new File( "src/test/resources/projects/project-rad-5/project-rad-1/META-INF-2/.modulemaps" );
+
+        assertNotNull( modulemaps1 );
+        assertNotNull( modulemaps2 );
+
+        Xpp3Dom applicationXml1 = Xpp3DomBuilder.build( new FileReader( application1 ) );
+
+        Xpp3Dom webappModule1 = applicationXml1.getChildren( "module" )[0];
+        Xpp3Dom ejbModule1 = applicationXml1.getChildren( "module" )[1];
+        if ( webappModule1.getChild( "web" ) == null )
+        {
+            webappModule1 = applicationXml1.getChildren( "module" )[1];
+            ejbModule1 = applicationXml1.getChildren( "module" )[0];
+        }
+
+        Xpp3Dom applicationXml2 = Xpp3DomBuilder.build( new FileReader( application2 ) );
+
+        Xpp3Dom webappModule2 = applicationXml2.getChildren( "module" )[0];
+        Xpp3Dom ejbModule2 = applicationXml2.getChildren( "module" )[1];
+        if ( webappModule2.getChild( "web" ) == null )
+        {
+            webappModule2 = applicationXml2.getChildren( "module" )[0];
+            ejbModule2 = applicationXml2.getChildren( "module" )[1];
+        }
+
+        assertEquals( webappModule1.getAttribute( "id" ), webappModule2.getAttribute( "id" ) );
+        assertEquals( ejbModule1.getAttribute( "id" ), ejbModule2.getAttribute( "id" ) );
+
+    }
+
+}

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/RadPluginTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/RadPluginTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-25/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-25/pom.xml?view=diff&rev=469565&r1=469564&r2=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-25/pom.xml (original)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-25/pom.xml Tue Oct 31 09:11:12 2006
@@ -22,7 +22,7 @@
         </includes>
       </resource>
       <resource>
-        <directory>/src/main/java</directory>
+        <directory>src/main/java</directory>
         <includes>
           <include>*.xml</include>
         </includes>

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-25/src/main/java/test.xml
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-25/src/main/java/test.xml?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-25/src/main/java/test.xml (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-25/src/main/java/test.xml Tue Oct 31 09:11:12 2006
@@ -0,0 +1 @@
+<test/>

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-25/src/main/java/test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-25/src/main/java/test.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/META-INF/.modulemaps
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/META-INF/.modulemaps?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/META-INF/.modulemaps (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/META-INF/.modulemaps Tue Oct 31 09:11:12 2006
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<modulemap:EARProjectMap xmlns:xmi="http://www.omg.org/XMI" xmlns:application="application.xmi" xmi:version="2.0" xmlns:modulemap="modulemap.xmi" xmi:id="EARProjectMap_1152783253629"></modulemap:EARProjectMap>
\ No newline at end of file

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/META-INF/application.xml
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/META-INF/application.xml?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/META-INF/application.xml (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/META-INF/application.xml Tue Oct 31 09:11:12 2006
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Application_ID" xmlns:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd" version="1.4">
+  <description></description>
+  <display-name>maven-eclipse-plugin-test-project-rad-1</display-name>
+</application>
\ No newline at end of file

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/META-INF/application.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/META-INF/application.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/j2ee
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/j2ee?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/j2ee (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/j2ee Tue Oct 31 09:11:12 2006
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<j2eesettings version="600">
+  <moduleversion>14</moduleversion>
+</j2eesettings>
\ No newline at end of file

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/pom.xml?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/pom.xml (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/pom.xml Tue Oct 31 09:11:12 2006
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>eclipse</groupId>
+	<artifactId>maven-eclipse-plugin-test-project-rad-1</artifactId>
+	<version>0.0.1-SNAPSHOT</version>
+	<packaging>ear</packaging>
+	<build>
+	</build>
+	<dependencies>
+		<dependency>
+			<groupId>log4j</groupId>
+			<artifactId>log4j</artifactId>
+			<version>1.2.8</version>
+		</dependency>
+	</dependencies>
+</project>

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/project
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/project?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/project (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/project Tue Oct 31 09:11:12 2006
@@ -0,0 +1,18 @@
+<projectDescription>
+  <name>maven-eclipse-plugin-test-project-rad-1</name>
+  <comment/>
+  <projects/>
+  <buildSpec>
+    <buildCommand>
+      <name>com.ibm.etools.validation.validationbuilder</name>
+      <arguments/>
+    </buildCommand>
+    <buildCommand>
+      <name>com.ibm.sse.model.structuredbuilder</name>
+      <arguments/>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>com.ibm.wtp.j2ee.EARNature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/classpath
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/classpath?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/classpath (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/classpath Tue Oct 31 09:11:12 2006
@@ -0,0 +1,6 @@
+<classpath>
+  <classpathentry kind="src" path="src/main/java"/>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="var" path="M2_REPO/maven/maven-core/98.0/maven-core-98.0.jar" sourcepath="M2_REPO/maven/maven-core/98.0/maven-core-98.0-sources.jar"/>
+</classpath>
\ No newline at end of file

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/pom.xml?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/pom.xml (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/pom.xml Tue Oct 31 09:11:12 2006
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+	<modelVersion>4.0.0</modelVersion>
+	<packaging>war</packaging>
+	<groupId>eclipse</groupId>
+	<artifactId>maven-eclipse-plugin-test-project-rad-2</artifactId>
+	<version>0.0.1-SNAPSHOT</version>
+	<name>Maven</name>
+	<dependencies>
+		<dependency>
+			<groupId>maven</groupId>
+			<artifactId>maven-core</artifactId>
+			<version>98.0</version>
+		</dependency>
+	</dependencies>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<configuration>
+					<source>1.4</source>
+					<target>1.4</target>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+</project>

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/project
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/project?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/project (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/project Tue Oct 31 09:11:12 2006
@@ -0,0 +1,57 @@
+<projectDescription>
+  <name>maven-eclipse-plugin-test-project-rad-2</name>
+  <comment/>
+  <projects/>
+  <buildSpec>
+    <buildCommand>
+      <name>com.ibm.wtp.migration.MigrationBuilder</name>
+      <arguments/>
+    </buildCommand>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+      <arguments/>
+    </buildCommand>
+    <buildCommand>
+      <name>com.ibm.etools.j2ee.ui.LibDirBuilder</name>
+      <arguments/>
+    </buildCommand>
+    <buildCommand>
+      <name>com.ibm.etools.webtools.additions.linksbuilder</name>
+      <arguments/>
+    </buildCommand>
+    <buildCommand>
+      <name>com.ibm.etools.webpage.template.templatebuilder</name>
+      <arguments/>
+    </buildCommand>
+    <buildCommand>
+      <name>com.ibm.etools.siteedit.SiteNavBuilder</name>
+      <arguments/>
+    </buildCommand>
+    <buildCommand>
+      <name>com.ibm.etools.siteedit.SiteUpdateBuilder</name>
+      <arguments/>
+    </buildCommand>
+    <buildCommand>
+      <name>com.ibm.etools.validation.validationbuilder</name>
+      <arguments/>
+    </buildCommand>
+    <buildCommand>
+      <name>com.ibm.wtp.j2ee.LibCopyBuilder</name>
+      <arguments/>
+    </buildCommand>
+    <buildCommand>
+      <name>com.ibm.etools.webtools.additions.jspcompilationbuilder</name>
+      <arguments/>
+    </buildCommand>
+    <buildCommand>
+      <name>com.ibm.sse.model.structuredbuilder</name>
+      <arguments/>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>com.ibm.wtp.web.WebNature</nature>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+    <nature>com.ibm.etools.siteedit.WebSiteNature</nature>
+    <nature>com.ibm.etools.webpage.template.templatenature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/settings
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/settings?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/settings (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/settings Tue Oct 31 09:11:12 2006
@@ -0,0 +1,5 @@
+#Sat Aug 20 22:43:01 CEST 2005
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.source=1.4
+org.eclipse.jdt.core.compiler.compliance=1.4

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/java/DummyClass.txt
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/java/DummyClass.txt?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/java/DummyClass.txt (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/java/DummyClass.txt Tue Oct 31 09:11:12 2006
@@ -0,0 +1,7 @@
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public class DummyClass
+{
+}

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/java/DummyClass.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/java/DummyClass.txt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/webapp/META-INF/expected_MANIFEST.MF
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/webapp/META-INF/expected_MANIFEST.MF?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/webapp/META-INF/expected_MANIFEST.MF (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/webapp/META-INF/expected_MANIFEST.MF Tue Oct 31 09:11:12 2006
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: maven-core-98.0.jar
+

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/websettings
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/websettings?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/websettings (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/websettings Tue Oct 31 09:11:12 2006
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<websettings version="600">
+  <webcontent>src/main/webapp</webcontent>
+  <context-root>maven-eclipse-plugin-test-project-rad-2</context-root>
+  <project-type>J2EE</project-type>
+  <jsp-level>1.3</jsp-level>
+  <features>
+    <feature>
+      <feature-id>templatefeature</feature-id>
+    </feature>
+    <feature>
+      <feature-id>com.ibm.etools.siteedit.wizards.projectfeature.WebSiteFeature</feature-id>
+    </feature>
+  </features>
+</websettings>
\ No newline at end of file

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/classpath
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/classpath?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/classpath (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/classpath Tue Oct 31 09:11:12 2006
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+  <classpathentry kind="src" path="ejbModule"></classpathentry>
+  <classpathentry kind="src" path="src/main/java"></classpathentry>
+  <classpathentry kind="lib" path="target/websphere/generated-classes"></classpathentry>
+  <classpathentry sourcepath="M2_REPO/maven/maven-core/98.0/maven-core-98.0-sources.jar" kind="var" path="M2_REPO/maven/maven-core/98.0/maven-core-98.0.jar"></classpathentry>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"></classpathentry>
+  <classpathentry kind="con" path="com.ibm.wtp.server.java.core.container/com.ibm.ws.ast.st.runtime.core.runtimeTarget.v60/was.base.v6"></classpathentry>
+  <classpathentry kind="output" path="target/classes"></classpathentry>
+</classpath>
\ No newline at end of file

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/ejbModule/META-INF/ejb-jar.xml
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/ejbModule/META-INF/ejb-jar.xml?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/ejbModule/META-INF/ejb-jar.xml (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/ejbModule/META-INF/ejb-jar.xml Tue Oct 31 09:11:12 2006
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar id="ejb-jar_ID" version="2.1"
+	xmlns="http://java.sun.com/xml/ns/j2ee"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
+	<display-name>ejb-test-project</display-name>
+	<enterprise-beans>
+
+	</enterprise-beans>
+	<assembly-descriptor></assembly-descriptor>
+</ejb-jar>

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/ejbModule/META-INF/ejb-jar.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/ejbModule/META-INF/ejb-jar.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/ejbModule/META-INF/expected_MANIFEST.MF
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/ejbModule/META-INF/expected_MANIFEST.MF?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/ejbModule/META-INF/expected_MANIFEST.MF (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/ejbModule/META-INF/expected_MANIFEST.MF Tue Oct 31 09:11:12 2006
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: maven-core-98.0.jar
+

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/j2ee
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/j2ee?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/j2ee (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/j2ee Tue Oct 31 09:11:12 2006
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<j2eesettings version="600">
+  <moduleversion>21</moduleversion>
+</j2eesettings>
\ No newline at end of file

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/pom.xml?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/pom.xml (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/pom.xml Tue Oct 31 09:11:12 2006
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+	<modelVersion>4.0.0</modelVersion>
+	<packaging>ejb</packaging>
+	<groupId>eclipse</groupId>
+	<artifactId>maven-eclipse-plugin-test-project-rad-3</artifactId>
+	<version>0.0.1-SNAPSHOT</version>
+	<name>Maven</name>
+	<dependencies>
+		<dependency>
+			<groupId>maven</groupId>
+			<artifactId>maven-core</artifactId>
+			<version>98.0</version>
+		</dependency>
+	</dependencies>
+	<build>
+		<resources>
+			<resource>
+				<directory>ejbModule</directory>
+			</resource>
+		</resources>
+	</build>
+</project>

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/project
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/project?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/project (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/project Tue Oct 31 09:11:12 2006
@@ -0,0 +1,27 @@
+<projectDescription>
+  <name>maven-eclipse-plugin-test-project-rad-3</name>
+  <comment/>
+  <projects/>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+      <arguments/>
+    </buildCommand>
+    <buildCommand>
+      <name>com.ibm.etools.validation.validationbuilder</name>
+      <arguments/>
+    </buildCommand>
+    <buildCommand>
+      <name>com.ibm.wtp.j2ee.LibCopyBuilder</name>
+      <arguments/>
+    </buildCommand>
+    <buildCommand>
+      <name>com.ibm.sse.model.structuredbuilder</name>
+      <arguments/>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>com.ibm.wtp.ejb.EJBNature</nature>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/src/main/java/DummyClass.txt
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/src/main/java/DummyClass.txt?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/src/main/java/DummyClass.txt (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/src/main/java/DummyClass.txt Tue Oct 31 09:11:12 2006
@@ -0,0 +1,7 @@
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public class DummyClass
+{
+}

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/src/main/java/DummyClass.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/src/main/java/DummyClass.txt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/classpath
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/classpath?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/classpath (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/classpath Tue Oct 31 09:11:12 2006
@@ -0,0 +1,7 @@
+<classpath>
+  <classpathentry kind="src" path="src/main/java"/>
+  <classpathentry kind="src" path="target/generated-resources/rad6"/>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="var" path="M2_REPO/maven/maven-core/98.0/maven-core-98.0.jar" sourcepath="M2_REPO/maven/maven-core/98.0/maven-core-98.0-sources.jar"/>
+</classpath>
\ No newline at end of file

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/pom.xml?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/pom.xml (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/pom.xml Tue Oct 31 09:11:12 2006
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>eclipse</groupId>
+	<artifactId>maven-eclipse-plugin-test-project-rad-4</artifactId>
+	<version>0.0.1-SNAPSHOT</version>
+	<name>Maven</name>
+	<dependencies>
+		<dependency>
+			<groupId>maven</groupId>
+			<artifactId>maven-core</artifactId>
+			<version>98.0</version>
+		</dependency>
+	</dependencies>
+	<build>
+	</build>
+</project>

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/project
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/project?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/project (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/project Tue Oct 31 09:11:12 2006
@@ -0,0 +1,18 @@
+<projectDescription>
+  <name>maven-eclipse-plugin-test-project-rad-4</name>
+  <comment/>
+  <projects/>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+      <arguments/>
+    </buildCommand>
+    <buildCommand>
+      <name>com.ibm.sse.model.structuredbuilder</name>
+      <arguments/>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/src/main/java/DummyClass.txt
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/src/main/java/DummyClass.txt?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/src/main/java/DummyClass.txt (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/src/main/java/DummyClass.txt Tue Oct 31 09:11:12 2006
@@ -0,0 +1,7 @@
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public class DummyClass
+{
+}

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/src/main/java/DummyClass.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/src/main/java/DummyClass.txt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/pom.xml?view=auto&rev=469565
==============================================================================
--- maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/pom.xml (added)
+++ maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/pom.xml Tue Oct 31 09:11:12 2006
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>eclipse</groupId>
+	<artifactId>project-rad-5</artifactId>
+	<version>0.0.1-SNAPSHOT</version>
+	<name>mwza2006</name>
+	<packaging>pom</packaging>
+	<modules>
+		<module>project-rad-1</module>
+		<module>project-rad-2</module>
+		<module>project-rad-3</module>
+	</modules>
+</project>
\ No newline at end of file

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"