Simone Giannecchini a écrit :
Project ID: unknown
POM Location: C:\work\gt-2.3.x\module\pom.xml

Reason: Parse error reading POM. Reason: only whitespace content allowed before
start tag and not \uef (position: START_DOCUMENT seen \uef... @1:1)

The pom.xml file has probably been edited with notepad on windows. When a UTF-8 XML file contains accents ("é", etc.), notpad automatically add some header byte telling that this file is UTF-8. This is very annoying and I'm not aware of any way to get ride of that with notepad.

Run the small attached Java program on your pom.xml file in order to clean it.

        Martin
import java.io.*;

public class CleanForNotpad {
    private static final String HEADER = "\u00ef\u00bb\u00bf";

    public static void main(final String[] args) throws IOException {
        for (int i=0; i<args.length; i++) {
            final String filename = args[0];
            final BufferedReader in = new BufferedReader(new 
FileReader(filename));
            String line = in.readLine();
            if (line != null && line.startsWith(HEADER)) {
                line = line.substring(HEADER.length());
                final StringBuilder buffer = new StringBuilder();
                final String lineSeparator = 
System.getProperty("line.separator");
                do {
                    buffer.append(line);
                    buffer.append(lineSeparator);
                    line = in.readLine();
                } while (line != null);
                final Writer out = new FileWriter(filename);
                out.write(buffer.toString());
                out.close();
            }
            in.close();
        }
    }
}
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to