Results 1 to 3 of 3

Thread: Project weird behaviour (dependency thing)

  1. #1

    Default Project weird behaviour (dependency thing)

    Hi,

    The Roo project I'm working on is behaving very weirdly for a few days. Everything was fine before and I can't think of an change explaining the new behaviour. Restoring to a previous commit doesn't change anything so it has somethingg to do with the environnement.

    First I have the following error: "Syntax error, annotations are only available if source level is 1.5 or greater" on all annotations.

    If I apply the quick fix "Change compliance to 1.5" and add "Maven dependencies" to web deployment assembly, I can deploy again. But I still have a red cross on the project.

    If I do Maven/update project configuration I'm back at the beginning.

    I've done a lot of manipulations (project import, repository reset...) since this morning and went into very different stages but nothing solved this very unstable situation.

    Can you help me please?

    Thank you

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,632

    Default

    Open the pom, add a build plugin (the maven-compiler-plugin) and set the correct source/target version you want to use. The default compiler setting is to use 1.4. (I would expect that Roo already added this but you might have changed it).
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3

    Default

    it is there

    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>2.3.2</version>
    <configuration>
    <source>${java.version}</source>
    <target>${java.version}</target>
    <encoding>${project.build.sourceEncoding}</encoding>
    </configuration>
    </plugin>

    But looking for the java.version value I realized that the Java compiler "Enable specific settings" was set. Unsetting it solved everything!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •