Author: aheritier Date: Mon Mar 9 23:13:33 2009 New Revision: 751904 URL: http://svn.apache.org/viewvc?rev=751904&view=rev Log: Cleanup imports
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/MyEclipsePlugin.java maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadPlugin.java maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/AbstractEclipseManifestWriter.java maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/AbstractEclipsePluginIT.java maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/reader/ReadWorkspaceLocationsTest.java Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/MyEclipsePlugin.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/MyEclipsePlugin.java?rev=751904&r1=751903&r2=751904&view=diff ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/MyEclipsePlugin.java (original) +++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/MyEclipsePlugin.java Mon Mar 9 23:13:33 2009 @@ -5,21 +5,17 @@ import java.util.Map; import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugin.eclipse.writers.EclipseClasspathWriter; -import org.apache.maven.plugin.eclipse.writers.EclipseProjectWriter; -import org.apache.maven.plugin.eclipse.writers.EclipseSettingsWriter; import org.apache.maven.plugin.eclipse.writers.EclipseWriterConfig; import org.apache.maven.plugin.eclipse.writers.myeclipse.MyEclipseHibernateWriter; import org.apache.maven.plugin.eclipse.writers.myeclipse.MyEclipseMetadataWriter; import org.apache.maven.plugin.eclipse.writers.myeclipse.MyEclipseSpringBeansWriter; import org.apache.maven.plugin.eclipse.writers.myeclipse.MyEclipseStrutsDataWriter; -import org.apache.maven.plugin.ide.IdeDependency; import org.apache.maven.plugin.ide.IdeUtils; import org.apache.maven.plugin.ide.JeeUtils; /** * Generates MyEclipse configuration files - * + * * @author <a href="mailto:olivier.ja...@gmail.com">Olivier Jacob</a> * @goal myeclipse * @since 2.5 @@ -64,7 +60,7 @@ /** * Spring configuration placeholder <p/> - * + * * <pre> * <spring> * <version>1.0/2.0</version> @@ -72,28 +68,28 @@ * <basedir>src/main/resources</basedir> * </spring> * </pre> - * + * * @parameter */ private Map spring; /** * Hibernate configuration placeholder <p/> - * + * * <pre> * <hibernate> * <config-file>src/main/resources/applicationContext-persistence.xml</config-file> * <session-factory-id>mySessionFactory</session-factory-id> * </hibernate> * </pre> - * + * * @parameter */ private Map hibernate; /** * Allow declaration of struts properties for MyEclipse <p/> - * + * * <pre> * <struts> * <version>1.2.9</version> @@ -102,11 +98,11 @@ * <base-package>1.2.9</base-package> * </struts> * </pre> - * + * * @parameter */ private Map struts; - + /** * {...@inheritdoc} */ @@ -134,7 +130,7 @@ } } } - + // the MyEclipse part ... new MyEclipseMetadataWriter().init( getLog(), config ).write(); @@ -158,12 +154,12 @@ } new MyEclipseHibernateWriter( getHibernate() ).init( getLog(), config ).write(); - } + } } /** * Override the default builders with the builders used by MyEclipse - * + * * @param packaging packaging-type (jar,war,ejb,ear) */ protected void fillDefaultBuilders( String packaging ) @@ -221,7 +217,7 @@ /** * Override the default natures with the natures used by MyEclipse - * + * * @param packaging packaging-type (jar,war,ejb,ear) */ protected void fillDefaultNatures( String packaging ) Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadPlugin.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadPlugin.java?rev=751904&r1=751903&r2=751904&view=diff ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadPlugin.java (original) +++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadPlugin.java Mon Mar 9 23:13:33 2009 @@ -19,7 +19,6 @@ package org.apache.maven.plugin.eclipse; import java.io.File; -import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; @@ -38,11 +37,10 @@ import org.apache.maven.plugin.ide.IdeUtils; import org.apache.maven.plugin.ide.JeeUtils; import org.apache.maven.project.MavenProject; -import org.codehaus.plexus.util.FileUtils; /** * Generates the rad-6 configuration files. - * + * * @author Richard van Nieuwenhoven (patch submission) * @author jdcasey * @goal rad @@ -97,7 +95,7 @@ /** * The context root of the webapplication. This parameter is only used when the current project is a war project, * else it will be ignored. - * + * * @parameter */ private String warContextRoot; @@ -105,7 +103,7 @@ /** * Use this to specify a different generated resources folder than target/generated-resources/rad6. Set to "none" to * skip this folder generation. - * + * * @parameter expression="${generatedResourceDirName}" default-value="target/generated-resources/rad6" since="2.4" */ private String generatedResourceDirName; @@ -128,7 +126,7 @@ /** * write all rad6 configuration files. <br/> <b> NOTE: This could change the config! </b> - * + * * @see EclipsePlugin#writeConfiguration() * @param deps resolved dependencies to handle * @throws MojoExecutionException if the config files could not be written. @@ -154,7 +152,7 @@ /** * make room for a Manifest file. use a generated resource for JARS and for WARS use the manifest in the * webapp/meta-inf directory. - * + * * @throws MojoExecutionException */ private void addManifestResource( EclipseWriterConfig config ) @@ -198,7 +196,7 @@ /** * Returns absolute path to the web content directory based on configuration of the war plugin or default one * otherwise. - * + * * @param project * @return absolute directory path as String * @throws MojoExecutionException @@ -222,7 +220,7 @@ /** * overwite the default builders with the builders required by RAD6. - * + * * @param packaging packaging-type (jar,war,ejb,ear) */ protected void fillDefaultBuilders( String packaging ) @@ -266,7 +264,7 @@ /** * overwite the default natures with the natures required by RAD6. - * + * * @param packaging packaging-type (jar,war,ejb,ear) */ protected void fillDefaultNatures( String packaging ) @@ -299,7 +297,7 @@ /** * Utility method that locates a project producing the given artifact. - * + * * @param artifact the artifact a project should produce. * @return <code>true</code> if the artifact is produced by a reactor projectart. */ @@ -340,7 +338,7 @@ */ protected void setupExtras() throws MojoExecutionException - { + { super.setupExtras(); IdeDependency[] deps = doDependencyResolution(); @@ -349,7 +347,7 @@ addManifestResource( config ); } - + /** * {...@inheritdoc} */ Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/AbstractEclipseManifestWriter.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/AbstractEclipseManifestWriter.java?rev=751904&r1=751903&r2=751904&view=diff ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/AbstractEclipseManifestWriter.java (original) +++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/AbstractEclipseManifestWriter.java Mon Mar 9 23:13:33 2009 @@ -36,12 +36,11 @@ import org.apache.maven.plugin.eclipse.writers.wtp.AbstractWtpResourceWriter; import org.apache.maven.plugin.ide.IdeDependency; import org.apache.maven.project.MavenProject; -import org.codehaus.plexus.util.FileUtils; import org.codehaus.plexus.util.IOUtil; /** * Common behaviours for creating or adapting the manifest files for eclipse environments. - * + * * @author <a href="mailto:n...@cfc.at">Richard van Nieuwenhoven </a> */ public abstract class AbstractEclipseManifestWriter @@ -59,7 +58,7 @@ /** * 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 */ @@ -82,7 +81,7 @@ /** * Read and parse the existing manifest file. - * + * * @param manifestFile file * @return the read manifest * @throws IOException if the file could not be read @@ -112,7 +111,7 @@ * Add one dependency to the blank separated classpath stringbuffer. When the project is available in the reactor * (current build) then the project is used else the jar representing the artifact. System dependencies will only be * included if they are in this project. - * + * * @param classpath existing classpath to append * @param dependency dependency to append as jar or as project */ @@ -144,7 +143,7 @@ * 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 @@ -189,7 +188,7 @@ /** * Convert all dependencies in a blank seperated list of jars and projects representing the classpath. - * + * * @return the blank separeted classpath string */ protected String constructManifestClasspath() @@ -207,7 +206,7 @@ /** * Create a manifest contaigning the required classpath. - * + * * @return the newly created manifest */ protected Manifest createNewManifest() @@ -221,7 +220,7 @@ /** * 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 @@ -249,7 +248,7 @@ /** * Search the project for the existing META-INF directory where the manifest should be located. - * + * * @return the absolute path to the META-INF directory * @throws MojoExecutionException */ @@ -257,12 +256,12 @@ throws MojoExecutionException; /** - * If the existing manifest file located in <code>getMetaInfBaseDirectory()</code> + * If the existing manifest file located in <code>getMetaInfBaseDirectory()</code> * already has a correct MANIFEST_VERSION and CLASS_PATH value then do nothing. * <p> * Otherwise generate a <b>NEW</b> (i.e the old one is overwritten) which only contains * values for MANIFEST_VERSION and CLASS_PATH, all other previous entries are not kept. - * + * * @see AbstractWtpResourceWriter#write(EclipseSourceDir[], ArtifactRepository, File) * @param sourceDirs all eclipse source directorys * @param localRepository the local reposetory Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/AbstractEclipsePluginIT.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/AbstractEclipsePluginIT.java?rev=751904&r1=751903&r2=751904&view=diff ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/AbstractEclipsePluginIT.java (original) +++ maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/AbstractEclipsePluginIT.java Mon Mar 9 23:13:33 2009 @@ -59,7 +59,6 @@ import org.apache.maven.shared.test.plugin.TestToolsException; import org.codehaus.classworlds.ClassRealm; import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.PlexusTestCase; import org.codehaus.plexus.util.FileUtils; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.StringUtils; @@ -81,7 +80,7 @@ private BuildTool buildTool; private ProjectTool projectTool; - + private RepositoryTool repositoryTool; /** @@ -141,7 +140,7 @@ projectTool = (ProjectTool) lookup( ProjectTool.ROLE, "default" ); repositoryTool = (RepositoryTool) lookup( RepositoryTool.ROLE, "default" ); - + String mavenHome = System.getProperty( "maven.home" ); // maven.home is set by surefire when the test is run with maven, but better make the test @@ -229,7 +228,7 @@ /** * Execute the eclipse:eclipse goal on a test project and verify generated files. - * + * * @param projectName project directory * @throws Exception any exception generated during test */ @@ -238,10 +237,10 @@ { testProject( projectName, new Properties(), "clean", "eclipse" ); } - + /** * Execute the eclipse:eclipse goal on a test project and verify generated files. - * + * * @param basedir basedir of mvn execution * @throws Exception any exception generated during test */ @@ -249,11 +248,11 @@ throws Exception { testProject( basedir, new 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 @@ -269,7 +268,7 @@ /** * Execute the eclipse:eclipse goal on a test project and verify generated files. - * + * * @param basedir basedir of mvn execution * @param properties additional properties * @param cleanGoal TODO @@ -308,7 +307,7 @@ /** * Execute the eclipse:configure-workspace goal on a test project and verify generated files. - * + * * @param projectName project directory * @throws Exception any exception generated during test */ @@ -320,7 +319,7 @@ /** * Execute the eclipse:configure-workspace goal on a test project and verify generated files. - * + * * @param projectName project directory * @throws Exception any exception generated during test */ @@ -332,7 +331,7 @@ /** * Execute the eclipse:configure-workspace goal on a test project and verify generated files. - * + * * @param projectName project directory * @param properties additional properties * @param cleanGoal TODO @@ -467,7 +466,7 @@ String pluginSpec = GROUP_ID + ":" + ARTIFACT_ID + ":"; // String pluginVersion = System.getProperty( "pluginVersion" ); - // + // // if ( pluginVersion != null ) // { // pluginSpec += pluginVersion + ":"; @@ -541,7 +540,7 @@ /** * Assert that two XML files are equal. - * + * * @param expectedFile the expected file - only used for path information * @param expectedFileContents the contents of the expected file * @param actualFile the actual file - only used for path information @@ -570,7 +569,7 @@ /** * Assert that two text files are equals. Lines that start with # are comments and ignored. - * + * * @param expectedFile the expected file - only used for path information * @param expectedFileContents the contents of the expected file * @param actualFile the actual file - only used for path information @@ -605,10 +604,10 @@ /** * Preprocess the file so that equals comparison can be done. Preprocessing may vary based on filename. - * + * * @param file the file being processed * @param variables if not null, then replace all keys with the corresponding values in the expected string. - * + * * @return processed input */ private String preprocess( File file, Map variables ) @@ -630,7 +629,7 @@ * NOTE: This is another hack to compensate for some metadata files that contain a complete XML file as the * value for a key like "org.eclipse.jdt.ui.formatterprofiles" from "org.eclipse.jdt.ui.prefs". Line terminators * in this value are platform-dependent. - * + * */ if ( file.getName().endsWith( ".prefs" ) ) { @@ -640,7 +639,7 @@ /* * NOTE: This is a hack to compensate for files that contain generated values like dependent-object in * org.eclipse.wst.common.component. - * + * * Regex would be a better solution. */ if ( file.getName().equals( "org.eclipse.wst.common.component" ) || file.getName().equals( ".modulemaps" ) @@ -653,7 +652,7 @@ /** * Normalize line terminators into \n. \r\n, \r, \n all get changed into \n. - * + * * @param input the string to normalize * @return string with line terminators normalized */ @@ -827,7 +826,7 @@ /** * Locate the actual file needed for comparison. The expectedFile has the baseDir prefix removed and the resulting * relative path used to locate the file within the projectOutputDir. - * + * * @param projectOutputDir the directory where the eclipse plugin writes files to * @param basedir the base dir of the project being tested * @param expectedFile the expected file used to compare to the actual file @@ -852,7 +851,7 @@ /** * Test if the file contains xml content. - * + * * @param f the file to test * @return true if the file contains xml content, false otherwise. */ @@ -875,10 +874,10 @@ IOUtil.close( reader ); } } - + /** * Return the not available marker file for the specified artifact details. - * + * * @param groupId group id of artifact * @param artifactId artifact id of artifact * @param version version of artifact @@ -899,31 +898,31 @@ new DefaultArtifactRepository( "local", url, new DefaultRepositoryLayout() ); ArtifactFactory artifactFactory = new DefaultArtifactFactory(); - + DefaultArtifactHandler javaSourceArtifactHandler = new DefaultArtifactHandler( "java-source" ); setVariableValueToObject( javaSourceArtifactHandler, "extension", "jar"); - + DefaultArtifactHandler javadocArtifactHandler = new DefaultArtifactHandler( "javadoc" ); setVariableValueToObject( javadocArtifactHandler, "extension", "jar"); Map artifactHandlers = new HashMap(); artifactHandlers.put( "java-source", javaSourceArtifactHandler ); artifactHandlers.put( "javadoc", javadocArtifactHandler ); - + ArtifactHandlerManager artifactHandlerManager = new DefaultArtifactHandlerManager(); setVariableValueToObject( artifactHandlerManager, "artifactHandlers", artifactHandlers); setVariableValueToObject( artifactFactory, "artifactHandlerManager", artifactHandlerManager); // HACK: END - + Artifact artifact = IdeUtils.createArtifactWithClassifier( groupId, artifactId, version, classifier, inClassifier, artifactFactory); return IdeUtils.getNotAvailableMarkerFile( localRepository, artifact ); } - + /** * Assert that the not available marker file exists for the specified artifact details. - * + * * @param groupId group id of artifact * @param artifactId artifact id of artifact * @param version version of artifact @@ -937,10 +936,10 @@ File markerFile = getNotAvailableMarkerFile( groupId, artifactId, version, classifier, inClassifier ); assertTrue( "The \"Not Available\" marker file does not exist: " + markerFile, markerFile.exists() ); } - + /** * Assert that the not available marker file does not exist for the specified artifact details. - * + * * @param groupId group id of artifact * @param artifactId artifact id of artifact * @param version version of artifact @@ -954,5 +953,5 @@ File markerFile = getNotAvailableMarkerFile( groupId, artifactId, version, classifier, inClassifier ); assertTrue( "The \"Not Available\" marker file incorrectly exists: " + markerFile, !markerFile.exists() ); } - + } Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/reader/ReadWorkspaceLocationsTest.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/reader/ReadWorkspaceLocationsTest.java?rev=751904&r1=751903&r2=751904&view=diff ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/reader/ReadWorkspaceLocationsTest.java (original) +++ maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/reader/ReadWorkspaceLocationsTest.java Mon Mar 9 23:13:33 2009 @@ -22,9 +22,7 @@ import org.apache.maven.plugin.eclipse.TempEclipseWorkspace; import org.apache.maven.plugin.eclipse.WorkspaceConfiguration; import org.apache.maven.plugin.logging.Log; -import org.apache.maven.plugin.logging.SystemStreamLog; import org.apache.maven.shared.tools.easymock.MockManager; -import org.codehaus.plexus.archiver.manager.ArchiverManager; import org.easymock.MockControl; /** @@ -59,7 +57,7 @@ * Project's at the workspace level do not have a .location file. * <p> * Therefore their project location is directly under the workspace. - * + * * @throws Exception */ public void testGetProjectLocation_ForProjectAtWorkspaceLevel() @@ -80,7 +78,7 @@ * <p> * This URI specifies the fully qualified path to the project. Which may be located outside of the workspace as * well. - * + * * @throws Exception */ public void testGetProjectLocation_ForProjectsWithinProjects() @@ -102,7 +100,7 @@ * <p> * This URI specifies the fully qualified path to the project. Which may be located outside of the workspace as * well. - * + * * @throws Exception */ public void testGetProjectLocation_ForProjectsOutsideWorkspace() @@ -160,7 +158,7 @@ /** * Assert that two files represent the same absolute file. - * + * * @param expectedFile * @param actualFile * @throws IOException