You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ah...@apache.org on 2008/09/02 23:57:21 UTC
svn commit: r691404 [1/2] - in /maven/plugins/trunk/maven-eclipse-plugin/src:
main/java/org/apache/maven/plugin/eclipse/
main/java/org/apache/maven/plugin/eclipse/reader/
main/java/org/apache/maven/plugin/eclipse/writers/
main/java/org/apache/maven/plu...
Author: aheritier
Date: Tue Sep 2 14:57:19 2008
New Revision: 691404
URL: http://svn.apache.org/viewvc?rev=691404&view=rev
Log:
Format code using our formatting rules and eclipse 3.4
Modified:
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/BuildCommand.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseSourceDir.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseToMavenMojo.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/InstallPluginsMojo.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/MakeArtifactsMojo.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadCleanMojo.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/reader/ReadWorkspaceLocations.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseAjdtWriter.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseAntExternalLaunchConfigurationWriter.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseProjectWriter.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWriterConfig.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/MonitoredResource.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/myeclipse/MyEclipseMetadataWriter.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/myeclipse/MyEclipseSpringBeansWriter.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadApplicationXMLWriter.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadEjbClasspathWriter.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadJ2EEWriter.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadLibCopier.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadManifestWriter.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebSettingsWriter.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/AbstractWtpResourceWriter.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpApplicationXMLWriter.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpComponent15Writer.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpComponentWriter.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpFacetsWriter.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpmodulesWriter.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeDependency.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java
maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginUnitTest.java
maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/InstallPluginsMojoTest.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/it/EclipsePluginIT.java
maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/EclipsePluginMasterProjectIT.java
maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/EclipseWorkspaceIT.java
maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/MyEclipsePluginIT.java
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/BuildCommand.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/BuildCommand.java?rev=691404&r1=691403&r2=691404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/BuildCommand.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/BuildCommand.java Tue Sep 2 14:57:19 2008
@@ -206,9 +206,9 @@
{
BuildCommand b = (BuildCommand) obj;
- return name.equals( b.name ) &&
- ( triggers == null ? b.triggers == null : triggers.equals( b.triggers ) ) &&
- ( arguments == null || arguments.isEmpty() ? b.arguments == null || b.arguments.isEmpty()
+ return name.equals( b.name )
+ && ( triggers == null ? b.triggers == null : triggers.equals( b.triggers ) )
+ && ( arguments == null || arguments.isEmpty() ? b.arguments == null || b.arguments.isEmpty()
: arguments.equals( b.arguments ) );
}
else
@@ -219,7 +219,7 @@
public int hashCode()
{
- return name.hashCode() + ( triggers == null ? 0 : 13 * triggers.hashCode() ) +
- ( arguments == null ? 0 : 17 * arguments.hashCode() );
+ return name.hashCode() + ( triggers == null ? 0 : 13 * triggers.hashCode() )
+ + ( arguments == null ? 0 : 17 * arguments.hashCode() );
}
}
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java?rev=691404&r1=691403&r2=691404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java Tue Sep 2 14:57:19 2008
@@ -136,9 +136,9 @@
private static final String NATURE_AJDT_CORE_JAVA = "org.eclipse.ajdt.ui.ajnature"; //$NON-NLS-1$
protected static final String COMMON_PATH_JDT_LAUNCHING_JRE_CONTAINER = "org.eclipse.jdt.launching.JRE_CONTAINER"; //$NON-NLS-1$
-
+
protected static final String ASPECTJ_RT_CONTAINER = "org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"; //$NON-NLS-1$
-
+
protected static final String REQUIRED_PLUGINS_CONTAINER = "org.eclipse.pde.core.requiredPlugins"; //$NON-NLS-1$
// warning, order is important for binary search
@@ -329,8 +329,7 @@
private boolean pde;
/**
- * Is it an AJDT project? If yes, the plugin adds the necessary natures and build commands to
- * the .project file.
+ * Is it an AJDT project? If yes, the plugin adds the necessary natures and build commands to the .project file.
*/
private boolean ajdt;
@@ -413,8 +412,8 @@
private EclipseConfigFile[] additionalConfig;
/**
- * If set to <code>true</code>, the version number of the artifact is appended to the name of the generated
- * Eclipse project. See projectNameTemplate for other options.
+ * If set to <code>true</code>, the version number of the artifact is appended to the name of the generated Eclipse
+ * project. See projectNameTemplate for other options.
*
* @parameter expression="${eclipse.addVersionToProjectName}" default-value="false"
*/
@@ -430,8 +429,8 @@
/**
* Allows configuring the name of the eclipse projects. This property if set wins over addVersionToProjectName and
- * addGroupIdToProjectName You can use <code>[groupId]</code>, <code>[artifactId]</code> and
- * <code>[version]</code> variables. eg. <code>[groupId].[artifactId]-[version]</code>
+ * addGroupIdToProjectName You can use <code>[groupId]</code>, <code>[artifactId]</code> and <code>[version]</code>
+ * variables. eg. <code>[groupId].[artifactId]-[version]</code>
*
* @parameter expression="${eclipse.projectNameTemplate}"
*/
@@ -499,13 +498,13 @@
protected boolean limitProjectReferencesToWorkspace;
/**
- * The version of AJDT for which configuration files will be generated. The default value is "1.5", supported versions
- * are "none", "1.4", and "1.5".
+ * The version of AJDT for which configuration files will be generated. The default value is "1.5", supported
+ * versions are "none", "1.4", and "1.5".
*
* @parameter expression="${eclipse.ajdtVersion}" default-value="1.5"
*/
private String ajdtVersion;
-
+
protected boolean isJavaProject()
{
return isJavaProject;
@@ -756,8 +755,8 @@
// ear projects don't contain java sources
// pde projects are always java projects
isJavaProject =
- pde ||
- ( Constants.LANGUAGE_JAVA.equals( artifactHandler.getLanguage() ) && !Constants.PROJECT_PACKAGING_EAR.equals( packaging ) );
+ pde
+ || ( Constants.LANGUAGE_JAVA.equals( artifactHandler.getLanguage() ) && !Constants.PROJECT_PACKAGING_EAR.equals( packaging ) );
setupExtras();
@@ -859,8 +858,8 @@
for ( Iterator iter = classpathContainers.iterator(); iter.hasNext(); )
{
Object classPathContainer = iter.next();
- if ( classPathContainer != null &&
- classPathContainer.toString().startsWith( COMMON_PATH_JDT_LAUNCHING_JRE_CONTAINER ) )
+ if ( classPathContainer != null
+ && classPathContainer.toString().startsWith( COMMON_PATH_JDT_LAUNCHING_JRE_CONTAINER ) )
{
containsJREContainer = true;
break;
@@ -1109,13 +1108,13 @@
{
ajdtVersionFloat = Float.parseFloat( ajdtVersion );
}
- catch( NumberFormatException e )
+ catch ( NumberFormatException e )
{
ajdtVersionFloat = 0.0f;
}
-
+
config.setAjdtVersion( ajdtVersionFloat );
-
+
Set convertedBuildCommands = new LinkedHashSet();
if ( buildcommands != null )
@@ -1135,7 +1134,7 @@
}
}
- if( ajdt )
+ if ( ajdt )
{
buildAjdtWeaveDeps( deps );
buildAspectjDeps( deps );
@@ -1171,8 +1170,8 @@
*/
private void collectWarContextRootsFromReactorEarConfiguration( EclipseWriterConfig config )
{
- if ( reactorProjects != null && wtpContextName == null &&
- Constants.PROJECT_PACKAGING_WAR.equals( project.getPackaging() ) )
+ if ( reactorProjects != null && wtpContextName == null
+ && Constants.PROJECT_PACKAGING_WAR.equals( project.getPackaging() ) )
{
for ( Iterator iter = reactorProjects.iterator(); iter.hasNext(); )
{
@@ -1188,15 +1187,14 @@
Xpp3Dom groupId = warDefinitions[index].getChild( "groupId" );
Xpp3Dom artifactId = warDefinitions[index].getChild( "artifactId" );
Xpp3Dom contextRoot = warDefinitions[index].getChild( "contextRoot" );
- if ( groupId != null && artifactId != null && contextRoot != null &&
- groupId.getValue() != null && artifactId.getValue() != null &&
- contextRoot.getValue() != null )
+ if ( groupId != null && artifactId != null && contextRoot != null && groupId.getValue() != null
+ && artifactId.getValue() != null && contextRoot.getValue() != null )
{
getLog().info(
- "Found context root definition for " + groupId.getValue() + ":" +
- artifactId.getValue() + " " + contextRoot.getValue() );
- if ( project.getArtifactId().equals( artifactId.getValue() ) &&
- project.getGroupId().equals( groupId.getValue() ) )
+ "Found context root definition for " + groupId.getValue() + ":"
+ + artifactId.getValue() + " " + contextRoot.getValue() );
+ if ( project.getArtifactId().equals( artifactId.getValue() )
+ && project.getGroupId().equals( groupId.getValue() ) )
{
config.setContextName( contextRoot.getValue() );
}
@@ -1204,9 +1202,9 @@
else
{
getLog().info(
- "Found incomplete ear configuration in " + reactorProject.getGroupId() +
- ":" + reactorProject.getGroupId() + " found " +
- warDefinitions[index].toString() );
+ "Found incomplete ear configuration in " + reactorProject.getGroupId() + ":"
+ + reactorProject.getGroupId() + " found "
+ + warDefinitions[index].toString() );
}
}
}
@@ -1290,16 +1288,16 @@
if ( getWorkspaceConfiguration().getDefaultClasspathContainer() != null )
{
getLog().info(
- "Adding default classpath contaigner: " +
- getWorkspaceConfiguration().getDefaultClasspathContainer() );
+ "Adding default classpath contaigner: "
+ + getWorkspaceConfiguration().getDefaultClasspathContainer() );
classpathContainers.add( getWorkspaceConfiguration().getDefaultClasspathContainer() );
}
if ( pde )
{
classpathContainers.add( REQUIRED_PLUGINS_CONTAINER );
}
-
- if( ajdt )
+
+ if ( ajdt )
{
classpathContainers.add( ASPECTJ_RT_CONTAINER );
}
@@ -1318,7 +1316,7 @@
{
if ( ajdt )
{
- buildcommands.add( new BuildCommand( BUILDER_AJDT_CORE_JAVA) );
+ buildcommands.add( new BuildCommand( BUILDER_AJDT_CORE_JAVA ) );
}
else
{
@@ -1383,8 +1381,8 @@
extractSourceDirs( testDirectories, project.getTestCompileSourceRoots(), basedir, projectBaseDir, true,
testOutput );
- extractResourceDirs( testDirectories, project.getBuild().getTestResources(), project, basedir,
- projectBaseDir, true, testOutput );
+ extractResourceDirs( testDirectories, project.getBuild().getTestResources(), project, basedir, projectBaseDir,
+ true, testOutput );
// avoid duplicated entries
Set directories = new LinkedHashSet();
@@ -1403,8 +1401,8 @@
directories.addAll( mainDirectories );
directories.addAll( testDirectories );
}
- if( ajdt )
-extractAspectDirs( directories, project, basedir, projectBaseDir, testOutput );
+ if ( ajdt )
+ extractAspectDirs( directories, project, basedir, projectBaseDir, testOutput );
return (EclipseSourceDir[]) directories.toArray( new EclipseSourceDir[directories.size()] );
}
@@ -1485,154 +1483,157 @@
}
getLog().debug(
- "Making relative and fixing separator: { " + workspaceProjectBaseDir + ", " +
- outputFile + ", false }." );
+ "Making relative and fixing separator: { " + workspaceProjectBaseDir + ", "
+ + outputFile + ", false }." );
thisOutput = IdeUtils.toRelativeAndFixSeparator( workspaceProjectBaseDir, outputFile, false );
}
getLog().debug(
- "Adding eclipse source dir: { " + resourceDir + ", " + thisOutput + ", true, " + test +
- ", " + includePattern + ", " + excludePattern + " }." );
+ "Adding eclipse source dir: { " + resourceDir + ", " + thisOutput + ", true, " + test
+ + ", " + includePattern + ", " + excludePattern + " }." );
directories.add( new EclipseSourceDir( resourceDir, thisOutput, true, test, includePattern, excludePattern,
resource.isFiltering() ) );
}
}
- private void extractAspectDirs( Set directories, MavenProject project, File basedir, File projectBaseDir, String testOutput ) throws MojoExecutionException
+ private void extractAspectDirs( Set directories, MavenProject project, File basedir, File projectBaseDir,
+ String testOutput )
+ throws MojoExecutionException
{
Xpp3Dom configuration = getAspectjConfiguration( project );
- if( configuration != null )
+ if ( configuration != null )
{
String aspectDirectory = DEFAULT_ASPECT_DIRECTORY;
Xpp3Dom aspectDirectoryElement = configuration.getChild( ASPECT_DIRECTORY );
- if( aspectDirectoryElement != null )
+ if ( aspectDirectoryElement != null )
{
aspectDirectory = aspectDirectoryElement.getValue();
}
-
+
File aspectDirectoryFile = new File( basedir, aspectDirectory );
- if( aspectDirectoryFile.exists() && aspectDirectoryFile.isDirectory() )
+ if ( aspectDirectoryFile.exists() && aspectDirectoryFile.isDirectory() )
{
- String sourceRoot = IdeUtils.toRelativeAndFixSeparator( projectBaseDir, aspectDirectoryFile, !projectBaseDir
- .equals( basedir ) );
-
+ String sourceRoot =
+ IdeUtils.toRelativeAndFixSeparator( projectBaseDir, aspectDirectoryFile,
+ !projectBaseDir.equals( basedir ) );
+
directories.add( new EclipseSourceDir( sourceRoot, null, false, false, null, null, false ) );
}
-
+
String testAspectDirectory = DEFAULT_TEST_ASPECT_DIRECTORY;
Xpp3Dom testAspectDirectoryElement = configuration.getChild( TEST_ASPECT_DIRECTORY );
- if( testAspectDirectoryElement != null )
+ if ( testAspectDirectoryElement != null )
{
testAspectDirectory = testAspectDirectoryElement.getValue();
}
-
+
File testAspectDirectoryFile = new File( basedir, testAspectDirectory );
- if( testAspectDirectoryFile.exists() && testAspectDirectoryFile.isDirectory() )
+ if ( testAspectDirectoryFile.exists() && testAspectDirectoryFile.isDirectory() )
{
- String sourceRoot = IdeUtils.toRelativeAndFixSeparator( projectBaseDir, testAspectDirectoryFile, !projectBaseDir
- .equals( basedir ) );
-
+ String sourceRoot =
+ IdeUtils.toRelativeAndFixSeparator( projectBaseDir, testAspectDirectoryFile,
+ !projectBaseDir.equals( basedir ) );
+
directories.add( new EclipseSourceDir( sourceRoot, testOutput, false, true, null, null, false ) );
}
}
}
- private boolean enableAjdt(MavenProject project)
+ private boolean enableAjdt( MavenProject project )
{
boolean enable = false;
List buildPlugins = project.getBuildPlugins();
for ( Iterator it = buildPlugins.iterator(); it.hasNext(); )
{
- Plugin plugin = (Plugin)it.next();
- if( plugin.getGroupId().equals( ORG_CODEHAUS_MOJO ) && plugin.getArtifactId().equals( ASPECTJ_MAVEN_PLUGIN ) )
+ Plugin plugin = (Plugin) it.next();
+ if ( plugin.getGroupId().equals( ORG_CODEHAUS_MOJO )
+ && plugin.getArtifactId().equals( ASPECTJ_MAVEN_PLUGIN ) )
{
enable = true;
break;
}
}
-
+
return enable;
}
-
- private Xpp3Dom getAspectjConfiguration(MavenProject project)
+
+ private Xpp3Dom getAspectjConfiguration( MavenProject project )
{
Xpp3Dom configuration = null;
List buildPlugins = project.getBuildPlugins();
for ( Iterator it = buildPlugins.iterator(); it.hasNext(); )
{
- Plugin plugin = (Plugin)it.next();
- if( plugin.getGroupId().equals( ORG_CODEHAUS_MOJO ) && plugin.getArtifactId().equals( ASPECTJ_MAVEN_PLUGIN ) )
+ Plugin plugin = (Plugin) it.next();
+ if ( plugin.getGroupId().equals( ORG_CODEHAUS_MOJO )
+ && plugin.getArtifactId().equals( ASPECTJ_MAVEN_PLUGIN ) )
{
- configuration = (Xpp3Dom)plugin.getConfiguration();
+ configuration = (Xpp3Dom) plugin.getConfiguration();
break;
}
}
-
+
return configuration;
}
- private void buildAspectjDeps( IdeDependency[] deps ) throws MojoExecutionException
+ private void buildAspectjDeps( IdeDependency[] deps )
+ throws MojoExecutionException
{
Xpp3Dom configuration = getAspectjConfiguration( executedProject );
- if( configuration != null )
+ if ( configuration != null )
{
- Xpp3Dom aspectLibrariesParent = configuration.getChild( ASPECT_LIBRARIES );
- if( aspectLibrariesParent != null )
+ Xpp3Dom aspectLibrariesParent = configuration.getChild( ASPECT_LIBRARIES );
+ if ( aspectLibrariesParent != null )
{
Xpp3Dom[] aspectLibraries = aspectLibrariesParent.getChildren( ASPECT_LIBRARY );
- outerLoop:
- for( int i = 0 ; i < aspectLibraries.length ; i++ )
+ outerLoop: for ( int i = 0; i < aspectLibraries.length; i++ )
{
- String artifactId = aspectLibraries[ i ].getChild( POM_ELT_ARTIFACT_ID ).getValue();
- String groupId = aspectLibraries[ i ].getChild( POM_ELT_GROUP_ID ).getValue();
- for( int j = 0 ; j < deps.length ; j++ )
+ String artifactId = aspectLibraries[i].getChild( POM_ELT_ARTIFACT_ID ).getValue();
+ String groupId = aspectLibraries[i].getChild( POM_ELT_GROUP_ID ).getValue();
+ for ( int j = 0; j < deps.length; j++ )
{
- if( deps[ j ].getArtifactId().equals( artifactId ) &&
- deps[ j ].getGroupId().equals( groupId ) )
+ if ( deps[j].getArtifactId().equals( artifactId ) && deps[j].getGroupId().equals( groupId ) )
{
- deps[ j ].setAjdtDependency( true );
+ deps[j].setAjdtDependency( true );
continue outerLoop;
}
}
-
+
throw new MojoExecutionException( "AspectLibrary is not a dependency of project" );
}
}
}
}
- private void buildAjdtWeaveDeps( IdeDependency[] deps ) throws MojoExecutionException
+ private void buildAjdtWeaveDeps( IdeDependency[] deps )
+ throws MojoExecutionException
{
Xpp3Dom configuration = getAspectjConfiguration( executedProject );
- if( configuration != null )
+ if ( configuration != null )
{
- Xpp3Dom weaveDependenciesParent = configuration.getChild( WEAVE_DEPENDENCIES );
- if( weaveDependenciesParent != null )
+ Xpp3Dom weaveDependenciesParent = configuration.getChild( WEAVE_DEPENDENCIES );
+ if ( weaveDependenciesParent != null )
{
- Xpp3Dom[] weaveDependencies = weaveDependenciesParent.getChildren( WEAVE_DEPENDENCY );
- outerLoop:
- for( int i = 0 ; i < weaveDependencies.length ; i++ )
+ Xpp3Dom[] weaveDependencies = weaveDependenciesParent.getChildren( WEAVE_DEPENDENCY );
+ outerLoop: for ( int i = 0; i < weaveDependencies.length; i++ )
{
- String artifactId = weaveDependencies[ i ].getChild( POM_ELT_ARTIFACT_ID ).getValue();
- String groupId = weaveDependencies[ i ].getChild( POM_ELT_GROUP_ID ).getValue();
- for( int j = 0 ; j < deps.length ; j++ )
+ String artifactId = weaveDependencies[i].getChild( POM_ELT_ARTIFACT_ID ).getValue();
+ String groupId = weaveDependencies[i].getChild( POM_ELT_GROUP_ID ).getValue();
+ for ( int j = 0; j < deps.length; j++ )
{
- if( deps[ j ].getArtifactId().equals( artifactId ) &&
- deps[ j ].getGroupId().equals( groupId ) )
+ if ( deps[j].getArtifactId().equals( artifactId ) && deps[j].getGroupId().equals( groupId ) )
{
- deps[ j ].setAjdtWeaveDependency( true );
+ deps[j].setAjdtWeaveDependency( true );
continue outerLoop;
}
}
-
+
throw new MojoExecutionException( "WeaveDependency is not a dependency of project" );
}
}
}
}
-
/**
* Calculate the project name template from the fields {@link #projectNameTemplate},
* {@link #addVersionToProjectName} and {@link #addGroupIdToProjectName}
@@ -1675,9 +1676,9 @@
for ( int index = 0; workspaceArtefacts != null && index < workspaceArtefacts.length; index++ )
{
IdeDependency workspaceArtefact = workspaceArtefacts[index];
- if ( workspaceArtefact.isAddedToClasspath() &&
- workspaceArtefact.getGroupId().equals( artifact.getGroupId() ) &&
- workspaceArtefact.getArtifactId().equals( artifact.getArtifactId() ) )
+ if ( workspaceArtefact.isAddedToClasspath()
+ && workspaceArtefact.getGroupId().equals( artifact.getGroupId() )
+ && workspaceArtefact.getArtifactId().equals( artifact.getArtifactId() ) )
{
if ( workspaceArtefact.getVersion().equals( artifact.getVersion() ) )
{
@@ -1727,8 +1728,8 @@
for ( int index = 0; workspaceArtefacts != null && index < workspaceArtefacts.length; index++ )
{
IdeDependency workspaceArtefact = workspaceArtefacts[index];
- if ( workspaceArtefact.getGroupId().equals( artifact.getGroupId() ) &&
- workspaceArtefact.getArtifactId().equals( artifact.getArtifactId() ) )
+ if ( workspaceArtefact.getGroupId().equals( artifact.getGroupId() )
+ && workspaceArtefact.getArtifactId().equals( artifact.getArtifactId() ) )
{
if ( workspaceArtefact.getVersion().equals( artifact.getVersion() ) )
{
@@ -1739,10 +1740,10 @@
else
{
getLog().info(
- "Artifact " +
- artifact.getId() +
- " already available as a workspace project, but with different version. Expected: " +
- artifact.getVersion() + ", found: " + workspaceArtefact.getVersion() );
+ "Artifact "
+ + artifact.getId()
+ + " already available as a workspace project, but with different version. Expected: "
+ + artifact.getVersion() + ", found: " + workspaceArtefact.getVersion() );
}
}
}
@@ -1751,7 +1752,6 @@
/*
* (non-Javadoc)
- *
* @see org.apache.maven.plugin.ide.AbstractIdeSupportMojo#doDependencyResolution()
*/
protected IdeDependency[] doDependencyResolution()
@@ -1769,8 +1769,8 @@
*/
protected boolean hasToResolveJar( Artifact art )
{
- return !( getUseProjectReferences() && isAvailableAsAReactorProject( art ) ) ||
- ( limitProjectReferencesToWorkspace && !( getUseProjectReferences() && isAvailableAsAWorkspaceProject( art ) ) );
+ return !( getUseProjectReferences() && isAvailableAsAReactorProject( art ) )
+ || ( limitProjectReferencesToWorkspace && !( getUseProjectReferences() && isAvailableAsAWorkspaceProject( art ) ) );
}
/**
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseSourceDir.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseSourceDir.java?rev=691404&r1=691403&r2=691404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseSourceDir.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseSourceDir.java Tue Sep 2 14:57:19 2008
@@ -177,8 +177,8 @@
*/
public boolean equals( Object obj )
{
- return ( obj != null ) && ( obj instanceof EclipseSourceDir ) &&
- this.path.equals( ( (EclipseSourceDir) obj ).path );
+ return ( obj != null ) && ( obj instanceof EclipseSourceDir )
+ && this.path.equals( ( (EclipseSourceDir) obj ).path );
}
/**
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseToMavenMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseToMavenMojo.java?rev=691404&r1=691403&r2=691404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseToMavenMojo.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseToMavenMojo.java Tue Sep 2 14:57:19 2008
@@ -140,13 +140,13 @@
* @component
*/
protected InputHandler inputHandler;
-
+
/**
* Strip qualifier (fourth token) from the plugin version. Qualifiers are for eclipse plugin the equivalent of
* timestamped snapshot versions for Maven, but the date is maintained also for released version (e.g. a jar for the
- * release <code>3.2</code> can be named <code>org.eclipse.core.filesystem_1.0.0.v20060603.jar</code>. It's
- * usually handy to not to include this qualifier when generating maven artifacts for major releases, while it's
- * needed when working with eclipse integration/nightly builds.
+ * release <code>3.2</code> can be named <code>org.eclipse.core.filesystem_1.0.0.v20060603.jar</code>. It's usually
+ * handy to not to include this qualifier when generating maven artifacts for major releases, while it's needed when
+ * working with eclipse integration/nightly builds.
*
* @parameter expression="${stripQualifier}" default-value="false"
*/
@@ -288,8 +288,8 @@
}
else
{
- throw new MojoFailureException( "Unable to resolve version range for dependency " + dep +
- " in project " + key );
+ throw new MojoFailureException( "Unable to resolve version range for dependency " + dep
+ + " in project " + key );
}
}
}
@@ -515,8 +515,8 @@
else
{
version =
- StringUtils.substring( version, 0, lastDot ) + "-" +
- StringUtils.substring( version, lastDot + 1, version.length() );
+ StringUtils.substring( version, 0, lastDot ) + "-"
+ + StringUtils.substring( version, lastDot + 1, version.length() );
}
}
return version;
@@ -684,8 +684,8 @@
// build number found, fix it
int lastDot = group.lastIndexOf( "." );
group =
- StringUtils.substring( group, 0, lastDot ) + "-" +
- StringUtils.substring( group, lastDot + 1, group.length() );
+ StringUtils.substring( group, 0, lastDot ) + "-"
+ + StringUtils.substring( group, lastDot + 1, group.length() );
}
matcher.appendReplacement( newVersionRange, group );
}
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/InstallPluginsMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/InstallPluginsMojo.java?rev=691404&r1=691403&r2=691404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/InstallPluginsMojo.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/InstallPluginsMojo.java Tue Sep 2 14:57:19 2008
@@ -218,8 +218,9 @@
else
{
getLog().debug(
- "Skipping dependency: " + artifact.getId() +
- ". Set pluginDependencyTypes with a comma-separated list of types to change this." );
+ "Skipping dependency: "
+ + artifact.getId()
+ + ". Set pluginDependencyTypes with a comma-separated list of types to change this." );
}
}
}
@@ -230,8 +231,7 @@
* </p>
* <ol>
* <li>Determine whether the plugin should be extracted into a directory or not</li>
- * <li>If the plugin's target location exists, or overwrite is set to true:
- * <ol type="a">
+ * <li>If the plugin's target location exists, or overwrite is set to true: <ol type="a">
* <li>if extract, ensure the plugin target location exists (mkdirs), and extract there.</li>
* <li>copy the plugin file from the local repository to the target location</li>
* </ol>
@@ -258,8 +258,8 @@
if ( !pluginsDir.exists() || !pluginsDir.isDirectory() )
{
- throw new MojoFailureException( "Invalid Eclipse directory: " + eclipseDir +
- " (plugins directory is missing or not a directory)." );
+ throw new MojoFailureException( "Invalid Eclipse directory: " + eclipseDir
+ + " (plugins directory is missing or not a directory)." );
}
boolean installAsJar = true;
@@ -280,8 +280,8 @@
}
catch ( IOException e )
{
- throw new MojoExecutionException( "Unable to read manifest of plugin " +
- artifact.getFile().getAbsolutePath(), e );
+ throw new MojoExecutionException( "Unable to read manifest of plugin "
+ + artifact.getFile().getAbsolutePath(), e );
}
String bundleVersion = attributes.getValue( "Bundle-Version" );
@@ -297,8 +297,8 @@
if ( bundleName == null )
{
getLog().debug(
- "Ignoring " + artifact.getArtifactId() +
- " as it is not an OSGi bundle (no Bundle-Name in manifest)" );
+ "Ignoring " + artifact.getArtifactId()
+ + " as it is not an OSGi bundle (no Bundle-Name in manifest)" );
return;
}
@@ -317,8 +317,8 @@
}
catch ( IOException e )
{
- throw new MojoExecutionException( "Failed to remove old plugin from: " + pluginFile + " or: " +
- pluginDir, e );
+ throw new MojoExecutionException( "Failed to remove old plugin from: " + pluginFile + " or: "
+ + pluginDir, e );
}
getLog().debug( "Removal of old plugin is complete; proceeding with plugin installation." );
@@ -346,14 +346,14 @@
if ( installAsJar )
{
getLog().info(
- "Skipping plugin installation for: " + artifact.getId() + "; file: " + pluginFile +
- " already exists. Set overwrite = true to override this." );
+ "Skipping plugin installation for: " + artifact.getId() + "; file: " + pluginFile
+ + " already exists. Set overwrite = true to override this." );
}
else if ( !installAsJar )
{
getLog().info(
- "Skipping plugin installation for: " + artifact.getId() + "; directory: " + pluginDir +
- " already exists. Set overwrite = true to override this." );
+ "Skipping plugin installation for: " + artifact.getId() + "; directory: " + pluginDir
+ + " already exists. Set overwrite = true to override this." );
}
}
}
@@ -373,8 +373,8 @@
}
catch ( IOException e )
{
- throw new MojoExecutionException( "Failed to copy Eclipse plugin: " + artifact.getId() + "\nfrom: " +
- artifact.getFile() + "\nto: " + pluginFile, e );
+ throw new MojoExecutionException( "Failed to copy Eclipse plugin: " + artifact.getId() + "\nfrom: "
+ + artifact.getFile() + "\nto: " + pluginFile, e );
}
}
else
@@ -414,8 +414,8 @@
*/
private String formatEclipsePluginName( Artifact artifact, String bundleVersion )
{
- return maven2OsgiConverter.getBundleSymbolicName( artifact ) + "_" +
- maven2OsgiConverter.getVersion( artifact.getVersion() );
+ return maven2OsgiConverter.getBundleSymbolicName( artifact ) + "_"
+ + maven2OsgiConverter.getVersion( artifact.getVersion() );
}
}
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/MakeArtifactsMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/MakeArtifactsMojo.java?rev=691404&r1=691403&r2=691404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/MakeArtifactsMojo.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/MakeArtifactsMojo.java Tue Sep 2 14:57:19 2008
@@ -31,7 +31,8 @@
/**
* Add eclipse artifacts from an eclipse installation to the local repo. This mojo automatically analize the eclipse
* directory, copy plugins jars to the local maven repo, and generates appropriate poms. Use
- * <code>eclipse:to-maven</code> for the latest naming conventions in place, <code>groupId</code>.<code>artifactId</code>.
+ * <code>eclipse:to-maven</code> for the latest naming conventions in place, <code>groupId</code>.
+ * <code>artifactId</code>.
*
* @author Fabrizio Giustina
* @author <a href="mailto:carlos@apache.org">Carlos Sanchez</a>
@@ -48,9 +49,9 @@
/**
* Strip qualifier (fourth token) from the plugin version. Qualifiers are for eclipse plugin the equivalent of
* timestamped snapshot versions for Maven, but the date is maintained also for released version (e.g. a jar for the
- * release <code>3.2</code> can be named <code>org.eclipse.core.filesystem_1.0.0.v20060603.jar</code>. It's
- * usually handy to not to include this qualifier when generating maven artifacts for major releases, while it's
- * needed when working with eclipse integration/nightly builds.
+ * release <code>3.2</code> can be named <code>org.eclipse.core.filesystem_1.0.0.v20060603.jar</code>. It's usually
+ * handy to not to include this qualifier when generating maven artifacts for major releases, while it's needed when
+ * working with eclipse integration/nightly builds.
*
* @parameter expression="${stripQualifier}" default-value="true"
*/
@@ -130,8 +131,8 @@
{
if ( this.resolveVersionRanges && plugins.containsKey( getKey( model ) ) )
{
- throw new MojoFailureException( "There are two versions of the same plugin, can not resolve versions: " +
- getKey( model ) );
+ throw new MojoFailureException( "There are two versions of the same plugin, can not resolve versions: "
+ + getKey( model ) );
}
super.processPlugin( plugin, model, plugins, models );
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadCleanMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadCleanMojo.java?rev=691404&r1=691403&r2=691404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadCleanMojo.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadCleanMojo.java Tue Sep 2 14:57:19 2008
@@ -124,8 +124,8 @@
String webContentDir = IdeUtils.toRelativeAndFixSeparator( basedir, warSourceDirectory, false );
String srcMainWebappWebInfLibDirname =
- basedir.getAbsolutePath() + File.separatorChar + webContentDir + File.separatorChar + "WEB-INF" +
- File.separatorChar + "lib";
+ basedir.getAbsolutePath() + File.separatorChar + webContentDir + File.separatorChar + "WEB-INF"
+ + File.separatorChar + "lib";
File srcMainWebappWebInfLibDir = new File( srcMainWebappWebInfLibDirname );
srcMainWebappWebInfLibDir.mkdirs();
@@ -171,8 +171,8 @@
{
// sanity check, only support cleanup of 2 types - jar and war
- if ( Constants.PROJECT_PACKAGING_JAR.equalsIgnoreCase( packagingType ) ||
- Constants.PROJECT_PACKAGING_WAR.equalsIgnoreCase( packagingType ) )
+ if ( Constants.PROJECT_PACKAGING_JAR.equalsIgnoreCase( packagingType )
+ || Constants.PROJECT_PACKAGING_WAR.equalsIgnoreCase( packagingType ) )
{
String[] oldFiles =
FileUtils.getFilesFromExtension( directory.getAbsolutePath(), new String[] { packagingType } );
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=691404&r1=691403&r2=691404&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 Tue Sep 2 14:57:19 2008
@@ -165,10 +165,10 @@
new RadManifestWriter().init( getLog(), config ).write();
}
- if ( isJavaProject() && !Constants.PROJECT_PACKAGING_EAR.equals( packaging ) &&
- !Constants.PROJECT_PACKAGING_WAR.equals( packaging ) &&
- !Constants.PROJECT_PACKAGING_EJB.equals( packaging ) &&
- !NO_GENERATED_RESOURCE_DIRNAME.equals( this.generatedResourceDirName ) )
+ if ( isJavaProject() && !Constants.PROJECT_PACKAGING_EAR.equals( packaging )
+ && !Constants.PROJECT_PACKAGING_WAR.equals( packaging )
+ && !Constants.PROJECT_PACKAGING_EJB.equals( packaging )
+ && !NO_GENERATED_RESOURCE_DIRNAME.equals( this.generatedResourceDirName ) )
{
String generatedResourceDir =
@@ -303,16 +303,16 @@
*/
protected boolean isAvailableAsAReactorProject( Artifact artifact )
{
- if ( this.reactorProjects != null &&
- ( Constants.PROJECT_PACKAGING_JAR.equals( artifact.getType() ) ||
- Constants.PROJECT_PACKAGING_EJB.equals( artifact.getType() ) || Constants.PROJECT_PACKAGING_WAR.equals( artifact.getType() ) ) )
+ if ( this.reactorProjects != null
+ && ( Constants.PROJECT_PACKAGING_JAR.equals( artifact.getType() )
+ || Constants.PROJECT_PACKAGING_EJB.equals( artifact.getType() ) || Constants.PROJECT_PACKAGING_WAR.equals( artifact.getType() ) ) )
{
for ( Iterator iter = this.reactorProjects.iterator(); iter.hasNext(); )
{
MavenProject reactorProject = (MavenProject) iter.next();
- if ( reactorProject.getGroupId().equals( artifact.getGroupId() ) &&
- reactorProject.getArtifactId().equals( artifact.getArtifactId() ) )
+ if ( reactorProject.getGroupId().equals( artifact.getGroupId() )
+ && reactorProject.getArtifactId().equals( artifact.getArtifactId() ) )
{
if ( reactorProject.getVersion().equals( artifact.getVersion() ) )
{
@@ -321,10 +321,10 @@
else
{
getLog().info(
- "Artifact " +
- artifact.getId() +
- " already available as a reactor project, but with different version. Expected: " +
- artifact.getVersion() + ", found: " + reactorProject.getVersion() );
+ "Artifact "
+ + artifact.getId()
+ + " already available as a reactor project, but with different version. Expected: "
+ + artifact.getVersion() + ", found: " + reactorProject.getVersion() );
}
}
}
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/reader/ReadWorkspaceLocations.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/reader/ReadWorkspaceLocations.java?rev=691404&r1=691403&r2=691404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/reader/ReadWorkspaceLocations.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/reader/ReadWorkspaceLocations.java Tue Sep 2 14:57:19 2008
@@ -183,7 +183,7 @@
* @param logger the logger for errors
*/
private void detectDefaultJREContainer( WorkspaceConfiguration workspaceConfiguration, MavenProject project,
- Log logger )
+ Log logger )
{
String defaultJREContainer = ReadWorkspaceLocations.CLASSPATHENTRY_DEFAULT;
if ( workspaceConfiguration.getWorkspaceDirectory() != null )
@@ -196,8 +196,8 @@
if ( foundContainer == null )
{
foundContainer =
- getContainerFromExecutable( IdeUtils.getCompilerPluginSetting( project, "executable" ),
- jreMap, logger );
+ getContainerFromExecutable( IdeUtils.getCompilerPluginSetting( project, "executable" ), jreMap,
+ logger );
}
if ( foundContainer == null )
{
@@ -205,8 +205,8 @@
foundContainer = (String) jreMap.get( sourceVersion );
if ( foundContainer != null )
{
- logger.debug( "detected classpathContainer from sourceVersion(" + sourceVersion + "): " +
- foundContainer );
+ logger.debug( "detected classpathContainer from sourceVersion(" + sourceVersion + "): "
+ + foundContainer );
}
}
if ( foundContainer == null )
@@ -342,8 +342,8 @@
null ) );
String packaging = getValue( pom, ReadWorkspaceLocations.PACKAGING, "jar" );
- logger.debug( "found workspace artefact " + group + ":" + artifact + ":" + version + " " + packaging +
- " (" + eclipseProjectName + ")" + " -> " + projectLocation );
+ logger.debug( "found workspace artefact " + group + ":" + artifact + ":" + version + " " + packaging + " ("
+ + eclipseProjectName + ")" + " -> " + projectLocation );
return new IdeDependency( group, artifact, version, packaging, true, false, false, false, false, null,
packaging, false, null, 0, eclipseProjectName );
}
@@ -467,13 +467,13 @@
jreMap.put( version, classpathEntry );
}
jreMap.put( jrePath, classpathEntry );
- logger.debug( "Additional Classpath Container version: " + version + " " + classpathEntry +
- " location: " + jrePath );
+ logger.debug( "Additional Classpath Container version: " + version + " " + classpathEntry
+ + " location: " + jrePath );
}
else
{
- logger.debug( "Ignored (duplicated) additional Classpath Container version: " + version + " " +
- classpathEntry + " location: " + jrePath );
+ logger.debug( "Ignored (duplicated) additional Classpath Container version: " + version + " "
+ + classpathEntry + " location: " + jrePath );
}
}
catch ( IOException e )
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseAjdtWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseAjdtWriter.java?rev=691404&r1=691403&r2=691404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseAjdtWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseAjdtWriter.java Tue Sep 2 14:57:19 2008
@@ -63,13 +63,13 @@
private static final String PROP_ECLIPSE_PREFERENCES_VERSION = "eclipse.preferences.version"; //$NON-NLS-1$
private static final String DIR_DOT_SETTINGS = ".settings"; //$NON-NLS-1$
-
+
private static final String AJDT_PROP_PREFIX = "org.eclipse.ajdt.ui."; //$NON-NLS-1$
-
+
private static final String ASPECT_DEP_PROP = "aspectPath";
-
+
private static final String WEAVE_DEP_PROP = "inPath";
-
+
/**
* @see org.apache.maven.plugin.eclipse.writers.EclipseWriter#write()
*/
@@ -83,19 +83,19 @@
IdeDependency[] deps = config.getDeps();
int ajdtDepCount = 0;
int ajdtWeaveDepCount = 0;
- for ( int i = 0 ; i < deps.length ; i++ )
+ for ( int i = 0; i < deps.length; i++ )
{
- if( deps[ i ].isAjdtDependency() )
+ if ( deps[i].isAjdtDependency() )
{
- addDependency( ajdtSettings, deps[ i ], ASPECT_DEP_PROP, ++ajdtDepCount );
+ addDependency( ajdtSettings, deps[i], ASPECT_DEP_PROP, ++ajdtDepCount );
}
- if( deps[ i ].isAjdtWeaveDependency() )
+ if ( deps[i].isAjdtWeaveDependency() )
{
- addDependency( ajdtSettings, deps[ i ], WEAVE_DEP_PROP, ++ajdtWeaveDepCount );
+ addDependency( ajdtSettings, deps[i], WEAVE_DEP_PROP, ++ajdtWeaveDepCount );
}
}
-
+
// write the settings, if needed
if ( !ajdtSettings.isEmpty() )
{
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseAntExternalLaunchConfigurationWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseAntExternalLaunchConfigurationWriter.java?rev=691404&r1=691403&r2=691404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseAntExternalLaunchConfigurationWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseAntExternalLaunchConfigurationWriter.java Tue Sep 2 14:57:19 2008
@@ -60,8 +60,8 @@
writeAttribute( writer, "org.eclipse.debug.core.MAPPED_RESOURCE_TYPES", new String[] { "1" } );
- writeAttribute( writer, "org.eclipse.debug.core.MAPPED_RESOURCE_PATHS", new String[] { "/" +
- config.getEclipseProjectName() + "/" + buildfilePath } );
+ writeAttribute( writer, "org.eclipse.debug.core.MAPPED_RESOURCE_PATHS", new String[] { "/"
+ + config.getEclipseProjectName() + "/" + buildfilePath } );
}
protected String getLaunchConfigurationType()
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java?rev=691404&r1=691403&r2=691404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java Tue Sep 2 14:57:19 2008
@@ -206,8 +206,8 @@
{
EclipseSourceDir dir = config.getSourceDirs()[j];
- log.debug( "Processing " + ( dir.isResource() ? "re" : "" ) + "source " + dir.getPath() + ": output=" +
- dir.getOutput() + "; default output=" + defaultOutput );
+ log.debug( "Processing " + ( dir.isResource() ? "re" : "" ) + "source " + dir.getPath() + ": output="
+ + dir.getOutput() + "; default output=" + defaultOutput );
boolean isSpecial = false;
@@ -218,8 +218,7 @@
// and if the default output has any sources that copy there.
if ( dir.getOutput() != null // resource output dir is set
- &&
- !dir.getOutput().equals( defaultOutput ) // output dir is not default target/classes
+ && !dir.getOutput().equals( defaultOutput ) // output dir is not default target/classes
&& dir.getOutput().startsWith( defaultOutput ) // ... but is nested
&& byOutputDir.get( defaultOutput ) != null // ???
&& !( (List) byOutputDir.get( defaultOutput ) ).isEmpty() // ???
@@ -228,8 +227,8 @@
// do not specify as source since the output will be nested. Instead, mark
// it as a todo, and handle it with a custom build.xml file later.
- log.debug( "Marking as special to prevent output folder nesting: " + dir.getPath() + " (output=" +
- dir.getOutput() + ")" );
+ log.debug( "Marking as special to prevent output folder nesting: " + dir.getPath() + " (output="
+ + dir.getOutput() + ")" );
isSpecial = true;
specialSources.add( dir );
@@ -325,8 +324,8 @@
}
catch ( IOException e )
{
- throw new MojoExecutionException( "Cannot create " + config.getEclipseProjectDirectory() +
- "/maven-eclipse.xml", e );
+ throw new MojoExecutionException( "Cannot create " + config.getEclipseProjectDirectory()
+ + "/maven-eclipse.xml", e );
}
log.info( "Creating external launcher file" );
@@ -340,9 +339,9 @@
new BuildCommand(
"org.eclipse.ui.externaltools.ExternalToolBuilder",
"LaunchConfigHandle",
- "<project>/" +
- EclipseLaunchConfigurationWriter.FILE_DOT_EXTERNAL_TOOL_BUILDERS +
- "Maven_Ant_Builder.launch" ) );
+ "<project>/"
+ + EclipseLaunchConfigurationWriter.FILE_DOT_EXTERNAL_TOOL_BUILDERS
+ + "Maven_Ant_Builder.launch" ) );
}
// ----------------------------------------------------------------------
@@ -357,24 +356,24 @@
Set addedDependencies = new HashSet();
// TODO if (..magic property equals orderDependencies..)
- // ----------------------------------------------------------------------
+ // ----------------------------------------------------------------------
// Java API dependencies that may complete the classpath container so must
- // be declared BEFORE so that container access rules don't fail
+ // be declared BEFORE so that container access rules don't fail
// ----------------------------------------------------------------------
IdeDependency[] depsToWrite = config.getDepsOrdered();
- for ( int j = 0; j < depsToWrite.length; j++ )
+ for ( int j = 0; j < depsToWrite.length; j++ )
{
IdeDependency dep = depsToWrite[j];
- if ( dep.isJavaApi() )
- {
- String depId = getDependencyId( dep );
- if ( !addedDependencies.contains( depId ) )
+ if ( dep.isJavaApi() )
+ {
+ String depId = getDependencyId( dep );
+ if ( !addedDependencies.contains( depId ) )
{
- addDependency( writer, dep );
- addedDependencies.add( depId );
+ addDependency( writer, dep );
+ addedDependencies.add( depId );
}
- }
- }
+ }
+ }
// ----------------------------------------------------------------------
// Container classpath entries
@@ -401,7 +400,7 @@
/* avoid duplicates in the classpath for artifacts with different types (like ejbs or test-jars) */
if ( !addedDependencies.contains( depId ) )
{
- addDependency( writer, dep );
+ addDependency( writer, dep );
addedDependencies.add( depId );
}
}
@@ -510,11 +509,10 @@
if ( ATTR_VAR.equals( kind ) )
{
sourcepath =
- M2_REPO +
- "/" //$NON-NLS-1$
- +
- IdeUtils.toRelativeAndFixSeparator( localRepositoryFile, dep.getSourceAttachment(),
- false );
+ M2_REPO
+ + "/" //$NON-NLS-1$
+ + IdeUtils.toRelativeAndFixSeparator( localRepositoryFile, dep.getSourceAttachment(),
+ false );
}
else
{
@@ -536,11 +534,11 @@
}
// Skip aspectj libraries since they are in the container.
- if( (config.getAjdtVersion() != 0) && dep.getArtifactId().toLowerCase().startsWith( "aspectj" ) )
+ if ( ( config.getAjdtVersion() != 0 ) && dep.getArtifactId().toLowerCase().startsWith( "aspectj" ) )
{
return;
- }
-
+ }
+
writer.startElement( ELT_CLASSPATHENTRY );
writer.addAttribute( ATTR_KIND, kind );
writer.addAttribute( ATTR_PATH, path );
@@ -567,9 +565,9 @@
}
- if ( Constants.PROJECT_PACKAGING_WAR.equals( this.config.getPackaging() ) && config.getWtpapplicationxml() &&
- kind.equals( ATTR_VAR ) && !dep.isTestDependency() && !dep.isProvided() &&
- !dep.isSystemScopedOutsideProject( this.config.getProject() ) )
+ if ( Constants.PROJECT_PACKAGING_WAR.equals( this.config.getPackaging() ) && config.getWtpapplicationxml()
+ && kind.equals( ATTR_VAR ) && !dep.isTestDependency() && !dep.isProvided()
+ && !dep.isSystemScopedOutsideProject( this.config.getProject() ) )
{
if ( !attributeElemOpen )
{
@@ -584,7 +582,7 @@
}
- if( dep.isAjdtDependency() && (config.getAjdtVersion() >= 1.5) )
+ if ( dep.isAjdtDependency() && ( config.getAjdtVersion() >= 1.5 ) )
{
if ( !attributeElemOpen )
{
@@ -596,10 +594,10 @@
writer.addAttribute( NAME, ORG_ECLIPSE_AJDT_ASPECTPATH ); //$NON-NLS-1$ //$NON-NLS-2$
writer.addAttribute( VALUE, Boolean.TRUE.toString() ); //$NON-NLS-1$ //$NON-NLS-2$
writer.endElement();
-
+
}
- if( dep.isAjdtWeaveDependency() && (config.getAjdtVersion() >= 1.5) )
+ if ( dep.isAjdtWeaveDependency() && ( config.getAjdtVersion() >= 1.5 ) )
{
if ( !attributeElemOpen )
{
@@ -611,9 +609,9 @@
writer.addAttribute( NAME, ORG_ECLIPSE_AJDT_INPATH ); //$NON-NLS-1$ //$NON-NLS-2$
writer.addAttribute( VALUE, Boolean.TRUE.toString() ); //$NON-NLS-1$ //$NON-NLS-2$
writer.endElement();
-
+
}
-
+
if ( attributeElemOpen )
{
writer.endElement();
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseProjectWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseProjectWriter.java?rev=691404&r1=691403&r2=691404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseProjectWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseProjectWriter.java Tue Sep 2 14:57:19 2008
@@ -48,7 +48,7 @@
/**
* Writes eclipse .project file.
- *
+ *
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
* @author <a href="mailto:kenney@neonics.com">Kenney Westerhof</a>
* @author <a href="mailto:fgiust@apache.org">Fabrizio Giustina</a>
@@ -195,7 +195,7 @@
IdeDependency dep = config.getDepsOrdered()[j];
// Avoid duplicates entries when same project is refered using multiple types
// (ejb, test-jar ...)
- if ( dep.isReferencedProject() && ! duplicates.contains( dep.getEclipseProjectName() ))
+ if ( dep.isReferencedProject() && !duplicates.contains( dep.getEclipseProjectName() ) )
{
writer.startElement( "project" ); //$NON-NLS-1$
writer.writeText( dep.getEclipseProjectName() );
@@ -257,8 +257,8 @@
{
IdeDependency dep = config.getDepsOrdered()[j];
- if ( dep.isAddedToClasspath() && !dep.isProvided() && !dep.isReferencedProject() &&
- !dep.isTestDependency() && !dep.isOsgiBundle() )
+ if ( dep.isAddedToClasspath() && !dep.isProvided() && !dep.isReferencedProject()
+ && !dep.isTestDependency() && !dep.isOsgiBundle() )
{
String name = dep.getFile().getName();
addLink( writer, name, StringUtils.replace( IdeUtils.getCanonicalPath( dep.getFile() ), "\\",
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWriterConfig.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWriterConfig.java?rev=691404&r1=691403&r2=691404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWriterConfig.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWriterConfig.java Tue Sep 2 14:57:19 2008
@@ -146,7 +146,7 @@
private float wtpVersion;
private float ajdtVersion;
-
+
private WorkspaceConfiguration workspaceConfiguration;
public WorkspaceConfiguration getWorkspaceConfiguration()
@@ -193,8 +193,8 @@
{
return result;
}
- if ( ( (IdeDependency) o1 ).getClassifier() != null &&
- ( (IdeDependency) o2 ).getClassifier() != null )
+ if ( ( (IdeDependency) o1 ).getClassifier() != null
+ && ( (IdeDependency) o2 ).getClassifier() != null )
{
result =
( (IdeDependency) o1 ).getClassifier().compareToIgnoreCase(
@@ -587,6 +587,7 @@
/**
* Returns the ajdtVersion.
+ *
* @return the ajdtVersion.
*/
public float getAjdtVersion()
@@ -596,6 +597,7 @@
/**
* Sets the ajdtVersion.
+ *
* @param ajdtVersion the ajdtVersion.
*/
public void setAjdtVersion( float ajdtVersion )
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/MonitoredResource.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/MonitoredResource.java?rev=691404&r1=691403&r2=691404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/MonitoredResource.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/MonitoredResource.java Tue Sep 2 14:57:19 2008
@@ -39,7 +39,7 @@
public String print()
{
- return "<item factoryID='org.eclipse.ui.internal.model.ResourceFactory' path='" + path + "' type='" + type +
- "'/>";
+ return "<item factoryID='org.eclipse.ui.internal.model.ResourceFactory' path='" + path + "' type='" + type
+ + "'/>";
}
}
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/myeclipse/MyEclipseMetadataWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/myeclipse/MyEclipseMetadataWriter.java?rev=691404&r1=691403&r2=691404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/myeclipse/MyEclipseMetadataWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/myeclipse/MyEclipseMetadataWriter.java Tue Sep 2 14:57:19 2008
@@ -60,9 +60,9 @@
{
String packaging = config.getProject().getPackaging();
- if ( !Constants.PROJECT_PACKAGING_EAR.equalsIgnoreCase( packaging ) &&
- !Constants.PROJECT_PACKAGING_WAR.equalsIgnoreCase( packaging ) &&
- !Constants.PROJECT_PACKAGING_EJB.equalsIgnoreCase( packaging ) )
+ if ( !Constants.PROJECT_PACKAGING_EAR.equalsIgnoreCase( packaging )
+ && !Constants.PROJECT_PACKAGING_WAR.equalsIgnoreCase( packaging )
+ && !Constants.PROJECT_PACKAGING_EJB.equalsIgnoreCase( packaging ) )
{
return;
}
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/myeclipse/MyEclipseSpringBeansWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/myeclipse/MyEclipseSpringBeansWriter.java?rev=691404&r1=691403&r2=691404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/myeclipse/MyEclipseSpringBeansWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/myeclipse/MyEclipseSpringBeansWriter.java Tue Sep 2 14:57:19 2008
@@ -116,8 +116,8 @@
}
/**
- * Retrieve the list of Spring configuration files recursively from the <code>basedir</code> directory,
- * considering only filenames matching the <code>pattern</code> given
+ * Retrieve the list of Spring configuration files recursively from the <code>basedir</code> directory, considering
+ * only filenames matching the <code>pattern</code> given
*
* @param basedir the path to the base directory to search in
* @param pattern file include pattern
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadApplicationXMLWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadApplicationXMLWriter.java?rev=691404&r1=691403&r2=691404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadApplicationXMLWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadApplicationXMLWriter.java Tue Sep 2 14:57:19 2008
@@ -186,8 +186,8 @@
result.setAttribute( XMLNS, "http://java.sun.com/xml/ns/j2ee" );
result.setAttribute( XMLNS_XSI, "http://www.w3.org/2001/XMLSchema-instance" );
result.setAttribute( XMLNS_SCHEMA_LOCATION,
- "http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_" +
- j2eeVersion.charAt( 0 ) + "_" + j2eeVersion.charAt( 2 ) + ".xsd" );
+ "http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_"
+ + j2eeVersion.charAt( 0 ) + "_" + j2eeVersion.charAt( 2 ) + ".xsd" );
result.addChild( new Xpp3Dom( APPLICATION_XML_DESCRIPTION ) );
Xpp3Dom name = new Xpp3Dom( APPLICATION_XML_DISPLAY_NAME );
name.setValue( config.getProject().getArtifactId() );
@@ -249,22 +249,22 @@
{
if ( children[index].getAttribute( MODULEMAPS_PROJECT_NAME ).equals( dependency.getArtifactId() ) )
{
- if ( dependency.getType().equals( Constants.PROJECT_PACKAGING_EJB ) &&
- children[index].getName().equals( MODULEMAPS_MAPPINGS ) &&
- children[index].getChild( APPLICATION_XML_MODULE ).getAttribute( XMI_TYPE ).equals(
- MODULEMAPS_APPLICATION_EJB_MODULE ) )
+ if ( dependency.getType().equals( Constants.PROJECT_PACKAGING_EJB )
+ && children[index].getName().equals( MODULEMAPS_MAPPINGS )
+ && children[index].getChild( APPLICATION_XML_MODULE ).getAttribute( XMI_TYPE ).equals(
+ MODULEMAPS_APPLICATION_EJB_MODULE ) )
{
return children[index];
}
- else if ( dependency.getType().equals( Constants.PROJECT_PACKAGING_WAR ) &&
- children[index].getName().equals( MODULEMAPS_MAPPINGS ) &&
- children[index].getChild( APPLICATION_XML_MODULE ).getAttribute( XMI_TYPE ).equals(
- MODULEMAPS_APPLICATION_WEB_MODULE ) )
+ else if ( dependency.getType().equals( Constants.PROJECT_PACKAGING_WAR )
+ && children[index].getName().equals( MODULEMAPS_MAPPINGS )
+ && children[index].getChild( APPLICATION_XML_MODULE ).getAttribute( XMI_TYPE ).equals(
+ MODULEMAPS_APPLICATION_WEB_MODULE ) )
{
return children[index];
}
- else if ( dependency.getType().equals( Constants.PROJECT_PACKAGING_JAR ) &&
- children[index].getName().equals( MODULEMAPS_UTILITY_JARMAPPINGS ) )
+ else if ( dependency.getType().equals( Constants.PROJECT_PACKAGING_JAR )
+ && children[index].getName().equals( MODULEMAPS_UTILITY_JARMAPPINGS ) )
{
return children[index];
}
@@ -394,8 +394,8 @@
Xpp3Dom[] newModulemapsXmlDomChildren = modulemapsXmlDom.getChildren();
for ( int newIndex = 0; newIndex < newModulemapsXmlDomChildren.length; newIndex++ )
{
- if ( ( newModulemapsXmlDomChildren[newIndex] != null ) &&
- ( newModulemapsXmlDomChildren[newIndex] == this.modulemapsXmlDomChildren[index] ) )
+ if ( ( newModulemapsXmlDomChildren[newIndex] != null )
+ && ( newModulemapsXmlDomChildren[newIndex] == this.modulemapsXmlDomChildren[index] ) )
{
modulemapsXmlDom.removeChild( newIndex );
break;
@@ -478,8 +478,8 @@
{
handled( module );
module.getChild( APPLICATION_XML_WEB ).getChild( APPLICATION_XML_WEB_URI ).setValue(
- dependency.getArtifactId() +
- ".war" );
+ dependency.getArtifactId()
+ + ".war" );
module.getChild( APPLICATION_XML_WEB ).getChild( APPLICATION_XML_CONTEXT_ROOT ).setValue(
contextRootInPom );
}
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadEjbClasspathWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadEjbClasspathWriter.java?rev=691404&r1=691403&r2=691404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadEjbClasspathWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadEjbClasspathWriter.java Tue Sep 2 14:57:19 2008
@@ -105,8 +105,8 @@
Xpp3Dom[] children = classpath.getChildren();
for ( int index = 0; index < children.length; index++ )
{
- if ( LIB.equals( children[index].getAttribute( KIND ) ) &&
- TARGET_WEBSPHERE_CLASSES.equals( children[index].getAttribute( "path" ) ) )
+ if ( LIB.equals( children[index].getAttribute( KIND ) )
+ && TARGET_WEBSPHERE_CLASSES.equals( children[index].getAttribute( "path" ) ) )
{
return; // nothing to do!
}
@@ -267,9 +267,9 @@
{
File path = new File( children[index].getAttribute( PATH ) );
- if ( path.exists() && path.getParentFile().getName().equals( LIB ) &&
- path.getParentFile().getParentFile().getName().equals( "base_v6" ) &&
- path.getParentFile().getParentFile().getParentFile().getName().equals( "runtimes" ) )
+ if ( path.exists() && path.getParentFile().getName().equals( LIB )
+ && path.getParentFile().getParentFile().getName().equals( "base_v6" )
+ && path.getParentFile().getParentFile().getParentFile().getName().equals( "runtimes" ) )
{
Xpp3Dom[] currentChildren = classpath.getChildren();
for ( int deleteIndex = currentChildren.length - 1; deleteIndex >= 0; deleteIndex-- )
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadJ2EEWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadJ2EEWriter.java?rev=691404&r1=691403&r2=691404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadJ2EEWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadJ2EEWriter.java Tue Sep 2 14:57:19 2008
@@ -69,9 +69,9 @@
Writer w;
String packaging = config.getPackaging();
- if ( Constants.PROJECT_PACKAGING_WAR.equalsIgnoreCase( packaging ) ||
- Constants.PROJECT_PACKAGING_EJB.equalsIgnoreCase( packaging ) ||
- Constants.PROJECT_PACKAGING_EAR.equalsIgnoreCase( packaging ) )
+ if ( Constants.PROJECT_PACKAGING_WAR.equalsIgnoreCase( packaging )
+ || Constants.PROJECT_PACKAGING_EJB.equalsIgnoreCase( packaging )
+ || Constants.PROJECT_PACKAGING_EAR.equalsIgnoreCase( packaging ) )
{
try
{
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadLibCopier.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadLibCopier.java?rev=691404&r1=691403&r2=691404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadLibCopier.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadLibCopier.java Tue Sep 2 14:57:19 2008
@@ -88,8 +88,8 @@
}
for ( int index = 0; index < deps.length; index++ )
{
- if ( !deps[index].isTestDependency() && !deps[index].isProvided() && !deps[index].isReferencedProject() &&
- !deps[index].isSystemScoped() )
+ 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 );
}
@@ -151,8 +151,8 @@
IdeUtils.toRelativeAndFixSeparator( config.getEclipseProjectDirectory(), warSourceDirectory, false );
String srcMainWebappWebInfLibDirName =
- basedir.getAbsolutePath() + File.separatorChar + webContentDir + File.separatorChar + "WEB-INF" +
- File.separatorChar + "lib";
+ basedir.getAbsolutePath() + File.separatorChar + webContentDir + File.separatorChar + "WEB-INF"
+ + File.separatorChar + "lib";
File srcMainWebappWebInfLibDir = new File( srcMainWebappWebInfLibDirName );
srcMainWebappWebInfLibDir.mkdirs();
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadManifestWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadManifestWriter.java?rev=691404&r1=691403&r2=691404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadManifestWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadManifestWriter.java Tue Sep 2 14:57:19 2008
@@ -141,8 +141,8 @@
Manifest manifest = createNewManifest();
File manifestFile =
- new File( metaInfBaseDirectory + File.separatorChar + META_INF_DIRECTORY + File.separatorChar +
- MANIFEST_MF_FILENAME );
+ new File( metaInfBaseDirectory + File.separatorChar + META_INF_DIRECTORY + File.separatorChar
+ + MANIFEST_MF_FILENAME );
log.info( "MANIFEST LOCATION: " + manifestFile );
@@ -165,8 +165,8 @@
}
catch ( Exception e )
{
- log.error( Messages.getString( "EclipsePlugin.cantwritetofile", new Object[] { metaInfBaseDirectory +
- File.separatorChar + MANIFEST_MF_FILENAME } ) );
+ log.error( Messages.getString( "EclipsePlugin.cantwritetofile", new Object[] { metaInfBaseDirectory
+ + File.separatorChar + MANIFEST_MF_FILENAME } ) );
}
}
@@ -270,8 +270,8 @@
newValue = orderClasspath( newValue );
existingValue = orderClasspath( existingValue );
}
- if ( ( newValue == null || !newValue.equals( existingValue ) ) &&
- ( existingValue == null || !existingValue.equals( newValue ) ) )
+ if ( ( newValue == null || !newValue.equals( existingValue ) )
+ && ( existingValue == null || !existingValue.equals( newValue ) ) )
{
return false;
}
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebSettingsWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebSettingsWriter.java?rev=691404&r1=691403&r2=691404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebSettingsWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebSettingsWriter.java Tue Sep 2 14:57:19 2008
@@ -180,8 +180,8 @@
if ( dependency.isReferencedProject() && !dependency.isTestDependency() && !dependency.isProvided() )
{
- log.debug( "RadWebSettingsWriter: dependency " + dependency.toString() +
- " selected for inclusion as lib-module" );
+ log.debug( "RadWebSettingsWriter: dependency " + dependency.toString()
+ + " selected for inclusion as lib-module" );
String depName = dependency.getEclipseProjectName();
String depJar = dependency.getArtifactId() + ".jar";