cancel
Showing results for 
Search instead for 
Did you mean: 

Module depends on another one

dreambitc
Champ in-the-making
Champ in-the-making
Hi all!

I have two maven projects, each of them represents alfresco module. Let's call first one Core-module and another one Workflow-module for example. Both modules are packaged to amp.
The first one contains a couple of abstract Java classes which i wanna use in Workflow-module, extend them etc.
I add core-module as dependency to workflow-module and set dependency type amp, but when i trying to build workflow-module maven(java compiler) does not see classes in core and i have compilation error.
When i don't specify dependency type (jar as default) i also have an error because of maven looking for jar dependency which does not exist.


    <dependency>
        <groupId>core</groupId>
        <artifactId>core</artifactId>
        <version>1.0-SNAPSHOT</version>
        <scope>provided</scope>
        <type>amp</type>
    </dependency>


Does anyone have an idea how to resolve this problem?
Thx!

3 REPLIES 3

afaust
Legendary Innovator
Legendary Innovator
Hello,

you must make sure that the core module also provides a JAR artifact accompanying the AMP artifact, so the workflow module can depend on that JAR for the Java classes. Are you using the Alfresco Maven SDK (and which version)? I remember that earlier versions definitely had a short-comming in not providing the JAR artifact by default, e.g. you needed to modify the POM to do this. I'd expect the newer versions to handle this better but have not tried them in quite a while…

Regards
Axel

dreambitc
Champ in-the-making
Champ in-the-making
Hello Axel, thanks for your reply.
I'm using Alfresco Maven SDK version 1.1.1
Could you tell me how should i modify the POM file to provide also a JAR artifact?
All setting i have in Core POM are alfresco sdk parent and packaging type (AMP).
Thanks.

dreambitc
Champ in-the-making
Champ in-the-making