Comment #2 on issue 149 by damian.ryan: maven-protoc-plugin fails during
multi-project compile
http://code.google.com/p/protobuf/issues/detail?id=149
I have encountered exactly the same issue having just converted a set of
previously
separate project builds into multi-module maven build.
One of the child modules invokes protoc during the generate-sources
lifecycle phase.
This module depends on other (peer) child modules within the multi-module
build.
There was never an issue over several months' use when performing
single-module
builds of this module, nor is there now if the module is built in isolation.
However, if a goal below the package lifecycle phase is executed on a
multi-module
build (for example: mvn clean test on the aggregator/parent POM), the build
fails
complaining that the classes directory of a completely different module is
not a file:
[DEBUG] Configuring mojo
'com.google.protobuf.tools:maven-protoc-plugin:0.0.1:compile' -->
[DEBUG] (f) outputDirectory =
C:\dev\code\code-trunk\libraries\domain-objects\target\generated-sources\protoc
[DEBUG] (f) project = MavenProject:
com.ubs.etdet.skore:domain-objects:0.6.0-SNAPSHOT @
C:\dev\code\code-trunk\libraries\domain-objects\pom.xml
[DEBUG] (f) protoSourceRoot =
C:\dev\code\code-trunk\libraries\domain-objects\src\main\proto
[DEBUG] (f) protocExecutable =
C:\dev\code\code-trunk\libraries\domain-objects/bin/protoc.exe
[DEBUG] (f) temporaryProtoFileDirectory =
c:\DOCUME~1\damianr\LOCALS~1\Temp\maven-protoc
[DEBUG] -- end configuration --
[INFO] [protoc:compile {execution: generate-sources}]
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Protoc failed to execute because:
C:\dev\code\code-trunk\libraries\utils\target\classes is not a file
[INFO]
------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.BuildFailureException: Protoc failed to execute because:
C:\dev\code\code-trunk\libraries\utils\target\classes is not a file
However, if any goal bound to a phase of package or later is executed (for
example:
package, install, deploy or release), the build succeeds.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups "Protocol
Buffers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/protobuf?hl=en.