Skip to content

Commit

Permalink
New 2.4.0-SNAPSHOT version for master, working with ConnId 1.6.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgrosso committed Dec 26, 2024
1 parent c9af1f6 commit 3fc7456
Show file tree
Hide file tree
Showing 9 changed files with 90 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up JDK 1.8
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 8
java-version: 17

- name: Setup Maven
uses: stCarolas/setup-maven@v5
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up JDK 1.8
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 8
java-version: 17

- name: Setup Maven
uses: stCarolas/setup-maven@v5
Expand Down
2 changes: 1 addition & 1 deletion bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<parent>
<groupId>net.tirasa.connid.bundles.db</groupId>
<artifactId>db</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.4.0-SNAPSHOT</version>
</parent>

<groupId>net.tirasa.connid.bundles.db</groupId>
Expand Down
2 changes: 1 addition & 1 deletion commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<parent>
<groupId>net.tirasa.connid.bundles.db</groupId>
<artifactId>db</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.4.0-SNAPSHOT</version>
</parent>

<groupId>net.tirasa.connid.bundles.db</groupId>
Expand Down
80 changes: 68 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
<parent>
<groupId>net.tirasa.connid</groupId>
<artifactId>connid</artifactId>
<version>1.5.2.0</version>
<version>1.6.0.0-SNAPSHOT</version>
</parent>

<groupId>net.tirasa.connid.bundles.db</groupId>
<artifactId>db</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.4.0-SNAPSHOT</version>

<name>ConnId Bundles: DB</name>

Expand Down Expand Up @@ -82,11 +82,10 @@
</mailingLists>

<properties>
<connid.version>1.5.2.0</connid.version>
<commons.version>1.5.2.0</commons.version>
<connid.version>1.6.0.0-SNAPSHOT</connid.version>
<rootpom.basedir>${basedir}</rootpom.basedir>

<targetJdk>8</targetJdk>
<targetJdk>17</targetJdk>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand All @@ -102,11 +101,10 @@
<artifactId>connector-framework-internal</artifactId>
<version>${connid.version}</version>
</dependency>

<dependency>
<groupId>net.tirasa.connid.commons</groupId>
<groupId>net.tirasa.connid</groupId>
<artifactId>commons-scripted</artifactId>
<version>${commons.version}</version>
<version>${connid.version}</version>
</dependency>

<!-- TEST -->
Expand All @@ -120,22 +118,61 @@
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.14.2.0</version>
<version>10.16.1.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbytools</artifactId>
<version>10.16.1.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>ianal-maven-plugin</artifactId>
<inherited>true</inherited>
<executions>
<execution>
<phase>none</phase>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.geronimo.genesis.plugins</groupId>
<artifactId>tools-maven-plugin</artifactId>
<version>1.4</version>
<configuration>
<!-- Fail the build if any artifacts are missing legal files -->
<strict>true</strict>
<requiredFiles>
<requiredFile>LICENSE</requiredFile>
</requiredFiles>
</configuration>
<executions>
<execution>
<id>verify-legal-files</id>
<phase>verify</phase>
<goals>
<goal>verify-legal-files</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<inherited>true</inherited>
<configuration>
<header>https://raw.githubusercontent.com/Tirasa/ConnId/connid-${connid.version}/java/src/main/resources/header.txt</header>
<header>https://raw.githubusercontent.com/Tirasa/ConnId/master/java/src/main/resources/header.txt</header>
<headerDefinitions>
<headerDefinition>https://raw.githubusercontent.com/Tirasa/ConnId/connid-${connid.version}/java/src/main/resources/java-single-star.xml</headerDefinition>
<headerDefinition>https://raw.githubusercontent.com/Tirasa/ConnId/master/java/src/main/resources/java-single-star.xml</headerDefinition>
</headerDefinitions>
<excludes>
<exclude>README.md</exclude>
Expand Down Expand Up @@ -187,18 +224,37 @@
</executions>
</plugin>

<!-- Put NOTICE and LICENSE files in all artifacts and javadocs -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-artifact-legal-files</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.outputDirectory}/META-INF</outputDirectory>
<resources>
<resource>
<directory>${rootpom.basedir}</directory>
<includes>
<include>LICENSE</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-javadoc-legal-files</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/apidocs/META-INF</outputDirectory>
<outputDirectory>${project.build.directory}/reports/apidocs/META-INF</outputDirectory>
<resources>
<resource>
<directory>${rootpom.basedir}</directory>
Expand Down
4 changes: 2 additions & 2 deletions scriptedsql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<parent>
<groupId>net.tirasa.connid.bundles.db</groupId>
<artifactId>db</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.4.0-SNAPSHOT</version>
</parent>

