eclipse plugin imported

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@169837 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-05-12 15:40:51 +00:00
parent 0c5ec0305c
commit e186806889
38 changed files with 1444 additions and 0 deletions

View File

@ -0,0 +1,30 @@
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>maven-plugin-parent</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<version>2.0-SNAPSHOT</version>
</parent>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.0-alpha-1-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Maven Eclipse Plugin</name>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>1.0-alpha-2</version>
</dependency>
<dependency>
<groupId>plexus</groupId>
<artifactId>plexus-container-default</artifactId>
<version>1.0-alpha-2</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,72 @@
package org.apache.maven.plugin.eclipse;
/*
* Copyright (c) 2004, Codehaus.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is furnished to do
* so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.project.MavenProject;
/**
* A Maven2 plugin which integrates the use of Maven2 with Eclipse.
*
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
* @version $Id$
* @goal eclipse
* @requiresDependencyResolution
*/
public class EclipsePlugin
extends AbstractMojo
{
protected EclipseWriter eclipseWriter;
/**
* The project whose project files to create.
*
* @parameter expression="${project}"
* @required
*/
private MavenProject project;
public EclipsePlugin()
{
eclipseWriter = new EclipseWriter();
}
public void setProject( MavenProject project )
{
this.project = project;
}
public void execute()
throws MojoExecutionException
{
try
{
eclipseWriter.write( project );
}
catch ( EclipsePluginException e )
{
throw new MojoExecutionException( "Error writing eclipse files.", e );
}
}
}

View File

@ -0,0 +1,40 @@
package org.apache.maven.plugin.eclipse;
/*
* Copyright (c) 2004, Codehaus.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is furnished to do
* so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
* @version $Id$
*/
public class EclipsePluginException extends Exception
{
public EclipsePluginException( String msg )
{
super( msg );
}
public EclipsePluginException( String msg, Throwable cause )
{
super( msg, cause );
}
}

View File

