Monday, January 14, 2013

Resolving Share extension build problems if using Maven

A few weeks ago I did a blog post where I explained how simple it is to set up Alfresco projects by using Maven. Today I tried to add some Share extensions and found out that there is an issue with it. If you use the default pom.xml build script which was created the way which I mentioned before, then you may miss some dependencies. The problem begins with the fact that Alfresco added the Share dependencies as a WAR-file dependency which can't be resolved by Eclipse's Maven plug-in. I tried out to add the libraries by hand to the Build Path, but this causes that you can build within Eclipse but no longer by using Maven. So the way how I solved it was to add some additional dependencies and repositories:

You should add the following repository (Not sure if it was already resolved by Alfresco's Maven Nexus).

<repository>

            <id>spring-surf</id>

            <url>https://extensions.springframework.org/milestone</url>

</repository> 



Then I added the following dependencies:

        <dependency>

            <groupId>org.springframework</groupId>

            <artifactId>spring-core</artifactId>

            <version>3.0.1.RELEASE</version>

        </dependency>

        <dependency>

            <groupId>org.springframework.extensions.surf</groupId>

            <artifactId>spring-webscripts</artifactId>

            <version>1.0.0.M3</version>

        </dependency>

        <dependency>

            <groupId>org.springframework.extensions.surf</groupId>

            <artifactId>spring-webscripts-api</artifactId>

            <version>1.0.0.M3</version>

        </dependency>

        <dependency>

            <groupId>javax.servlet</groupId>

            <artifactId>servlet-api</artifactId>

            <version>2.5</version>

            <scope>provided</scope>

        </dependency>

        <dependency>

            <groupId>org.springframework.extensions.surf</groupId>

            <artifactId>spring-surf</artifactId>

            <version>1.0.0</version>

        </dependency>


Now it was at least possible to build my Share extension. It may be required to add further depencies in order to have full support.

1 comment:

  1. 10cric 10cric 1xbet 1xbet 카지노 카지노 happyluke happyluke 카지노 가입 쿠폰 카지노 가입 쿠폰 planet win 365 planet win 365 fun88 soikeotot fun88 soikeotot クイーンカジノ クイーンカジノ 10cric 10cric 7

    ReplyDelete