cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remijan, Michael J" <>
Subject RE: Force cxf-codegen-plugin to generate 1.6 class files
Date Fri, 30 Jan 2015 13:36:32 GMT
Below are the details of the plugin.  The cxf-codegen-plugin has the -compile option which
will compile the code.  It's this compiled code which is being generated as jdk 1.7 class
files, not jdk 1.6 class files.


-----Original Message-----
From: Aki Yoshida []
Sent: Friday, January 30, 2015 4:27 AM
Subject: Re: Force cxf-codegen-plugin to generate 1.6 class files

I don't know if I understand your setup correctly. The codegen plugin generates source files
and they have nothing to do with those cafe babe numbers. These numbers go into the class
files. So, if you are compiling the generated source files in the same build unit as the main
source files, you should be getting the same number in all those generated classes.

2015-01-29 21:44 GMT+01:00 Remijan, Michael J <>:
> Greetings,
> I have a question about the class files generated by the cxf-codegen-plugin.  I would
like to configure the plugin and force it to generate JDK 1.6 class files but haven't been
able to figure out a way to do this.  The JDK I'm using is 1.7 and my Maven build has configured
the maven-compiler-plugin with <source>1.6</source> and <target>1.6</target>.
This works great on the project source files; the resulting class files have a major version
number to 50, which is the Java 1.6 major version.  However it does NOT work when the cxf-codegen-plugin
runs.  The class files generated by cxf-codegen-plugin have a major version number of 51,
which is Java 1.7.  This make sense since that's the version of Java I'm running, but I need
the cxf-codegen-plugin to generate java 1.6 class files regardless of the Java version running
Maven.  Now keeping an eye on the machine processes during the build process, it looks like
the cxf-codegen-plugin is creating a file c:\users\[username]\AppData\Local\Temp\org.codehaus.plexus.compiler.javac.JavacCompiler440340304580348034arguments.
 This file as inside it "-target" "1.6" "-source" "1.6".  So it looks like the plugin is correctly
getting the source and target values from the maven-compiler-plugin, but at some point they
are being ignored.
> So thoughts on this?  How can I configure cxf-codegen-plugin to always generate Java
1.6 class files (major version 50) regardless of the version of Java used to run Maven?
> Thanks!
View raw message