private static void removeFromDotClasspathFile( File file ) throws IOException
    {
        List<String> lines = new ArrayList<String>();
        boolean changed = false;
        boolean purgeMode = false;
        for ( String line : loadTextFile( file ) )
        {
            if ( line.trim().startsWith( "<classpathentry" ) &&
                    line.contains( "path=\"target/generated-sources/version\"" ) )
            {
                purgeMode = true;
                changed = true;
            }

            if ( !purgeMode )
            {
                lines.add( line );
            }

            if ( purgeMode && line.trim().startsWith( "</classpathentry>" ) )
            {
                purgeMode = false;
            }
        }

        if ( changed )
        {
            System.out.println( "Fixed " + file.getAbsolutePath() );
            saveTextFile( file, lines );
        }
    }