2

I use Magnolia CMS and Blossom.
When I add annotations to my classes I get something like this:

annotations are not supported in -source 1.3 (use -source 5 or higher to enable annotations)
@Template(value="Blossom Template")*

Spring annotation(like @Controller) doesn't compile too. Where is my mistake?

My pom.xml dependencies:

<dependencies>
    <dependency>
        <groupId>info.magnolia</groupId>
        <artifactId>magnolia-module-blossom</artifactId>
        <version>1.1</version>
    </dependency>

    <dependency>
        <groupId>info.magnolia</groupId>
        <artifactId>magnolia-module-admininterface</artifactId>
        <version>4.3.5</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>info.magnolia</groupId>
        <artifactId>magnolia-taglib-cms</artifactId>
        <version>4.3.5</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>info.magnolia</groupId>
        <artifactId>magnolia-taglib-utility</artifactId>
        <version>4.3.5</version>
        <scope>provided</scope>
    </dependency>
</dependencies>
Cœur
  • 37,241
  • 25
  • 195
  • 267
Victoria Seniuk
  • 1,384
  • 3
  • 14
  • 23
  • which jdk are you using, or more specifically compiling against – Woot4Moo Aug 29 '10 at 19:09
  • possible duplicate of [setting -source to 1.5, it is set to 1.3 apparently](http://stackoverflow.com/questions/2233732/setting-source-to-1-5-it-is-set-to-1-3-apparently) – Pascal Thivent Aug 29 '10 at 23:34

2 Answers2

5

You have to change your maven.compiler properties to compile with java 1.5.

<properties>
    <!-- maven-compiler-plugin configuration -->
    <maven.compiler.source>1.5</maven.compiler.source>
    <maven.compiler.target>1.5</maven.compiler.target>
</properties>

Another way to do this (but less discreet) is this :

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>2.3.1</version>
  <configuration>
    <source>1.5</source>
    <target>1.5</target>
  </configuration>
</plugin>

Resources :

On the same topic :

Community
  • 1
  • 1
Colin Hebert
  • 91,525
  • 15
  • 160
  • 151
-2

I am happy this got answered but encourage you to use the Magnolia community, especially the mailing-list to ask questions about Magnolia in the future. This will benefit you and the community.

See http://www.magnolia-cms.com/home/community/mailing-lists.html

Thanks - Boris

Boris
  • 22
  • 1