Strange.  I just found 2 issues.

First, I found info on the web that said I need to add to my pom:'

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
          <configuration>
            <source>1.5</source>
            <target>1.5</target>
         </configuration>
     </plugin>
 
Once I did that, maven then told me a different error, which was actually
something broken in my code (a bad import statement).

Once I fixed the import, it worked like a charm.

Now I wonder 
1.  why eclipse didn't find this import issue.
2.  why did the pom work without the specified jdk
3.  why was maven working last week with the error in the code.

I suspect that somehow the error got by eclipse and maven somehow used the
eclipse compiled class instead of cleaning up the old classes and
recopmpiling (which would have revealed the error).
Lastly, the 1.5 dependant code in a different class than the one with an
error, so maybe it also use an eclipse generated class?  

hmmm.  strange.

If I can replicate it or if it resurfaces, I will post more info


adingfelder wrote:
> 
> I'm getting a compile error from within maven, when It hits the following
> code
> 
> enum OperatingSystems {
>       windows, unix, linux, macintosh
>   }
> 
> the error is  ';' expected 
> (after the opening bracket)
> 
> I seem to remember this one time when it was using jdk 1.4 instead of 1.5
> 
> I can not seem to find a place where 1.4 is set in my project settings
> I specifically set jdk complientce for the workspace itself to 5.0 and am
> not overriding any projects.
> 
> my classpath variable for jre_lib is set to 1.5.0_07
> 
> Where else could it be going wrong? 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/compile-error-%28wrong-jdk-%29-tf3133268.html#a8683833
Sent from the Maven Eclipse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to