Re: Odd Compilation Issue

2006-05-08 Thread Sean McNamara
Thanks to Wendy, Kris, and Simon for their input on this.  For anyone 
interested, here's a brief synopsis of what was happening:

It looks like under Maven v1.1, code was being compiled by default as v1.2 
using the 1.4 JVM.

After switching to Maven2, the code was being compiled as v1.1.

The JSP compiler in the application server looks like it was generating v1.2 
code, and was having trouble linking in the 1.1 resources prepared by M2.

Directing M2 to create v1.2 classes solved the problem.

As an interesting side-note, having M2 compile v1.4 classes caused the same 
issue with the JSP compiler.

Being the the error was "package could not be found," it took a bit of digging 
to find the source of the problem, but I certainly appreciate the help from you 
guys.

Thanks!

-Sean

- Original Message 
From: Wendy Smoak <[EMAIL PROTECTED]>
To: Maven Users List 
Sent: Friday, May 5, 2006 4:37:14 PM
Subject: Re: Odd Compilation Issue

On 5/5/06, Sean McNamara <[EMAIL PROTECTED]> wrote:

> After chasing my tail for the last week, I took a look at the classfiles that 
> were giving us a problem in a hex editor, and see that the actual classfiles 
> differ in terms of the major and minor numbers in the classfile.
>
> I only have a single JVM installed on this machine, so I'm pretty confident 
> the same one is being used in both compiles.
>
> Does anyone have the slightest idea how this might be possible?

Different target versions?  Were you setting 'maven.compile.source'
and 'maven.compile.target' with Maven 1.1, and/or are you configuring
the compiler plugin for Maven 2?  (Or if you're not configuring either
of them, maybe the default has changed?)

 * http://maven.apache.org/maven-1.x/plugins/java/faq.html
 * http://maven.apache.org/plugins/maven-compiler-plugin/howto.html

--
Wendy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Odd Compilation Issue

2006-05-05 Thread Simon Kitching
On Fri, 2006-05-05 at 14:20 -0700, Sean McNamara wrote:
> I'm having a VERY odd compilation problem and am at a loss for why it would 
> occur.  We're in the process of moving from Maven v1.1 to Maven 2.  We ported 
> the project.xml files over to pom.xml, and succeeded in getting the build 
> going.  Unfortunately, the new archive was failing to run.
> 
> After chasing my tail for the last week, I took a look at the classfiles that 
> were giving us a problem in a hex editor, and see that the actual classfiles 
> differ in terms of the major and minor numbers in the classfile.
> 
> I only have a single JVM installed on this machine, so I'm pretty confident 
> the same one is being used in both compiles.
> 
> Does anyone have the slightest idea how this might be possible?

Java compilers are capable of generating output in older formats.

In m2, I think the maven-compiler-plugin defaults to 
  -target 1.3
ie generates output in a format compatible with 1.3 JVMs. Different
-target options will indeed cause different major/minor numbers in the
generated .class files.

Try setting source/target to your desired values, using the syntax in
the compiler plugin docs:
  http://maven.apache.org/plugins/maven-compiler-plugin/howto.html

I don't understand why the output would "fail to run", though, as the
output cannot be newer than the JDK version you've got installed and you
say you have only one JDK on your machine.

Cheers,

Simon


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Odd Compilation Issue

2006-05-05 Thread Bravo, Kris
Correction compile version, not jar version 

-Original Message-
From: Bravo, Kris 
Sent: Friday, May 05, 2006 5:38 PM
To: Maven Users List
Subject: RE: Odd Compilation Issue

Mr. McNamara,

More information please:

- Which JVM do you have installed?
- When you say "failing to run", under the same VM on the same machine,
or on another machine with what is assumed to be the same JVM?

One hypothesis, the default version for the jar-maven-plugin is getting
in your way. Completely a guess though...

Kris

-Original Message-
From: Sean McNamara [mailto:[EMAIL PROTECTED]
Sent: Friday, May 05, 2006 5:21 PM
To: users@maven.apache.org
Subject: Odd Compilation Issue


I'm having a VERY odd compilation problem and am at a loss for why it
would occur.  We're in the process of moving from Maven v1.1 to Maven 2.
We ported the project.xml files over to pom.xml, and succeeded in
getting the build going.  Unfortunately, the new archive was failing to
run.

After chasing my tail for the last week, I took a look at the classfiles
that were giving us a problem in a hex editor, and see that the actual
classfiles differ in terms of the major and minor numbers in the
classfile.

I only have a single JVM installed on this machine, so I'm pretty
confident the same one is being used in both compiles.

Does anyone have the slightest idea how this might be possible?

Thanks.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Odd Compilation Issue

2006-05-05 Thread Bravo, Kris
Mr. McNamara,

More information please:

- Which JVM do you have installed?
- When you say "failing to run", under the same VM on the same machine,
or on another machine with what is assumed to be the same JVM?

One hypothesis, the default version for the jar-maven-plugin is getting
in your way. Completely a guess though...

Kris

-Original Message-
From: Sean McNamara [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 05, 2006 5:21 PM
To: users@maven.apache.org
Subject: Odd Compilation Issue


I'm having a VERY odd compilation problem and am at a loss for why it
would occur.  We're in the process of moving from Maven v1.1 to Maven 2.
We ported the project.xml files over to pom.xml, and succeeded in
getting the build going.  Unfortunately, the new archive was failing to
run.

After chasing my tail for the last week, I took a look at the classfiles
that were giving us a problem in a hex editor, and see that the actual
classfiles differ in terms of the major and minor numbers in the
classfile.

I only have a single JVM installed on this machine, so I'm pretty
confident the same one is being used in both compiles.

Does anyone have the slightest idea how this might be possible?

Thanks.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Odd Compilation Issue

2006-05-05 Thread Wendy Smoak

On 5/5/06, Sean McNamara <[EMAIL PROTECTED]> wrote:


After chasing my tail for the last week, I took a look at the classfiles that 
were giving us a problem in a hex editor, and see that the actual classfiles 
differ in terms of the major and minor numbers in the classfile.

I only have a single JVM installed on this machine, so I'm pretty confident the 
same one is being used in both compiles.

Does anyone have the slightest idea how this might be possible?


Different target versions?  Were you setting 'maven.compile.source'
and 'maven.compile.target' with Maven 1.1, and/or are you configuring
the compiler plugin for Maven 2?  (Or if you're not configuring either
of them, maybe the default has changed?)

* http://maven.apache.org/maven-1.x/plugins/java/faq.html
* http://maven.apache.org/plugins/maven-compiler-plugin/howto.html

--
Wendy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Odd Compilation Issue

2006-05-05 Thread Sean McNamara

I'm having a VERY odd compilation problem and am at a loss for why it would 
occur.  We're in the process of moving from Maven v1.1 to Maven 2.  We ported 
the project.xml files over to pom.xml, and succeeded in getting the build 
going.  Unfortunately, the new archive was failing to run.

After chasing my tail for the last week, I took a look at the classfiles that 
were giving us a problem in a hex editor, and see that the actual classfiles 
differ in terms of the major and minor numbers in the classfile.

I only have a single JVM installed on this machine, so I'm pretty confident the 
same one is being used in both compiles.

Does anyone have the slightest idea how this might be possible?

Thanks.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]