I'd like to know if Alfresco could b开发者_如何学运维e used only as a framework to manage content in repository. Without all the fancy layers above.
I've tried some maven alfresco archetypes, but they are mainly aimed for creating extensions and alfresco share - I don't understand it much.
Anyway the maven support seems to be very chaotic, maybe because alfresco is not a typical opensource project. And I haven't found any developer guide that would explained how to do what I need, for instance :
including :
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-core</artifactId>
<version>3.4.a</version>
<classifier>community</classifier>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-data-model</artifactId>
<version>3.4.a</version>
<classifier>community</classifier>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-repository</artifactId>
<version>3.4.a</version>
<classifier>community</classifier>
</dependency>
And use it in the terms of JCR framework. Could please anybody help ?
Maven support for Alfresco might look chaotic because Alfresco itself is currently built as an ant
project, so that what's currently supported by the community projects you probably used are just the most common use cases -- i.e. developing an Alfresco extension, a Share extension or a "plugin" (AMP in the Alfresco jargon).
Trying to have a fully functional maven build that runs an embedded Alfresco repository in a clean way is no easy task: apart from bringing all the dependent artifacts into your classpath you'll also have to take care of, e.g., somehow bring in all the Spring contextes as well.
Have a look at the FirstJCRClient
provided by the Alfresco SDK to have an idea of what's required to do the job.
The maven archetypes are only for creating extensions -- basically overlays on top of the Alfresco Repository WAR file.
If you want to remove services, you will have to do it through configuration files, spring context files, JMX and perhaps other means. But you don't have several fine-grained maven projects that you can add and remove according to your needs. Those artifacts you mention are only for development purposes.
精彩评论