AnsweredAssumed Answered

AMP/AMP model dependency

Question asked by stephenl on Jul 8, 2016
Latest reply on Jul 12, 2016 by stephenl
Hi,

I'm just wondering if there's a way to have two AMPs and have a custom model in one dependent on a custom model in another? Using Eclipse I have previously built my root amp and have it sat in a dependency folder when I build and deploy my child AMP:


<build>
        <plugins>
            <plugin>
          <groupId>org.alfresco.maven.plugin</groupId>
          <artifactId>alfresco-maven-plugin</artifactId>
         
          <extensions>true</extensions>
          <executions>
             <execution>
               <id>install-amps</id>
               <goals>
                   <goal>install</goal>
               </goals>
               <phase>package</phase>
             </execution>
          </executions>
          <configuration>
            <ampLocation>libs</ampLocation>
          </configuration>
        </plugin>


This all seems to work fine for the availability of the webscripts in the root AMP (at run-time) but not for referring to the root model even though it is declared as imported in the child model:


<imports>
  <!– Import Alfresco Dictionary Definitions –>
  <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
  <!– Import Alfresco Content Domain Model Definitions –>
  <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
 
<import uri="http://someurl/othercomponent/content/1.0" prefix="rootmodel" />
</imports>


But I always get errors stating that rootmodel cannot be found.

Edit:Basically, what I'm aiming for is the ability to derive a child custom content type from one defined in the root AMP's custom content model.


Thanks a lot.

Outcomes