-2

This error is getting annoying. Can someone please fix what's wrong. Thanks! Whenever I try to build the file. It gives me an error saying this: "[xX][mM][lL]" is not allowed. build.xml /HealPlayer line 1 Ant Buildfile Problem and this one: Element type "xml" must be followed by either attribute specifications, ">" or "/>". build.xml /HealPlayer line 1 XML Problem

 <?xml version="1.0" encoding="UTF-8" >
<project name="HealPlayer" default="makejar" basedir=".">
    <target name="makejar" description="Create a jar for the project">
        <mkdir dir="target"></mkdir>
        <jar destfile="target/${ant.project.name}.jar">
            <fileset dir="bin"></fileset>
            <fileset file="plugin.yml"></fileset>
        </jar>
    </target>
</project>
 <?xml version="1.0" encoding="UTF-8" >
<project name="HealPlayer" default="makejar" basedir=".">
    <target name="makejar" description="Create a jar for the project">
        <mkdir dir="target"></mkdir>
        <jar destfile="target/${ant.project.name}.jar">
            <fileset dir="bin"></fileset>
            <fileset file="plugin.yml"></fileset>
        </jar>
    </target>
</project>
Erwin Bolwidt
  • 30,799
  • 15
  • 56
  • 79
Zach Free
  • 1
  • 1

2 Answers2

1

Change your first line to:

<?xml version="1.0" encoding="UTF-8"?>

Note: it needs to end in a question mark followed by a greater-than character.

You also need to make sure that the leading < is the first character in the file, i.e. no spaces in front of it.

Erwin Bolwidt
  • 30,799
  • 15
  • 56
  • 79
0

Please check the following link. This has more information about xml tag.Also follow suggestion by @Erwin Bolwidt

Error: The processing instruction target matching "[xX][mM][lL]" is not allowed

Community
  • 1
  • 1
KPJAVA
  • 70
  • 4