Hi,

This is my simple AVDL file:
@namespace("com.acme.networking.service")
protocol MediatorResourceService {

//    Messages
    string hello (string greetingMsg);
    void sourcesOffer();
}

However when I use acro-maven-plugin:

<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";>
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.acme</groupId>
  <artifactId>Network</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>Network</name>
  <url>http://maven.apache.org</url>

  <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <avro.version>1.7.5</avro.version>
    <jdkLevel>1.7</jdkLevel>
  </properties>

  <dependencies>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.apache.avro</groupId>
        <artifactId>avro</artifactId>
        <version>${avro.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.avro</groupId>
        <artifactId>avro-ipc</artifactId>
        <version>${avro.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.avro</groupId>
        <artifactId>avro-maven-plugin</artifactId>
        <version>${avro.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.avro</groupId>
        <artifactId>avro-compiler</artifactId>
        <version>${avro.version}</version>
    </dependency>

  </dependencies>

     <build>
        <plugins>

            <plugin>
                <groupId>org.apache.avro</groupId>
<artifactId>avro-maven-plugin</artifactId>
                <version>${avro.version}</version>
                <executions>
                    <execution>
                        <id>schemas</id>
<phase>generate-sources</phase>
                        <goals>
                            <goal>schema</goal>
                            <goal>protocol</goal>
                            <goal>idl-protocol</goal>
                        </goals>

                        <configuration>
<sourceDirectory>${project.basedir}/src/main/resources/avro</sourceDirectory>
<!-- <outputDirectory>${project.basedir}/src/main/java/</outputDirectory> -->
<fieldVisibility>PRIVATE</fieldVisibility>
                            <includes>
<include>**/*.avdl</include>
                            </includes>

</configuration>
                    </execution>
                </executions>
            </plugin>

             <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
                    <version>2.3.2</version>
                    <configuration>
                          <source>${jdkLevel}</source>
                          <target>${jdkLevel}</target>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
                    </configuration>
              </plugin>
        </plugins>
    </build>

</project>

I keep getting error:

ERROR] Failed to execute goal org.apache.avro:avro-maven-plugin:1.7.5:schema (schemas) on project Network: Execution schemas of goal org.apache.avro:avro-maven-plugin:1.7.5:schema failed: org.codehaus.jackson.JsonParseException: Unexpected character ('@' (code 64)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') [ERROR] at [Source: /home/mick/workspace/Network/src/main/resources/avro/protocol.avdl; line: 4, column: 2]
[ERROR] -> [Help 1]


Reply via email to