@ -0,0 +1,381 @@
package org.apache.maven.plugin.eclipse;
/*
* Copyright (c) 2004, Codehaus.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is furnished to do
* so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
import org.apache.maven.artifact.Artifact;
import org.apache.maven.model.Resource;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter;
import org.codehaus.plexus.util.xml.XMLWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
* @version $Id$
*/
public class EclipseWriter
{
public void write( MavenProject project )
throws EclipsePluginException
{
File basedir = project.getFile().getParentFile();
Map map = new HashMap();
assertNotEmpty( project.getGroupId(), "groupId" );
assertNotEmpty( project.getArtifactId(), "artifactId" );
map.put( "project.artifactId", project.getArtifactId() );
writeEclipseProject( basedir, project, map );
writeEclipseClasspath( basedir, project, map );
System.out.println( "Wrote Eclipse project for " + project.getArtifactId() + " to " + basedir.getAbsolutePath() );
}
// ----------------------------------------------------------------------
// .project
// ----------------------------------------------------------------------
protected void writeEclipseProject( File basedir, MavenProject project, Map map )
throws EclipsePluginException
{
FileWriter w;
try
{
w = new FileWriter( new File( basedir, ".project" ) );
}
catch ( IOException ex )
{
throw new EclipsePluginException( "Exception while opening file.", ex );
}
XMLWriter writer = new PrettyPrintXMLWriter( w );
writer.startElement( "projectDescription" );
writer.startElement( "name" );
if ( project.getArtifactId() == null )
{
throw new EclipsePluginException( "Missing element from the POM: artifactId." );
}
writer.writeText( project.getArtifactId() );
writer.endElement();
// TODO: this entire element might be dropped if the comment is null.
// but as the maven1 eclipse plugin does it, it's better to be safe than sorry
// A eclipse developer might want to look at this.
writer.startElement( "comment" );
if ( project.getDescription() != null )
{
writer.writeText( project.getDescription() );
}
writer.endElement();
// TODO: Add project dependencies here
// Should look in the reactor for other projects
writer.startElement( "projects" );
writer.endElement(); // projects
writer.startElement( "buildSpec" );
writer.startElement( "buildCommand" );
writer.startElement( "name" );
writer.writeText( "org.eclipse.jdt.core.javabuilder" );
writer.endElement(); // name
writer.startElement( "arguments" );
writer.endElement(); // arguments
writer.endElement(); // buildCommand
writer.endElement(); // buildSpec
writer.startElement( "natures" );
writer.startElement( "nature" );
writer.writeText( "org.eclipse.jdt.core.javanature" );
writer.endElement(); // nature
writer.endElement(); // natures
writer.endElement(); // projectDescription
close( w );
}
// ----------------------------------------------------------------------
// .classpath
// ----------------------------------------------------------------------
protected void writeEclipseClasspath( File basedir, MavenProject project, Map map )
throws EclipsePluginException
{
FileWriter w;
try
{
w = new FileWriter( new File( basedir, ".classpath" ) );
}
catch ( IOException ex )
{
throw new EclipsePluginException( "Exception while opening file.", ex );
}
XMLWriter writer = new PrettyPrintXMLWriter( w );
writer.startElement( "classpath" );
// ----------------------------------------------------------------------
// The source roots
// ----------------------------------------------------------------------
addSourceRoots( writer, project.getBasedir(),
project.getCompileSourceRoots(),
null );
addResources( writer, project.getBasedir(),
project.getBuild().getResources(),
null );
// ----------------------------------------------------------------------
// The test sources and resources
// ----------------------------------------------------------------------
addSourceRoots( writer, project.getBasedir(),
project.getTestCompileSourceRoots(),
project.getBuild().getTestOutputDirectory() );
addResources( writer, project.getBasedir(),
project.getBuild().getTestResources(),
project.getBuild().getTestOutputDirectory() );
// ----------------------------------------------------------------------
// The default output
// ----------------------------------------------------------------------
writer.startElement( "classpathentry" );
writer.addAttribute( "kind", "output" );
writer.addAttribute( "path", toRelative( basedir, project.getBuild().getOutputDirectory() ) );
writer.endElement();
// ----------------------------------------------------------------------
// The JRE reference
// ----------------------------------------------------------------------
writer.startElement( "classpathentry" );
writer.addAttribute( "kind", "var" );
writer.addAttribute( "rootpath", "JRE_SRCROOT" );
writer.addAttribute( "path", "JRE_LIB" );
writer.addAttribute( "sourcepath", "JRE_SRC" );
writer.endElement();
// ----------------------------------------------------------------------
// The dependencies
// ----------------------------------------------------------------------
Set artifacts = project.getArtifacts();
for ( Iterator it = artifacts.iterator(); it.hasNext(); )
{
Artifact artifact = (Artifact) it.next();
addDependency( writer, artifact );
}
writer.endElement();
close( w );
}
// ----------------------------------------------------------------------
//
// ----------------------------------------------------------------------
private void addSourceRoots( XMLWriter writer, File basedir, List sourceRoots, String output )
{
for ( Iterator it = sourceRoots.iterator(); it.hasNext(); )
{
String sourceRoot = (String) it.next();
if ( new File( sourceRoot ).isDirectory() )
{
writer.startElement( "classpathentry" );
writer.addAttribute( "kind", "src" );
writer.addAttribute( "path", toRelative( basedir, sourceRoot ) );
if ( output != null )
{
writer.addAttribute( "output", toRelative( basedir, output ) );
}
writer.endElement();
}
}
}
private void addResources( XMLWriter writer, File basedir, List resources, String output )
{
for ( Iterator it = resources.iterator(); it.hasNext(); )
{
Resource resource = (Resource) it.next();
if ( resource.getIncludes().size() != 0 )
{
System.err.println( "This plugin currently doesn't support include patterns for resources. Adding the entire directory." );
}
if ( resource.getExcludes().size() != 0 )
{
System.err.println( "This plugin currently doesn't support exclude patterns for resources. Adding the entire directory." );
}
if ( !StringUtils.isEmpty( resource.getTargetPath() ) )
{
System.err.println( "This plugin currently doesn't support target paths for resources." );
return;
}
File resourceDirectory = new File( resource.getDirectory() );
if ( !resourceDirectory.exists() || !resourceDirectory.isDirectory() )
{
continue;
}
writer.startElement( "classpathentry" );
writer.addAttribute( "kind", "src" );
writer.addAttribute( "path", toRelative( basedir, resource.getDirectory() ) );
if ( output != null )
{
writer.addAttribute( "output", toRelative( basedir, output ) );
}
writer.endElement();
}
}
private void addDependency( XMLWriter writer, Artifact artifact )
{
File path = artifact.getFile();
if ( path == null )
{
System.err.println( "The artifacts path was null. Artifact id: " + artifact.getId() );
return;
}
writer.startElement( "classpathentry" );
writer.addAttribute( "kind", "lib" );
writer.addAttribute( "path", path.getPath().replace( '\\', '/' ) );
writer.endElement();
}
private void close( Writer closeable )
{
if ( closeable == null )
{
return;
}
try
{
closeable.close();
}
catch ( Exception e )
{
// ignore
}
}
private String toRelative( File basedir, String absolutePath )
{
String relative;
if ( absolutePath.startsWith( basedir.getAbsolutePath() ) )
{
relative = absolutePath.substring( basedir.getAbsolutePath().length() + 1 );
}
else
{
relative = absolutePath;
}
relative = StringUtils.replace( relative, "\\", "/" );
return relative;
}
private void assertNotEmpty( String string, String elementName )
throws EclipsePluginException
{
if ( string == null )
{
throw new EclipsePluginException( "Missing element from the project descriptor: '" + elementName + "'." );
}
}
}

