cancel
Showing results for 
Search instead for 
Did you mean: 

Best practice for applying multiple amps to single share

dbiggins
Star Contributor
Star Contributor
We have several distinct projects that we would like to host in a share instance, and are approaching it by creating seperate *-repo.amp and *-share.amp for each projects objects.  These may contain objects, aspects, workflows and their forms, etc…, but all the repository objects for one project will be in its repo amp, and all the neccesary share objects will be in that projects share amp.

I am running into situations where some share customizations are not showing up, specifically things in the share-config-custom.xml files, like:

<config evaluator="string-compare" condition="DocumentLibrary">
  <aspects>
    <visible>
      <aspect name="test:emailMessage" />
      <aspect name="test:metadatadiscovery" />
    </visible>
    <addable></addable>
    <removeable></removeable>
  </aspects>
  <types>
    <type name="cm:content">
      <subtype name="test:vehicleRequestForm" />
      <subtype name="test:document" />
    </type>
  </types>
</config>


I am under the impression that if I am packaging each of these in its own AMP, I don't have to have unique file names.  I also think that means that I don't need to customize the slingshot-context.xml to tell share which configs to load.

I am assuming that the loader is smart enough to see config elements as different in two different files like

  <config evaluator="node-type" condition="test:vehicleRequestForm">
…..
  </config>

and

  <config evaluator="node-type" condition="test:document">
…..
  </config>

because the conditions are different, but if there is an element like:

<config evaluator="string-compare" condition="DocumentLibrary">

</config>


, do I need to have a master amp that contains all shared config entries?

Ideally, I would like each project developer to be able to work on their project-specific objects without impacting other teams.

Thanks!
2 REPLIES 2

jpotts
World-Class Innovator
World-Class Innovator
Where are you putting share-config-custom.xml in your AMPs?

Jeff

dbiggins
Star Contributor
Star Contributor
Jeff,
In my eclipse project, the share-config-custom.xml is in the 'src/main/resources/META-INF' folder, and after the build it is packaged in a jar in the project amp's lib directory, so something like

project.amp -> lib -> project.jar -> META-INF -> share-config-custom.xml


Thanks!