<commit_before>package org.apache.maven.plugin.eclipse;

/*
 * Copyright 2001-2005 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import java.io.File;
import java.text.MessageFormat;

import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;

/**
 * A Maven2 plugin to delete the .project, .classpath and .wtpmodules files needed for Eclipse.
 *
 * @goal clean
 */
public class EclipseCleanMojo
    extends AbstractMojo
{
    /**
     * @parameter expression="${project.basedir}"
     */
    private File basedir;

    public void execute()
        throws MojoExecutionException
    {
        delete( new File( basedir, ".project" ) );
        delete( new File( basedir, ".classpath" ) );
        delete( new File( basedir, ".wtpmodules" ) );
    }

    /**
     * Delete a file, handling log messages and exceptions
     * @param f File to be deleted
     * @throws MojoExecutionException only if a file exists and can't be deleted
     */
    private void delete( File f )
        throws MojoExecutionException
    {
        getLog().info( MessageFormat.format( "Deleting {0} file...", new Object[] { f.getName() } ) );

        if ( f.exists() )
        {
            if ( !f.delete() )
            {
                throw new MojoExecutionException( MessageFormat.format( "Failed to delete {0} file: {0}", new Object[] {
                    f.getName(),<commit_msg>PR: MNG-1093 Submitted by: <NAME> use the more standard basedir notation<commit_after>package org.apache.maven.plugin.eclipse;

/*
 * Copyright 2001-2005 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import java.io.File;
import java.text.MessageFormat;

import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;

/**
 * A Maven2 plugin to delete the .project, .classpath and .wtpmodules files needed for Eclipse.
 *
 * @goal clean
 */
public class EclipseCleanMojo
    extends AbstractMojo
{
    /**
     * @parameter expression="${basedir}"
     */
    private File basedir;

    public void execute()
        throws MojoExecutionException
    {
        delete( new File( basedir, ".project" ) );
        delete( new File( basedir, ".classpath" ) );
        delete( new File( basedir, ".wtpmodules" ) );
    }

    /**
     * Delete a file, handling log messages and exceptions
     * @param f File to be deleted
     * @throws MojoExecutionException only if a file exists and can't be deleted
     */
    private void delete( File f )
        throws MojoExecutionException
    {
        getLog().info( MessageFormat.format( "Deleting {0} file...", new Object[] { f.getName() } ) );

        if ( f.exists() )
        {
            if ( !f.delete() )
            {
                throw new MojoExecutionException( MessageFormat.format( "Failed to delete {0} file: {0}", new Object[] {
                    f.getName(),
{'fraction_non_alphanumeric': 0.10073029463611181, 'fraction_numerical': 0.009065726517250064, 'mean_word_length': 2.7649289099526064, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6545508', 'n_tokens_mistral': 1099, 'n_tokens_neox': 1057, 'n_words': 403}