View File

@ -0,0 +1,244 @@
<?xml version="1.0" encoding="UTF-8"?>
<profiles version="8">
<profile name="mergere-formats" version="8">
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="18"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="18"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="18"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="18"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="18"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="18"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="48"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="18"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="18"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="37"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="37"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="37"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="37"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_comments" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="100"/>
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="120"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
</profile>
</profiles>

View File

@ -0,0 +1,136 @@
package org.apache.maven.plugin.eclipse;
/*
* Copyright (c) 2004, Codehaus.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is furnished to do
* so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectBuilder;
import org.codehaus.plexus.PlexusTestCase;
import org.codehaus.plexus.util.StringUtils;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
* @version $Id$
*/
public class EclipsePluginTest
extends PlexusTestCase
{
public void testProject1()
throws Exception
{
testProject( "project-1" );
}
public void testProject2()
throws Exception
{
testProject( "project-2" );
}
// ----------------------------------------------------------------------
//
// ----------------------------------------------------------------------
private void testProject( String projectName )
throws Exception
{
File basedir = getTestFile( "src/test/projects/" + projectName );
MavenProjectBuilder builder = (MavenProjectBuilder) lookup( MavenProjectBuilder.ROLE );
EclipsePlugin plugin = new EclipsePlugin();
File repo = getTestFile( "src/test/repository" );
ArtifactRepositoryLayout localRepositoryLayout = (ArtifactRepositoryLayout) lookup( ArtifactRepositoryLayout.ROLE, "legacy" );
ArtifactRepository localRepository = new ArtifactRepository("local", "file://" + repo.getAbsolutePath(), localRepositoryLayout);
MavenProject project = builder.build( new File( basedir, "project.xml" ), localRepository );
for ( Iterator it = project.getArtifacts().iterator(); it.hasNext(); )
{
Artifact artifact = (Artifact) it.next();
artifact.setFile(new File(localRepository.getBasedir(), localRepository.pathOf(artifact)));
}
plugin.setProject( project );
plugin.execute();
assertFileEquals( localRepository.getBasedir(), new File( basedir, "project" ), new File( basedir, ".project" ) );
assertFileEquals( localRepository.getBasedir(), new File( basedir, "classpath" ), new File( basedir, ".classpath" ) );
}
private void assertFileEquals( String mavenRepo, File expectedFile, File actualFile )
throws IOException
{
List expectedLines = getLines( mavenRepo, expectedFile );
List actualLines = getLines( mavenRepo, actualFile );
for ( int i = 0; i < expectedLines.size(); i++ )
{
String expected = expectedLines.get( i ).toString();
if ( actualLines.size() < i )
{
fail( "Too few lines in the actual file. Was " + actualLines.size() + ", expected: " + expectedLines.size() );
}
String actual = actualLines.get( i ).toString();
assertEquals( "Checking line #" + (i + 1), expected, actual );
}
assertTrue( "Unequal number of lines.", expectedLines.size() == actualLines.size() );
}
private List getLines( String mavenRepo, File file )
throws IOException
{
List lines = new ArrayList();
BufferedReader reader = new BufferedReader( new FileReader( file ) );
String line;
while ( (line = reader.readLine()) != null )
{
lines.add( StringUtils.replace( line, "#ArtifactRepositoryPath#", mavenRepo.replace( '\\', '/' ) ) );
}
return lines;
}
}

View File

