Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The specific connector bundle is always a pre-requisite to link a particular external resource.There  There is a connector bundle for each linkable external resource type. Obviously, a single connector bundle can be used to link more than one resources of the same type.

Here is the complete list of available  ready-to-use ConnId bundles; if needed, new connector bundles can also be developed on-purpose.

Connector bundles can be added or replaced:

  1. only when creating new project from archetype, in project sources;
  2. for all deployment options, at run-time.

Add or replace connector bundles in project sources

Set different version for predefined bundles

 

...

First of all, verify which connector bundles

...

Connector bundles are added at project definition time by modifying the Maven project.

For each new connector bundle you have to perform the following steps.

...

are predefined in your project; check an URL like as

https://repo1.maven.org/maven2/org/apache/syncope/syncope/<syncope.version>/syncope-<syncope.version>.pom

where <syncope.version> is the Syncope version of your project, so for example https://repo1.maven.org/maven2/org/apache/syncope/syncope/1.2.5/syncope-1.2.5.pom for Syncope 1.2.5.

In that file, find maven-dependency-plugin's configuration -  as example, here it follows the content for Syncope 1.2.5

...

:

Code Block
languagexml

...

linenumberstrue
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          

...

modify core/pom.xml to ensure that maven-dependency-plugin contains the following artifactItem (if necessary add the whole configuration):

...

languagexml

...

<version>2.10</version>
          <configuration>
            <outputDirectory>${bundles.directory}</outputDirectory>
            <artifactItems>
              <artifactItem>
                <groupId>net.tirasa.connid.bundles.soap</groupId>
                <artifactId>net.tirasa.connid.bundles.soap</artifactId>
                <version>${connid.soap.version}</version>
              </artifactItem>
              <artifactItem>
                <groupId>net.tirasa.connid.bundles</groupId>
                <artifactId>net.tirasa.connid.bundles.csvdir</artifactId>
                <version>${connid.csvdir.version}</version>
              </artifactItem>
              <artifactItem>
                <groupId>net.tirasa.connid.bundles.db</groupId>
                <artifactId>net.tirasa.connid.bundles.db.table</artifactId>
                <version>${connid.db.table.version}</version>
              </artifactItem>
              <artifactItem>
      

...

          <groupId>net.tirasa.connid.bundles</groupId>
                

...

<artifactId>net.tirasa.connid.

...

bundles.

...

ldap</artifactId>
                <version>${connid.

...

ldap.version}</version>
              </artifactItem>
              <artifactItem>
                <groupId>net.tirasa.connid.bundles</groupId>
                <artifactId>net.tirasa.connid.bundles.ad</artifactId>
           

...

     <version>${connid.ad.version}</

...

version>
              </artifactItem>
            </artifactItems>
          </configuration>

...

        </plugin>

As you can see, there are several Maven properties controlling the related connector bundle's version.

If you want your own project to use a different version of the same connector bundle, all you need to do is to override the related property in your own project's root pom.xml.

With reference to Syncope 1.2.5, supposing that you would like to use net.tirasa.connid.bundles.db.table version 2.2.3-SNAPSHOT rather than 2.2.2 shipped with Syncope 1.2.5, add the following property to your own project's root pom.xml:

Code Block
languagexml
<properties>
   ...
   <connid.db.table.version>2.2.3-SNAPSHOT</connid.db.table.version>
</properties>

Add non-predefined connector bundle

If the needed connector bundle is not in the predefined set as shown above, you need to

  1. Add a new property into your own project's root pom.xml:

    Code Block
    languagexml
    <properties>
       ...
       <my.new.connector.version>1.0.0</my.new.connector.version>
    </properties>
  2. Change maven-dependency-plugin's configuration both in core/pom.xml and console/pom.xml from

    Code Block
    languagexml

...

  1.       <plugin>
            <groupId>org.apache.maven.

...

  1. plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <inherited>true</inherited>
            <executions>
              <execution>
                <id>set-bundles</id>
                <phase>process-test-resources</phase>
                <goals>
                  <goal>copy</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

    to

    Code Block
    languagexml
          <plugin>
            <groupId>org.

...

  1. apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <inherited>true</inherited>
            <configuration>                 
              <artifactItems>
                <dependency>
                  <groupId>my.new.connector.groupId</groupId>
                  

...

  1. <artifactId>my.new.connector.artifactId</artifactId>
                  <version>${

...

  1. my.new.

...

  1. connector.version}</version>
          

...

  1.       </

...

  1. dependency>
              </

...

  1. artifactItems>
            </configuration>
            <executions>
              <execution>
                <id>set-bundles</id>
                <phase>process-test-resources</phase>
                <goals>
                  <goal>copy</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

Add or replace connector

At build time all added connector bundles will be downloaded and copied into the specified bundle directory.

Code Block
mvn clean package -Dbundles.directory=/opt/syncope/bundles -Dlog.directory=/opt/syncope/log

where bundles.directory is the directory path where the bundle JAR files are located and log.directory is the directory the log files will be created (paths must exist in advance).

 

...

bundles at run-time

Connector bundles can be added or replaced at run-time by just performing the following two steps.:

  1. Download needed the required connector bundle JAR file.;
  2. Copy the downloaded JAR file into one of configured ConnId locations, e.g. a directory where the connector bundles directory specified by the configuration parameter bundles.directory.

Since Version 1.1.3 you need to update the connid properties in the classes folder of your deployment.

For example:

...

languagejs
titlewebapps/syncope/WEB-INF/classes/connid.properties

...

  1. other connector bundles are already located in.