Comment #5 on issue 152 by rktoomey: Maven Protoc Plugin fails when a jar file contains a .proto file (FileNotFoundException)
http://code.google.com/p/protobuf/issues/detail?id=152

The stupidest thing that could possibly work - edit
AbstractProtocMojo.makeProtopathFromJars method to produce a viable Windows filepath by replacing all occurrences of ":" in the classpathJarName with "_" as follows:

ImmutableSet<File> makeProtopathFromJars(
                File temporaryProtoFileDirectory, Iterable<File> 
classpathElementFiles)
                throws IOException
{
        <SNIP>
        for (JarEntry jarEntry : list(classpathJar.entries()))
        {
                final String jarEntryName = jarEntry.getName();
                if (jarEntry.getName().endsWith(PROTO_FILE_SUFFIX))
                {
String sanitizedClasspathJarName = classpathJar.getName().replace(":", "_"); final File uncompressedCopy = new File(new File(temporaryProtoFileDirectory,
sanitizedClasspathJarName), jarEntryName);
                        uncompressedCopy.getParentFile().mkdirs();
copyStreamToFile(new RawInputStreamFacade(classpathJar.getInputStream(jarEntry)),
uncompressedCopy);
                        protoDirectories.add(uncompressedCopy.getParentFile());
                }
        }
        <SNIP>
}

--
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 proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.


Reply via email to