Author: aheritier
Date: Tue Nov 27 14:47:10 2007
New Revision: 598797
URL: http://svn.apache.org/viewvc?rev=598797&view=rev
Log:
Format sources
Modified:
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/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/test/java/org/apache/maven/plugin/eclipse/RadPluginTest.java
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=598797&r1=598796&r2=598797&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 Nov 27 14:47:10 2007
@@ -113,19 +113,18 @@
private void handleWarLibs()
throws MojoExecutionException
{
- File basedir = this.project.getBasedir();
-
+ File basedir = this.project.getBasedir();
+
File warSourceDirectory =
new File( IdeUtils.getPluginSetting( this.project,
JeeUtils.ARTIFACT_MAVEN_WAR_PLUGIN,
"warSourceDirectory",
//$NON-NLS-1$
"src/main/webapp" ) );
//$NON-NLS-1$
-
- String webContentDir = IdeUtils.toRelativeAndFixSeparator( basedir,
- warSourceDirectory, false );
-
+
+ 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();
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=598797&r1=598796&r2=598797&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 Nov 27 14:47:10 2007
@@ -142,17 +142,17 @@
{
File basedir = config.getProject().getBasedir();
- // Generating web content settings based on war plug-in
warSourceDirectory property
+ // Generating web content settings based on war plug-in
warSourceDirectory property
File warSourceDirectory =
new File( IdeUtils.getPluginSetting( config.getProject(),
JeeUtils.ARTIFACT_MAVEN_WAR_PLUGIN,
"warSourceDirectory",
//$NON-NLS-1$
"src/main/webapp" ) );
//$NON-NLS-1$
- String webContentDir = IdeUtils.toRelativeAndFixSeparator(
config.getEclipseProjectDirectory(),
- warSourceDirectory, false );
-
+ String webContentDir =
+ 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=598797&r1=598796&r2=598797&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 Nov 27 14:47:10 2007
@@ -65,24 +65,24 @@
* Search the project for the existing META-INF directory where the
manifest should be located.
*
* @return the apsolute path to the META-INF directory
- * @throws MojoExecutionException
+ * @throws MojoExecutionException
*/
- private String getMetaInfBaseDirectory( MavenProject project ) throws
MojoExecutionException
+ private String getMetaInfBaseDirectory( MavenProject project )
+ throws MojoExecutionException
{
String metaInfBaseDirectory = null;
if ( config.getProject().getPackaging().equals(
Constants.PROJECT_PACKAGING_WAR ) )
{
- // Generating web content settings based on war plug-in
warSourceDirectory property
+ // Generating web content settings based on war plug-in
warSourceDirectory property
File warSourceDirectory =
new File( IdeUtils.getPluginSetting( config.getProject(),
JeeUtils.ARTIFACT_MAVEN_WAR_PLUGIN,
"warSourceDirectory",
//$NON-NLS-1$
config.getProject().getBasedir() + DEFAULT_WEBAPP_RESOURCE_DIR ) );
//$NON-NLS-1$
-
- String webContentDir = IdeUtils.toRelativeAndFixSeparator(
config.getEclipseProjectDirectory(),
- warSourceDirectory, false );
-
+ String webContentDir =
+ IdeUtils.toRelativeAndFixSeparator(
config.getEclipseProjectDirectory(), warSourceDirectory, false );
+
metaInfBaseDirectory =
config.getProject().getBasedir().getAbsolutePath() +
File.separatorChar + webContentDir;
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=598797&r1=598796&r2=598797&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 Nov 27 14:47:10 2007
@@ -124,24 +124,25 @@
* write the websettings file for RAD6.
*
* @param writer where to write to
- * @throws MojoExecutionException
+ * @throws MojoExecutionException
*/
- private void writeModuleTypeFacetCore( XMLWriter writer ) throws
MojoExecutionException
+ private void writeModuleTypeFacetCore( XMLWriter writer )
+ throws MojoExecutionException
{
writer.startElement( WEBSETTINGS_WEBSETTINGS );
writer.addAttribute( WEBSETTINGS_VERSION, "600" );
writer.startElement( WEBSETTINGS_WEBCONTENT );
-
- // Generating web content settings based on war plug-in
warSourceDirectory property
+
+ // Generating web content settings based on war plug-in
warSourceDirectory property
File warSourceDirectory =
new File( IdeUtils.getPluginSetting( config.getProject(),
JeeUtils.ARTIFACT_MAVEN_WAR_PLUGIN,
"warSourceDirectory",
//$NON-NLS-1$
config.getProject().getBasedir() + "/src/main/webapp" ) ); //$NON-NLS-1$
- String webContentDir = IdeUtils.toRelativeAndFixSeparator(
config.getEclipseProjectDirectory(),
- warSourceDirectory, false );
-
+ String webContentDir =
+ IdeUtils.toRelativeAndFixSeparator(
config.getEclipseProjectDirectory(), warSourceDirectory, false );
+
writer.writeText( webContentDir );
-
+
writer.endElement();
writer.startElement( WEBSETTINGS_CONTEXT_ROOT );
writer.writeText( getContextRoot( warContextRoot ) );
Modified:
maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/RadPluginTest.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/RadPluginTest.java?rev=598797&r1=598796&r2=598797&view=diff
==============================================================================
---
maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/RadPluginTest.java
(original)
+++
maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/RadPluginTest.java
Tue Nov 27 14:47:10 2007
@@ -261,22 +261,23 @@
{
testProject( "project-rad-6", new Properties(), "rad-clean", "rad" );
}
-
+
/**
- * Tests warSourceDirectory setting to be reflected in generated
.websettings,
- * location of jars in WEB-INF/lib and generation of MANIFEST.MF at the
right place
+ * Tests warSourceDirectory setting to be reflected in generated
.websettings, location of jars in WEB-INF/lib and
+ * generation of MANIFEST.MF at the right place
+ *
* @throws Exception
*/
public void testProject7()
- throws Exception
- {
- testProject( "project-rad-7", new Properties(), "rad-clean", "rad"
);
+ throws Exception
+ {
+ testProject( "project-rad-7", new Properties(), "rad-clean", "rad" );
- /*
- * testing libs in web content directory
- */
- File basedir = getTestFile(
"target/test-classes/projects/project-rad-7" );
- File pom = new File( basedir, "pom.xml" );
+ /*
+ * testing libs in web content directory
+ */
+ File basedir = getTestFile(
"target/test-classes/projects/project-rad-7" );
+ File pom = new File( basedir, "pom.xml" );
MavenProject project = readProject( pom );
File outputDir;
File projectOutputDir = basedir;
@@ -293,10 +294,10 @@
outputDir.mkdirs();
projectOutputDir = new File( outputDir, project.getArtifactId() );
}
-
+
compareDirectoryContent( basedir, projectOutputDir,
"WebContent/WEB-INF/lib/" );
compareDirectoryContent( basedir, projectOutputDir,
"WebContent/META-INF/" );
- }
+ }
}