views:

44

answers:

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 compaile 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>
+5  A: 

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 :

Colin Hebert
Thank you!!! It work!!!
Victoria
A: 

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