Eric-Shi / protobuf-java-format

Automatically exported from code.google.com/p/protobuf-java-format
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Target Java 1.5 instead of 1.6 #34

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.include the current 1.2 module as a build dependency for a java 1.5 jar
2.compile

What is the expected output? 
no complaints and a working build

What do you see instead?
/WorkSpace/p4/modules/serve/main/data-transform/src/main/java/com/comp/data/tran
sform/protocolbuffer/ProtocolBufferToJsonTransformer.java:[5,-1] cannot access 
com.googlecode.protobuf.format.JsonFormat
bad class file: 
/media/WorkSpace/repo/com/googlecode/protobuf-java-format/protobuf-java-format/1
.2/protobuf-java-format-1.2.jar(com/googlecode/protobuf/format/JsonFormat.class)
class file has wrong version 50.0, should be 49.0

What version of the product are you using? On what operating system?
1.2, Linux, Java 1.5

Please provide any additional information below.
I was able to fix this by rebuilding the jar with the following changes to the 
pom.xml file.  No code changes were required.

 <plugins>
   <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
     <source>1.5</source>
     <target>1.5</target>
    </configuration>
   </plugin>
 </plugins>

Original issue reported on code.google.com by kut...@gmail.com on 27 Jun 2011 at 4:05