<groupId>net.tirasa.connid.bundles.db</groupId>
Expand All @@ -52,7 +52,7 @@
</dependency>

<dependency>
<groupId>net.tirasa.connid.commons</groupId>
<groupId>net.tirasa.connid</groupId>
<artifactId>commons-scripted</artifactId>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ public void validate() {
*/
public String formatUrlTemplate() {
LOG.info("format UrlTemplate");
final StringBuffer b = new StringBuffer();
final StringBuilder b = new StringBuilder();
final String url = getJdbcUrlTemplate();
final int len = url.length();
for (int i = 0; i < len; i++) {
Expand Down
7 changes: 6 additions & 1 deletion table/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<parent>
<groupId>net.tirasa.connid.bundles.db</groupId>
<artifactId>db</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.4.0-SNAPSHOT</version>
</parent>

<groupId>net.tirasa.connid.bundles.db</groupId>
Expand Down Expand Up @@ -61,6 +61,11 @@
<artifactId>derby</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbytools</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ public Uid create(final ObjectClass oclass, final Set<Attribute> attrs, final Op

LOG.info("process and check the Attribute Set");

final Set<Attribute> attrToBeProcessed = new HashSet<Attribute>(attrs);
final Set<Attribute> attrToBeProcessed = new HashSet<>(attrs);

// If status column is specified attribute __ENABLED__ must be specified.
// If attribute __ENABLED__ is not specified a default value must be
Expand Down Expand Up @@ -993,7 +993,7 @@ public Uid resolveUsername(final ObjectClass oclass, final String username, fina
final String keyColumnName = quoteName(config.getKeyColumn());
final String passwordColumnName = quoteName(config.getPasswordColumn());
final String sql = MessageFormat.format(SQL_AUTH_QUERY, keyColumnName, config.getTable(), passwordColumnName);
final List<SQLParam> values = new ArrayList<SQLParam>();
final List<SQLParam> values = new ArrayList<>();
values.add(new SQLParam(keyColumnName, username, getColumnType(config.getKeyColumn()))); // real username

PreparedStatement stmt = null;
Expand Down Expand Up @@ -1114,7 +1114,7 @@ private void cacheSchema() {
LOG.info("cacheSchema on {0}", attrInfoSet);

// Cache the attributes to get
defaultAttributesToGet = new HashSet<String>();
defaultAttributesToGet = new HashSet<>();

for (AttributeInfo info : attrInfoSet) {
final String name = info.getName();
Expand Down Expand Up @@ -1219,7 +1219,7 @@ private Set<AttributeInfo> buildSelectBasedAttributeInfos() {
private Set<AttributeInfo> buildAttributeInfoSet(final ResultSet rset) throws SQLException {
LOG.info("build AttributeInfoSet");

final Set<AttributeInfo> attrInfo = new HashSet<AttributeInfo>();
final Set<AttributeInfo> attrInfo = new HashSet<>();

columnSQLTypes = CollectionUtil.<Integer>newCaseInsensitiveMap();
stringColumnRequired = CollectionUtil.newCaseInsensitiveSet();
Expand Down Expand Up @@ -1420,7 +1420,7 @@ private Set<String> resolveColumnNamesToGet(final OperationOptions options) {
}

// Replace attributes to quoted columnNames
Set<String> columnNamesToGet = new HashSet<String>();
Set<String> columnNamesToGet = new HashSet<>();

for (String attributeName : attributesToGet) {
final String columnName = getColumnName(attributeName);
Expand Down Expand Up @@ -1561,7 +1561,7 @@ private GuardedString encodePassword(final GuardedString guarded) throws Passwor
final EncodeAlgorithm algorithm;

try {
algorithm = (EncodeAlgorithm) Class.forName(cipherAlgorithm).newInstance();
algorithm = (EncodeAlgorithm) Class.forName(cipherAlgorithm).getDeclaredConstructor().newInstance();
if (StringUtil.isNotBlank(cipherKey)) {
algorithm.setKey(cipherKey);
}
Expand Down Expand Up @@ -1618,7 +1618,7 @@ private String decodePassword(final String password) throws PasswordDecodingExce
final String cipherKey = config.getCipherKey();
final EncodeAlgorithm algorithm;
try {
algorithm = (EncodeAlgorithm) Class.forName(cipherAlgorithm).newInstance();
algorithm = (EncodeAlgorithm) Class.forName(cipherAlgorithm).getDeclaredConstructor().newInstance();
if (StringUtil.isNotBlank(cipherKey)) {
algorithm.setKey(cipherKey);
}
Expand Down

0 comments on commit 3fc7456

Please sign in to comment.