DPascalBernard / maven-alfresco-archetypes

Automatically exported from code.google.com/p/maven-alfresco-archetypes
0 stars 0 forks source link

Problem with web client dependencies on 4.2.0 #174

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When I add this 
<dependency>
        <groupId>org.alfresco</groupId>
        <artifactId>alfresco-web-client</artifactId>
</dependency>

to the pom.xml file of my amp project, I'v got an error telling that 
alfresco-web-framework-commons-4.2.0-classes.jar does not exist when updating 
dependencies. 

I've edited and remove the following line in the alfresco-web-client-4.2.0.pom 
file :
<classifier>classes</classifier>

Everythings works find then. 

Original issue reported on code.google.com by dcourtin...@gmail.com on 26 Dec 2013 at 11:19

GoogleCodeExporter commented 8 years ago
This is actually a bug in Alfresco distribution itself, which declares a 
dependency to an artifact which is not built. (It is due to the current 
situation of building Alfresco with both Ant and Maven, but you don't want to 
know...)
It is registered on Alfresco side as 
https://issues.alfresco.com/jira/browse/MNT-10118

Your workaround works, but it is not a recommended practice: anyone else trying 
to build your code will have the same problem; and even you will, if you use a 
different machine or delete your local Maven repository.
The recommended way is to exclude the unnecessary transitive dependency from 
your pom, so that it is perennial:

    <dependency>
        <groupId>org.alfresco</groupId>
        <artifactId>alfresco-web-client</artifactId>
        <exclusions>
            <exclusion>
               <groupId>org.alfresco</groupId>
               <artifactId>alfresco-web-framework-commons</artifactId>
           </exclusion>
        </exclusions>
    </dependency>

Hope this helps!

Original comment by samuel.l...@alfresco.com on 3 Jan 2014 at 3:25