PCM Development/Contributing Code To Palladio

Aus SDQ-Wiki

Creating new GitHub Projects

If you are doing a greenfield project, the simplest way is to adhere to the following steps in order to comply with the Palladio standards.

  1. Generate a project stub using the Palladio Maven Archetype.
    • Depending on the Integration Scenario, apply the appropriate Naming Schema when naming your project.
    • When not using the archetype for 'Addon' or 'Supporting' projects, please refer to our Folder Structure to setup the project.
    • A rule of thumb is that there is a separate repository for every project that has/will have an update site.
  2. Add the mandatory Default Content Artifacts.
  3. If code artifacts exist: Sort your Eclipse artifacts into the corresponding folders (see Folder Structure).
  4. Setup the Maven Build by defining the target platform and the update site in the releng folder.
    • Please note that the build infrastructure already provides a target platform including the recent modeling tools dependencies of Eclipse as well as our branding and license plugins.
    • Ensure that you either only use release repositories of Palladio or include both release and nightly dependencies using the filter keyword (you can have a look at examples on how to do this).
    • Refer to our licensing feature and our branding plugin in all your Eclipse features (see examples of existing projects).
  5. Push everything into our PalladioSimulator organization on Github.
  6. With multiple developers: Create a new Jira project to aid in development and later release.
  7. Optional: Create a build job on our build server and use other build jobs as a template.

External contributors

  1. Contact us at palladio-dev mailing list and tell us about your addon.
  2. Transfer ownership of your Github repository to our PalladioSimulator organization.
  3. Ask for creating a build job and a Jira project on our build server via the mailing list.

Code Contributions

If you want to contribute to our existing projects, you can simply do this via the usual Github workflow. This means, you simply fork the project you want to contribute to. You work on the repository as you would usually do. Finally, you create a pull request. A Palladio developer will have a look at your contribution and decides if it should be included. If not, you will get some feedback on what should be improved to comply with our coding standards.

Adding new Third Party Dependencies

There are two ways of adding a third-party dependency to Palladio. You can either configure a Maven to Eclipse conversion tool or wrap the dependency by yourself. We favor wrapping Maven plugins because this ensures that no modifications of the dependency took place (which might be important to fulfill licensing conditions) and it requires less code.

In order to wrap Maven dependencies, you can proceed like for contributing Code Contributions. You have to edit the pom.xml file in the ThirdParty library project. You can have a look at existing dependencies to identify how to add the dependency. It is crucial to add the license information in the POM file. TODO: Add link to compatible licenses.

TODO: Describe adding a dependency to ThirdPartyWrapper

Integration Scenarios

PCM Addon

PCM addons extend the PCM core or extend another existing addon. In order to improve usability, all addons should be integrated in the Palladio build process and should be shipped on the Palladio update site. This means that the addon has to provide at least one feature that can be installed. The addon typically uses existing PCM features to provide its functionality.

You have to follow the steps described in Creating a new Addon or Support Project to integrate the addon in the build process.

Supporting Projects

Supporting projects do not depend on PCM features but are used by PCM. This means that they can be used in other projects as well. Even if such projects could be maintained in other contexts, we suggest treating them like PCM addons to ensure compatibility with recent PCM releases.

You have to follow the steps described in Creating a new Addon or Support Project to integrate the project in the build process.

Code Improvements

Improvements fix bugs or introduce new features to existing PCM components. Integrating these changes does not require adjusting the build process but just contributing the code to the corresponding repository. Please refer to the description in Code Contributions.

PCM Product

Products are standalone versions of Eclipse with a pre-installed set of features. Users can use products easily by just extracting a ZIP file and running Eclipse. We integrate products in our build process in order to ensure up-to-date versions of the included features.

You have to follow the steps described in TODO: Create information and link to it to integrate the product in the build process.

Third Party Dependency

Palladio facilitates the Eclipse plugin infrastructure to manage dependencies. Unfortunately, not all required dependencies are available as Eclipse plugins. Therefore, these dependencies have to be wrapped. We favor wrapping these dependencies into Eclipse plugins rather than including them in the requiring plugin as JAR, which is also possible.

Please refer to the description in #Adding new Third Party Dependencies for some detailed instructions.