@ -0,0 +1,6 @@
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="output" path="target/classes"/>
<classpathentry kind="var" rootpath="JRE_SRCROOT" path="JRE_LIB" sourcepath="JRE_SRC"/>
<classpathentry kind="lib" path="c:/home/Brett/cvs/maven-2/maven-components/maven-plugins/maven-eclipse-plugin/src/test/repository/maven/jars/maven-core-2.0-SNAPSHOT.jar"/>
</classpath>

View File

@ -0,0 +1,8 @@
*~
*.log
target
*.ipr
*.iws
*.iml
.classpath
.project

View File

@ -0,0 +1,14 @@
<projectDescription>
<name>maven-eclipse-plugin-test-project-1</name>
<comment/>
<projects/>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments/>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,6 @@
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="output" path="target/classes"/>
<classpathentry kind="var" rootpath="JRE_SRCROOT" path="JRE_LIB" sourcepath="JRE_SRC"/>
<classpathentry kind="lib" path="#ArtifactRepositoryPath#/maven/jars/maven-core-2.0-SNAPSHOT.jar"/>
</classpath>

View File

@ -0,0 +1,14 @@
<projectDescription>
<name>maven-eclipse-plugin-test-project-1</name>
<comment/>
<projects/>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments/>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>eclipse</groupId>
<artifactId>maven-eclipse-plugin-test-project-1</artifactId>
<version>99.0</version>
<name>Maven</name>
<dependencies>
<dependency>
<groupId>maven</groupId>
<artifactId>maven-core</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,7 @@
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
* @version $Id$
*/
public class DummyClass
{
}

View File

@ -0,0 +1,9 @@
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/resources"/>
<classpathentry kind="src" path="src/test/java" output="target/test-classes"/>
<classpathentry kind="src" path="src/test/resources" output="target/test-classes"/>
<classpathentry kind="output" path="target/classes"/>
<classpathentry kind="var" rootpath="JRE_SRCROOT" path="JRE_LIB" sourcepath="JRE_SRC"/>
<classpathentry kind="lib" path="c:/home/Brett/cvs/maven-2/maven-components/maven-plugins/maven-eclipse-plugin/src/test/repository/junit/jars/junit-2.0.jar"/>
</classpath>

View File

@ -0,0 +1,8 @@
*~
*.log
target
*.ipr
*.iws
*.iml
.classpath
.project

View File

@ -0,0 +1,14 @@
<projectDescription>
<name>maven-eclipse-plugin-test-project-2</name>
<comment/>
<projects/>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments/>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,9 @@
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/resources"/>
<classpathentry kind="src" path="src/test/java" output="target/test-classes"/>
<classpathentry kind="src" path="src/test/resources" output="target/test-classes"/>
<classpathentry kind="output" path="target/classes"/>
<classpathentry kind="var" rootpath="JRE_SRCROOT" path="JRE_LIB" sourcepath="JRE_SRC"/>
<classpathentry kind="lib" path="#ArtifactRepositoryPath#/junit/jars/junit-2.0.jar"/>
</classpath>

View File

@ -0,0 +1,14 @@
<projectDescription>
<name>maven-eclipse-plugin-test-project-2</name>
<comment/>
<projects/>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments/>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>eclipse</groupId>
<artifactId>maven-eclipse-plugin-test-project-2</artifactId>
<version>88.0</version>
<name>Maven</name>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,7 @@
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
* @version $Id$
*/
public class DummyClass
{
}

View File

@ -0,0 +1,7 @@
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
* @version $Id$
*/
public class DummyClass
{
}

View File

