How to create a dependency

14 views
Skip to first unread message

Pierre TEISSONNIERE

unread,
Sep 20, 2016, 8:54:43 AM9/20/16
to Silverpeas-Dev
Hi,

I'd like to develop a custom trigger for the process manager. Do you have some docs on how to create a custom package in Netbeans and how to setup a repository to host the compiled version ? What is the best way to do it ? Define it as a dependency ?

Thanks,
Pierre

Miguel Moquillon

unread,
Sep 27, 2016, 2:55:00 AM9/27/16
to Silverpeas-Dev
Hi,

Hum ... those are several interleaved questions.
  • First you want to define a custom trigger for the process manager and you are asking for how to do it according to the development rules in Silverpeas, aren't you?
    To answer you, the best way to do it is to create a new custom library that depends on Silverpeas Core lib (the interface from which are extended the triggers is actually provided by Silverpeas Core)
  • In order to be downloaded by the Silverpeas installation process, the library has to be deployed into a Maven repository that is accessible to your network. Remote Maven repositories are usually hosted by a service named Maven Repository Manager and it exists 3 of them (Silverpeas uses Sonatype Nexus):
  • Once you have a Maven Repository Manager of your own, you can create within it a mirror of the Silverpeas Maven repositories that you use and then a repository for your own artifacts.
  • To create your new project with Netbeans, select the new project > maven from the IDE's menu.
  • Then edit the pom.xml to add:
    •  The distributionManagement, the repositories, and the pluginRepositories sections that refer your remote repositories hosted in the Maven Repository Manager of your own. The distributionManager is to indicate where to deploy the artifact built by the project, the repositories and pluginRepositories are to indicate from where are downloaded the dependencies.
    • The dependencies section in which is specified Silverpeas Core lib.
    • Any other useful information about your project; you can use the POM of Silverpeas Parent as well the POM of an existing Silverpeas Component project as an example of what to add.
  • Don't forget to edit your .m2/settings.xml by referring the credentials of the server required to deploy any artifacts into your remote Maven repositories. Some information about it can be found in the Apache Maven Website.
Regards,

Miguel
Reply all
Reply to author
Forward
0 new messages