You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by janszm <me...@jansz.com> on 2009/06/04 19:57:45 UTC

maven-plugin-api com.thoughtworks.qdox.parser.ParseException: syntax error

I am trying to write a maven plugin as per

http://maven.apache.org/guides/plugin/guide-java-plugin-development.html

When I compile my plugin I get the following error:

com.thoughtworks.qdox.parser.ParseException: syntax error @[38,33] in
file:/C:/work/schema-tools/src/main/java/org/w3/_2001/xmlschema/DerivationControl.java

The file is basically a JAXB generated file and the parser seems to complain
about the @XmlEnumValue("substitution") tag.

Anyone have any ideas why this occurs? I have tried various versions of the
maven-plugin-api
The full file contents (minus comments) are:

@XmlType(name = "derivationControl")
@XmlEnum
public enum DerivationControl {

    @XmlEnumValue("substitution")
    SUBSTITUTION("substitution"),
    @XmlEnumValue("extension")
    EXTENSION("extension"),
    @XmlEnumValue("restriction")
    RESTRICTION("restriction"),
    @XmlEnumValue("list")
    LIST("list"),
    @XmlEnumValue("union")
    UNION("union");
    private final String value;

    DerivationControl(String v) {
        value = v;
    }

    public String value() {
        return value;
    }

    public static DerivationControl fromValue(String v) {
        for (DerivationControl c: DerivationControl.values()) {
            if (c.value.equals(v)) {
                return c;
            }
        }
        throw new IllegalArgumentException(v);
    }
}

Help appreciated,
Menno


-- 
View this message in context: http://www.nabble.com/maven-plugin-api-com.thoughtworks.qdox.parser.ParseException%3A-syntax-error-tp23874877p23874877.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven-plugin-api com.thoughtworks.qdox.parser.ParseException: syntax error

Posted by Kaeptenblaubaer <mi...@hamburg.de>.
Hi

I m also facing the same issue . Where you able to solve your issue?

-- 
View this message in context: http://old.nabble.com/maven-plugin-api-com.thoughtworks.qdox.parser.ParseException%3A-syntax-error-tp23874877p28612065.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven-plugin-api com.thoughtworks.qdox.parser.ParseException: syntax error

Posted by binums <ms...@gmail.com>.
Hi

I m also facing the same issue . Where you able to solve your issue?

Binu

janszm wrote:
> 
> I am trying to write a maven plugin as per
> 
> http://maven.apache.org/guides/plugin/guide-java-plugin-development.html
> 
> When I compile my plugin I get the following error:
> 
> com.thoughtworks.qdox.parser.ParseException: syntax error @[38,33] in
> file:/C:/work/schema-tools/src/main/java/org/w3/_2001/xmlschema/DerivationControl.java
> 
> The file is basically a JAXB generated file and the parser seems to
> complain about the @XmlEnumValue("substitution") tag.
> 
> Anyone have any ideas why this occurs? I have tried various versions of
> the maven-plugin-api
> The full file contents (minus comments) are:
> 
> @XmlType(name = "derivationControl")
> @XmlEnum
> public enum DerivationControl {
> 
>     @XmlEnumValue("substitution")
>     SUBSTITUTION("substitution"),
>     @XmlEnumValue("extension")
>     EXTENSION("extension"),
>     @XmlEnumValue("restriction")
>     RESTRICTION("restriction"),
>     @XmlEnumValue("list")
>     LIST("list"),
>     @XmlEnumValue("union")
>     UNION("union");
>     private final String value;
> 
>     DerivationControl(String v) {
>         value = v;
>     }
> 
>     public String value() {
>         return value;
>     }
> 
>     public static DerivationControl fromValue(String v) {
>         for (DerivationControl c: DerivationControl.values()) {
>             if (c.value.equals(v)) {
>                 return c;
>             }
>         }
>         throw new IllegalArgumentException(v);
>     }
> }
> 
> Help appreciated,
> Menno
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/maven-plugin-api-com.thoughtworks.qdox.parser.ParseException%3A-syntax-error-tp23874877p26731409.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org