@ -0,0 +1,80 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>classworlds</groupId>
<artifactId>classworlds</artifactId>
<name>classworlds</name>
<version>1.1-SNAPSHOT</version>
<organization>
<name>The Codehaus</name>
<url>http://codehaus.org/</url>
<logo>http://codehaus.org/codehaus-small.gif</logo>
</organization>
<inceptionYear>2002</inceptionYear>
<package>org.codehaus.classworlds</package>
<shortDescription>classworlds: Java(tm) ClassLoader Management Framework</shortDescription>
<logo>http://images.werken.com/classworlds.gif</logo>
<description>
</description>
<url>http://classworlds.codehaus.org/</url>
<siteAddress>classworlds.codehaus.org</siteAddress>
<siteDirectory>/www/classworlds.codehaus.org</siteDirectory>
<mailingLists>
<mailingList>
<name>classworlds users</name>
<archive>http://lists.codehaus.org/pipermail/classworlds-user/</archive>
<subscribe>http://lists.codehaus.org/mailman/listinfo/classworlds-user</subscribe>
<unsubscribe>http://lists.codehaus.org/mailman/listinfo/classworlds-user</unsubscribe>
</mailingList>
<mailingList>
<name>classworlds developers</name>
<archive>http://lists.codehaus.org/pipermail/classworlds-dev/</archive>
<subscribe>http://lists.codehaus.org/mailman/listinfo/classworlds-dev</subscribe>
<unsubscribe>http://lists.codehaus.org/mailman/listinfo/classworlds-dev</unsubscribe>
</mailingList>
<mailingList>
<name>classworlds commit messages</name>
<archive>http://lists.codehaus.org/pipermail/classworlds-scm/</archive>
<subscribe>http://lists.codehaus.org/mailman/listinfo/classworlds-scm</subscribe>
<unsubscribe>http://lists.codehaus.org/mailman/listinfo/classworlds-scm</unsubscribe>
</mailingList>
</mailingLists>
<repository>
<connection>scm:cvs:pserver:anonymous@cvs.codehaus.org:/scm/cvspublic/:classworlds</connection>
<url>http://cvs.classworlds.codehaus.org/</url>
</repository>
<developers>
<developer>
<name>bob mcwhirter</name>
<id>bob</id>
<email>bob@werken.com</email>
<organization>The Werken Company</organization>
<roles>
<role>Founder</role>
</roles>
</developer>
<developer>
<name>Jason van Zyl</name>
<id>jvanzyl</id>
<email>jason@zenplex.com</email>
<organization>Zenplex</organization>
<roles>
<role>Developer</role>
</roles>
</developer>
<developer>
<name>Ben Walding</name>
<id>bwalding</id>
<email>ben@walding.com</email>
<organization>Walding Consulting Services</organization>
<roles>
<role>Developer</role>
</roles>
</developer>
</developers>
</project>

View File

@ -0,0 +1,6 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.0-beta-2</version>
</project>

View File

@ -0,0 +1,7 @@
<model>
<modelVersion>4.0.0</modelVersion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<packaging>jar</packaging>
<version>2.0</version>
</model>

View File

@ -0,0 +1,11 @@
<project>
<parent>
<artifactId>maven-component</artifactId>
<groupId>maven</groupId>
<version>2.0-SNAPSHOT</version>
</parent>
<groupId>maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>2.0-SNAPSHOT</version>
<name>Maven Artifact</name>
</project>

View File

@ -0,0 +1,29 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven</groupId>
<artifactId>maven-component</artifactId>
<version>2.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>plexus</groupId>
<artifactId>plexus-container-default</artifactId>
<version>1.0-alpha-2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>plexus</groupId>
<artifactId>plexus-container-artifact</artifactId>
<version>1.0-alpha-2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>classworlds</groupId>
<artifactId>classworlds</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,6 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven</groupId>
<artifactId>maven-core</artifactId>
<version>2.0-SNAPSHOT</version>
</project>

View File

@ -0,0 +1,11 @@
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>maven</groupId>
<artifactId>maven-component</artifactId>
<version>2.0-SNAPSHOT</version>
</parent>
<groupId>maven</groupId>
<artifactId>maven-model</artifactId>
<version>2.0-SNAPSHOT</version>
</project>

View File

@ -0,0 +1,24 @@
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>plexus</groupId>
<artifactId>plexus-root</artifactId>
<version>1.0</version>
</parent>
<groupId>plexus</groupId>
<artifactId>plexus-components</artifactId>
<version>1.0</version>
<name>Plexus Components Parent Project</name>
<dependencies>
<dependency>
<groupId>plexus</groupId>
<artifactId>plexus-container-default</artifactId>
<version>1.0-alpha-1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>1.0-alpha-1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,32 @@
<?xml version="1.0"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>plexus</groupId>
<artifactId>plexus-containers</artifactId>
<version>1.0</version>
</parent>
<groupId>plexus</groupId>
<artifactId>plexus-container-artifact</artifactId>
<version>1.0-alpha-2-SNAPSHOT</version>
<name>Plexus Artifact-Enabled Container</name>
<dependencies>
<dependency>
<groupId>plexus</groupId>
<artifactId>plexus-container-default</artifactId>
<version>1.0-alpha-2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
<!--
<dependency>
<groupId>maven</groupId>
<artifactId>wagon-api</artifactId>
<version>1.0-alpha-1-SNAPSHOT</version>
</dependency>
-->
</dependencies>
</project>

