Maven & Protobuf erreur de compilation: Impossible de trouver le symbole dans le package com.google.protobuf

Je suis nouveau sur Linux et Protobuf.. j'ai besoin d'aide.

Je suis en train de "mvn package", un projet qui contient de nombreuses ".proto" les fichiers, et un pom.xml fichier des cours...

Je travaille sur Ubuntu

=======================================

ERREUR

Quand je lance "mvn package", je reçois cette erreur:

après

...
Compiling 11 source files to .../target/classes
...

Je reçois un tas de ces erreurs:

[ERROR] .../target/generated-sources/...java:[16457,30] cannot find symbol
[ERROR] symbol  : class Parser
[ERROR] location: package com.google.protobuf
[ERROR] 
[ERROR] .../target/generated-sources/...java:[17154,37] cannot find symbol
[ERROR] symbol  : class Parser
[ERROR] location: package com.google.protobuf
[ERROR] 
[ERROR] .../target/generated-sources/...java:[17165,30] cannot find symbol
[ERROR] symbol  : class Parser
[ERROR] location: package com.google.protobuf
[ERROR] 
[ERROR] .../target/generated-sources/...java:[17909,37] cannot find symbol
[ERROR] symbol  : class Parser
[ERROR] location: package com.google.protobuf
[ERROR]

=======================================

POM

Ici est la pom.xml fichier, avec groupId & artifactId pris:

<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>*****</groupId>
<artifactId>*****</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>*****</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<proto.cas.path>${project.basedir}/src</proto.cas.path>
<target.gen.source.path>${project.basedir}/target/generated-sources</target.gen.source.path>
</properties>
<dependencies>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>2.4.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>${project.basedir}/src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<includes><include>**/commonapps/**</include></includes>
</configuration>            
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<tasks>
<mkdir dir="${target.gen.source.path}" />    
<path id="proto.path.files">
<fileset dir="${proto.cas.path}">
<include name="*.proto" />
</fileset>  
</path>
<pathconvert pathsep=" " property="proto.files" refid="proto.path.files" />
<exec executable="protoc">
<arg value="--java_out=${target.gen.source.path}" />
<arg value="--proto_path=${proto.cas.path}" />
<arg line="${proto.files}" />
</exec>
</tasks>
<sourceRoot>${target.gen.source.path}</sourceRoot>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

=======================================

PROTOBUF INSTALLATION

J'ai fait

./configure
make
make check
make install

dans protobuf/,

et

mvn test
mvn install
mvn package

dans protobuf/java.

J'ai pris le pot dans protobuf/java/cible

et de l'ajouter à mon repo maven en cours d'exécution:

mvn install:install-file -Dpackaging=jar -DgeneratePom=true  -DgroupId=com.google.protobuf   -DartifactId=protobuf-java   -Dfile=protobuf-java-2.4.1.jar -Dversion=2.4.1

Notez que j'ai foiré autour avec $LD_LIBRARY_PATH. Actuellement, quand je lance l'écho, j'obtiens:

/usr/local/lib/:/usr/:/usr/lib/:/usr/local/

ouais.... comme vous pouvez le dire je n'ai pas la moindre idée sur la configuration de $LD_LIBRARY_PATH

J'ai aussi couru:

apt-get install protobuf-compiler

=======================================

PROTOC INSTALLATION

J'ai oublié ce que j'ai fait pour faire protoc de travail, mais quand je lance

protoc --version

- Je obtenir

libprotoc 2.5.0

=======================================

MA QUESTION EST SIMILAIRE:

Problèmes à l'aide de protobufs avec java et scala

la compilation maven échec

=======================================

POSSIBLE RELAVENCE?

pas encore de trouver le paquet, après "mvn install'

http://www.scriptol.com/programming/protocol-buffers-tutorial.php

Peut aider quelqu'un?

=======================================

PROGRÈS

Apparemment c'est un plugin échec:

https://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project casprotobuf: Compilation failure: Compilation failure:
  • +1 Belle question de la composition.
InformationsquelleAutor Katie | 2013-03-14