Ah yes, I didn't thought of that option. It happened to me a few
times. I think it is expected behaviour, but I don't know if this is
m-c-p territory or javac (which is called from m-c-p).

Hth,

Nick Stolwijk
~Java Developer~

IPROFS BV.
Claus Sluterweg 125
2012 WS Haarlem
http://www.iprofs.nl



On Thu, Aug 19, 2010 at 6:26 PM, emerson <[email protected]> wrote:
> No eclipse was compiling to a bin folder.
> Seems that maven "thought" that the classes shouldn't be re-compiled,
> and as a result it didn't actually compiled anything.
> I re-run with the clean goal and the classes generated were 1.5 compliant.
> I tried with the latest version of the compiler plugin, and still the
> same thing.
> Would that be a bug or an expected behaviour?
>
> Regards
> Emerson
>
> On 19 August 2010 12:44, Nick Stolwijk <[email protected]> wrote:
>> Another thought, can it be that something else, ie. Eclipse, touched
>> the file in the mean time?
>>
>> Hth,
>>
>> Nick Stolwijk
>> ~Java Developer~
>>
>> IPROFS BV.
>> Claus Sluterweg 125
>> 2012 WS Haarlem
>> http://www.iprofs.nl
>>
>>
>>
>> On Thu, Aug 19, 2010 at 1:30 PM, Nick Stolwijk <[email protected]> 
>> wrote:
>>> I see you use a fairly old version of the compiler plugin (2.0.2). I
>>> have taken a look at the changelog since then, but couldn't find
>>> anything related to this. But it can't harm if you tried the newest
>>> version (2.3.1).
>>>
>>> With regards,
>>>
>>> Nick Stolwijk
>>> ~Java Developer~
>>>
>>> IPROFS BV.
>>> Claus Sluterweg 125
>>> 2012 WS Haarlem
>>> http://www.iprofs.nl
>>>
>>>
>>>
>>> On Thu, Aug 19, 2010 at 1:03 PM, emerson <[email protected]> wrote:
>>>> I'm using solaris, I created a maven app on jdk 1.6 but using the
>>>> maven-compiler-plugin to specify the target as 1.5. Here is the
>>>> snippet of my pom.xml:
>>>>
>>>>      <plugin>
>>>>        <groupId>org.apache.maven.plugins</groupId>
>>>>        <artifactId>maven-compiler-plugin</artifactId>
>>>>        <configuration>
>>>>          <source>1.5</source>
>>>>          <target>1.5</target>
>>>>        </configuration>
>>>>      </plugin>
>>>>
>>>> Although when I try to run in the solaris box I get:
>>>>
>>>> bash-2.05$ ./merchantInfoUpdate.sh
>>>> Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad
>>>> version number in .class file
>>>>        at java.lang.ClassLoader.defineClass1(Native Method)
>>>>        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>>>>        at 
>>>> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>>>>        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>>>>        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
>>>>        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>>>>        at java.security.AccessController.doPrivileged(Native Method)
>>>>        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>>>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>>>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
>>>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>>>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>>>>
>>>>
>>>> When I run the "mvn install -X" (with debug) and the compiler plugin tells 
>>>> me:
>>>>
>>>>  [DEBUG] Configuring mojo
>>>> 'org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile' -->
>>>>  [DEBUG]   (f) basedir = /home/emerson/newworkspace/java-batch-updater
>>>>  [DEBUG]   (f) buildDirectory =
>>>> /home/emerson/newworkspace/java-batch-updater/target
>>>>  [DEBUG]   (f) classpathElements =
>>>> [/home/emerson/newworkspace/java-batch-updater/target/classes,
>>>> /home/emerson/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar,
>>>> /home/emerson/.m2/repository/log4j/log4j/1.2.12/log4j-1.2.12.jar]
>>>>  [DEBUG]   (f) compileSourceRoots =
>>>> [/home/emerson/newworkspace/java-batch-updater/src/main/java]
>>>>  [DEBUG]   (f) compilerId = javac
>>>>  [DEBUG]   (f) debug = true
>>>>  [DEBUG]   (f) failOnError = true
>>>>  [DEBUG]   (f) fork = false
>>>>  [DEBUG]   (f) optimize = false
>>>>  [DEBUG]   (f) outputDirectory =
>>>> /home/emerson/newworkspace/java-batch-updater/target/classes
>>>>  [DEBUG]   (f) outputFileName = com.company.ingestion.updater-2010.01
>>>>  [DEBUG]   (f) projectArtifact =
>>>> com.yell:com.company.ingestion.updater:jar:2010.01
>>>>  [DEBUG]   (f) showDeprecation = false
>>>>  [DEBUG]   (f) showWarnings = false
>>>>  [DEBUG]   (f) source = 1.5
>>>>  [DEBUG]   (f) staleMillis = 0
>>>>  [DEBUG]   (f) target = 1.5
>>>>  [DEBUG]   (f) verbose = false
>>>>
>>>>
>>>> But then when I check:
>>>>
>>>> emer...@emerson-desktop:~/newworkspace/java-batch-updater/target/expand$
>>>> file com/yell/ingestion/updater/ListingsManager.class
>>>>
>>>> com/yell/ingestion/updater/ListingsManager.class: compiled Java class
>>>> data, version 50.0 (Java 1.6)
>>>>
>>>> Any ideas?
>>>>
>>>> Thanks
>>>> Emerson
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to