I discovered that there was a filter which had a method that was like
StringBuffer.append(StringBuffer) (API only available in 1.4 and above) .  I
looked at the generated bytecode and confirmed it. Same code when I compiled
using JDK 1.3 it used StringBuffer.append(Object).

I used the setting suggested by SIMON as below

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-compiler-plugin</artifactId>

<configuration>

<fork>true</fork>

<source>1.3</source>

<target>1.3</target>

<compilerArguments>

<bootclasspath>C:/Program
Files/IBM/Rational/SDP/6.0/runtimes/base_v5/java/jre/lib/rt.jar</
bootclasspath>

</compilerArguments>

<verbose>true</verbose>

</configuration>

<inherited>true</inherited>

</plugin>
Now when I run mvn -X clean install, I get the following error


Compiling 110 source files to
c:\rad6\security\kpusersecurityutil\target\classes
[INFO]
----------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
----------------------------------------------------------------------------
[INFO] Compilation failure

Failure executing javac,  but could not parse the error:


[INFO]
----------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.BuildFailureException: Compilation failure
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java
:551)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
(DefaultLifecycleE
xecutor.java:472)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
DefaultLifecycleExecutor.java:
451)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecy
cleExecutor.java:303)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments
(DefaultLifecycleExecut
or.java:270)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
DefaultLifecycleExecutor.java:139)

        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:85)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:58)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:60)
        at java.lang.reflect.Method.invoke(Method.java:391)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation
failure
        at org.apache.maven.plugin.AbstractCompilerMojo.execute(
AbstractCompilerMojo.java:429)
        at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java
:110)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
DefaultPluginManager.java:432)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java
:530)
        ... 17 more
[INFO]
----------------------------------------------------------------------------
[INFO] Total time: 8 seconds
[INFO] Finished at: Fri Mar 10 18:25:17 PST 2006
[INFO] Final Memory: 6M/19M
[INFO]
----------------------------------------------------------------------------

It will be nice if someone can help me out with this


Thanks,
Sanjay

On 3/10/06, Simon Kitching <[EMAIL PROTECTED]> wrote:
>
> On Fri, 2006-03-10 at 16:30 -0600, Wayne Fay wrote:
> > I have a solution... Everyone should just use JDK 1.5. ;-)
> >
> > PS Sanjay, you can find out what version a given class was compiled if
> > you look at the unsigned short integers starting at byte offset 4,
> > right after 0xCAFEBABE in every class file. See this Javaworld article
> > for more details, page 2:
> > http://www.javaworld.com/javaqa/2003-05/02-qa-0523-version.html
>
> An easier way to find the classfile version is to run
>
> javap -classpath {jarfile} -verbose {classname}
>
> eg
> javap -verbose java.lang.String
>
> For javap v1.4 or later the output includes:
> ...
> minor version: 0
> major version: 49
> ...
>
> These versions mean this particular String can only be run with java 1.5
> or later. I did see an official document somewhere that listed the
> actual versions (the vm spec?) but this doc has enough info:
> http://alumnus.caltech.edu/~leif/opensource/bcver/BcVerApp.html
>
>
> Cheers,
>
> Simon
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to