Skip to main content

Creating a New DPU Using IntelliJ

This section contains a short guide on how to create a DPU using the IntelliJ IDE.

  1. Open IntelliJ, create new project, select Maven.

  2. Check Create from archetype.

  3. Select the archetype with the ID as above. Click Next.

    • If such an archetype does not exist, just add it manually

      • Group ID: eu.unifiedviews,

      • Artifact ID: uv-dpu-template-base

      • Version: 8.0.0

  4. New project details. Fill in basic info about your DPU artifact which should be created for you:

    • GroupId.

      • Maven group ID for the prepared DPU artifact. In general, all your developed DPUs should use the same Maven Group ID.

      • For generic plugins use: eu.unifiedviews.plugins

      • For PP SWC plugins use: eu.unifiedviews.plugins.swc.poolparty

    • ArtifactId

      • Use pattern: uv-{first character from DPU type}-{dpuName in camelCase style }

        • so for example uv- t-myDpu to prepare DPU which is of type "Transformer" and has name "MyDpu"

    • Version (optional):

      • By default, the version of the DPU will be 1.0-SNAPSHOT. You may keep it as it is.

  5. Click next, add more properties of the DPU. To add a property, click '+ (see the screenshot below). The dialogue for adding a Maven property appears.

    Manually define the following properties:

    • dpu_type

      • Every DPU is of certain DPU type.

        Please specify one of the following values :

        • Extractor

        • Transformer (default)

        • Loader

        • Quality

    • dpu_name

      • Please specify the name of the DPU. This value is used as name of base DPU classes. Use only names which may be used as Java class names.

        • Suggested pattern CamelCase with big initial letter, e.g., MyDpu.

    • author

      • Name of the DPU author. This value is inserted into comments for all generated classes.

      • Example: 'Tomas Knap'

  6. Click Next, Fill project name, adjust project location to your needs:

    • Project name: {first character from DPU type}-{dpuName in camelCase style }

      • For example t-myDpu for the DPU above (not uv-t-myDpu)

    • Project location: Usually within the folder with plugins/SWC plugins.

  7. Click Finish.

Note

If the process ends with an error ('Cannot find the given archetype'), please ensure that the Maven repository at the location https://mvn.semantic-web.at/nexus/content/repositories/releases/ is used by Maven.

You may set up such remote repositories in Preferences, search for Maven, Repositories and add such remote repository. In case of difficulties, first checkout and install UnifiedViews - Plugin-devEnv repository, master branch

After the project has been generated, you may still need to change these settings:

  1. Mark the 'src' folder as containing source code files.

  2. Instruct Maven to automatically import projects.

  1. Right-click on the 'java' folder and select Mark directory as source root (see the blue folder below).

    24577499.png
  2. Instruct Maven to automatically import projects, in Preferences, search for Maven, select the Importing menu item and ensure that Import Maven projects automatically is checked.

    24577498.png

For further explanation of the generated files, please refer to: Explaining the Core DPU Files Generated by the DPU Template

You can also build the DPU (as it is) and try to import it to UnifiedViews' UI, see: Creating a New DPU Using IntelliJ