Friday, September 19, 2014

Maven problems in 4.2.e-f and 4.20

I you need access to some java classes in a Alfresco Maven project it might give you problems with an artifact which did not get properly inserted into the maven.alfresco.com repository. The issue is also described in various issues, among others: https://issues.alfresco.com/jira/browse/MNT-10118

I solved access to alfresco-repository, alfresco-web-framework-commons, alfresco-remote-api & alfresco-web-client 

Using these dependencies in my Alfresco repo maven pom, where the parent pom used the alfresco platform.

    <dependencies>
        <dependency>
            <groupId>${alfresco.groupId}</groupId>
            <artifactId>alfresco</artifactId>
            <type>war</type>
        </dependency>
        <dependency>
            <groupId>${alfresco.groupId}</groupId>
            <artifactId>alfresco-repository</artifactId>
            <scope>provided</scope>
             <exclusions>
                <exclusion>
                    <groupId>org.alfresco</groupId>
                    <artifactId>alfresco-web-framework-commons</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
         <dependency>
            <groupId>${alfresco.groupId}</groupId>
            <artifactId>alfresco-web-framework-commons</artifactId>
            <scope>provided</scope>
            <version>${alfresco.version}</version>
        </dependency>
       
        <dependency>
            <groupId>${alfresco.groupId}</groupId>
            <artifactId>alfresco-remote-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>${alfresco.groupId}</groupId>
            <artifactId>alfresco-web-client</artifactId>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.alfresco</groupId>
                    <artifactId>alfresco-web-framework-commons</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

No comments:

Post a Comment