View File

@ -0,0 +1,21 @@
<?xml version="1.0"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>plexus</groupId>
<artifactId>plexus-root</artifactId>
<version>1.0</version>
</parent>
<groupId>plexus</groupId>
<artifactId>plexus-containers</artifactId>
<name>Parent Plexus Container POM</name>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>1.0-alpha-1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,12 @@
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>plexus</groupId>
<artifactId>plexus-components</artifactId>
<version>1.0</version>
</parent>
<groupId>plexus</groupId>
<artifactId>plexus-i18n</artifactId>
<version>1.0-beta-3</version>
<name>Plexus I18N Component</name>
</project>

View File

@ -0,0 +1,135 @@
<?xml version="1.0"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>plexus</groupId>
<artifactId>plexus-root</artifactId>
<name>plexus</name>
<version>1.0</version>
<organization>
<name>Codehaus</name>
<url>http://www.codehaus.org/</url>
<logo>/images/codehaus-small.gif</logo>
</organization>
<inceptionYear>2001</inceptionYear>
<package>org.codehaus.plexus</package>
<logo>/images/plexus-logo.gif</logo>
<mailingLists>
<mailingList>
<name>Plexus Developer List</name>
<subscribe>http://lists.codehaus.org/mailman/listinfo/plexus-dev</subscribe>
<unsubscribe>http://lists.codehaus.org/mailman/listinfo/plexus-dev</unsubscribe>
<archive>http://lists.codehaus.org/pipermail/plexus-dev/</archive>
</mailingList>
</mailingLists>
<ciManagement>
<nagEmailAddress>dev@plexus.codehaus.org</nagEmailAddress>
</ciManagement>
<scm>
<connection>scm:cvs:pserver:anonymous@cvs.plexus.codehaus.org:/scm/plexus:plexus</connection>
<developerConnection>scm:cvs:ext:${maven.username}@cvs.plexus.codehaus.org:/scm/plexus:plexus</developerConnection>
</scm>
<developers>
<developer>
<name>Jason van Zyl</name>
<id>jvanzyl</id>
<email>jason@zenplex.com</email>
<organization>Zenplex</organization>
<roles>
<role>Developer</role>
<role>Release Manager</role>
</roles>
</developer>
<developer>
<name>Pete Kazmier</name>
<id>kaz</id>
<email></email>
<organization></organization>
<roles>
<role>Developer</role>
</roles>
</developer>
<developer>
<name>James Taylor</name>
<id>jtaylor</id>
<email>james@jamestaylor.org</email>
<organization></organization>
<roles>
<role>Developer</role>
</roles>
</developer>
<developer>
<name>Dan Diephouse</name>
<id>dandiep</id>
<email>dan@envoisolutions.com</email>
<organization>Envoi solutions</organization>
<roles>
<role>Developer</role>
</roles>
</developer>
<developer>
<name>Kasper Nielsen</name>
<id>kasper</id>
<email>apache@kav.dk</email>
<organization></organization>
<roles>
<role>Developer</role>
</roles>
</developer>
<developer>
<name>Ben Walding</name>
<id>bwalding</id>
<email>bwalding@codehaus.org</email>
<organization>Walding Consulting Services</organization>
<roles>
<role>Developer</role>
</roles>
</developer>
<developer>
<name>Mark Wilkinson</name>
<id>mhw</id>
<email>mhw@kremvax.net</email>
<roles>
<role>Developer</role>
</roles>
</developer>
<developer>
<name>Michal Maczka</name>
<id>michal</id>
<email>mmaczka@interia.pl</email>
<roles>
<role>Developer</role>
</roles>
</developer>
<developer>
<name>Emmanuel Venisse</name>
<id>evenisse</id>
<email>evenisse@codehaus.org</email>
<roles>
<role>Developer</role>
</roles>
</developer>
</developers>
<!--
|
| These are project wide default for Plexus as a whole. For
| artifacts that are used universally, say junit or classworlds,
| we want to define these once and only once if possible.
|
-->
<dependencies>
<dependency>
<groupId>classworlds</groupId>
<artifactId>classworlds</artifactId>
<version>1.1-alpha-1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<type>test</type>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,8 @@
*~
*.log
target
*.ipr
*.iws
*.iml
.classpath
.project