Skip to content

Commit

Permalink
Merge pull request #33 from axonivy/feature/XIVY-9860-z-debt
Browse files Browse the repository at this point in the history
XIVY-9860 z debt
  • Loading branch information
ivy-rew authored Oct 25, 2022
2 parents dce7620 + 2d81557 commit cab6d88
Show file tree
Hide file tree
Showing 17 changed files with 154 additions and 174 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pipeline {
script {
def phase = env.BRANCH_NAME == 'master' ? 'deploy' : 'verify'
maven cmd: "clean ${phase} " +
'-Dproject-build-plugin.version=9.1.0 ' +
'-Dproject-build-plugin.version=11.1.0-SNAPSHOT ' +
'-Dgpg.skip=true ' +
'-Divy.engine.list.url=https://jenkins.ivyteam.io/job/core_product/job/master/lastSuccessfulBuild/ ' +
'-Divy.engine.directory=${WORKSPACE}/ldap-beans/target/ivyEngine '
Expand Down
2 changes: 1 addition & 1 deletion blockchain-beans-tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: Axon Ivy AG
Bundle-Name: Blockchain
Bundle-SymbolicName: supplement.blockchain.beans.tests;singleton:=true
Bundle-Version: 9.4.0.qualifier
Bundle-Version: 11.1.0.qualifier
Require-Bundle: supplement.blockchain.beans,
ch.ivyteam.ivy.components,
ch.ivyteam.ivy.bpm.exec,
Expand Down
4 changes: 2 additions & 2 deletions blockchain-beans-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<parent>
<groupId>com.axonivy.ivy.supplements</groupId>
<artifactId>ivy-bundle</artifactId>
<version>9.4.0-SNAPSHOT</version>
<version>11.1.0-SNAPSHOT</version>
<relativePath>../build.maven/ivy.bundle</relativePath>
</parent>
<name>blockchain-beans-tests</name>
<packaging>eclipse-test-plugin</packaging>
<version>9.4.0-SNAPSHOT</version>
<version>11.1.0-SNAPSHOT</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
4 changes: 2 additions & 2 deletions blockchain-beans/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: Axon Ivy AG
Bundle-Name: Blockchain
Bundle-SymbolicName: supplement.blockchain.beans;singleton:=true
Bundle-Version: 9.4.0.qualifier
Bundle-Version: 11.1.0.qualifier
Require-Bundle: ch.ivyteam.ivy.components,
ch.ivyteam.ivy.bpm.exec,
ch.ivyteam.ivy.designer.process.ui;resolution:=optional,
ch.ivyteam.ivy.designer.inscription.ui;resolution:=optional,
ch.ivyteam.ivy.designer.process.ui;resolution:=optional,
ch.ivyteam.ivy.designer.ide;resolution:=optional,
ch.ivyteam.ivy.process.config,
ch.ivyteam.lib.jackson;resolution:=optional,
Expand Down
222 changes: 112 additions & 110 deletions blockchain-beans/pom.xml
Original file line number Diff line number Diff line change
@@ -1,56 +1,54 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>supplement.blockchain.beans</artifactId>
<parent>
<groupId>com.axonivy.ivy.supplements</groupId>
<artifactId>ivy-bundle</artifactId>
<version>9.4.0-SNAPSHOT</version>
<relativePath>../build.maven/ivy.bundle</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>
<version>9.4.0-SNAPSHOT</version>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>supplement.blockchain.beans</artifactId>
<parent>
<groupId>com.axonivy.ivy.supplements</groupId>
<artifactId>ivy-bundle</artifactId>
<version>11.1.0-SNAPSHOT</version>
<relativePath>../build.maven/ivy.bundle</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>

<name>blockchain-beans</name>
<description>Provides blockchain call steps.</description>
<url>https://github.com/ivy-supplements/bpm-beans/tree/master/blockchain-beans</url>
<name>blockchain-beans</name>
<description>Provides blockchain call steps.</description>
<url>https://github.com/ivy-supplements/bpm-beans/tree/master/blockchain-beans</url>


<properties>
<properties>
<web3j.version>4.7.0</web3j.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>org.web3j</groupId>
<artifactId>core</artifactId>
<version>${web3j.version}</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<dependencies>
<dependency>
<groupId>org.web3j</groupId>
<artifactId>core</artifactId>
<version>${web3j.version}</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>validate</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/lib</outputDirectory>
<stripVersion>true</stripVersion>
<includeGroupIds>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>validate</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/lib</outputDirectory>
<stripVersion>true</stripVersion>
<includeGroupIds>
org.web3j,
org.reactivestreams,
io.reactivex,
Expand All @@ -59,68 +57,72 @@
org.bouncycastle,
org.jetbrains.kotlin
</includeGroupIds>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>

<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<versionRange>[2.8,)</versionRange>
<goals>
<goal>copy-dependencies</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute>
<runOnConfiguration>true</runOnConfiguration>
<runOnIncremental>true</runOnIncremental>
</execute>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<versionRange>[0.23.1,)</versionRange>
<goals>
<goal>compile</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-packaging-plugin</artifactId>
<versionRange>[0.23.1,)</versionRange>
<goals>
<goal>validate-version</goal>
<goal>validate-id</goal>
<goal>build-qualifier</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<versionRange>[2.8,)</versionRange>
<goals>
<goal>copy-dependencies</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute>
<runOnConfiguration>true</runOnConfiguration>
<runOnIncremental>true</runOnIncremental>
</execute>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<versionRange>[0.23.1,)</versionRange>
<goals><goal>compile</goal></goals>
</pluginExecutionFilter>
<action><ignore/></action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-packaging-plugin</artifactId>
<versionRange>[0.23.1,)</versionRange>
<goals>
<goal>validate-version</goal>
<goal>validate-id</goal>
<goal>build-qualifier</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,20 @@ public Class<? extends IUserProcessExtension> getExecutor()
{
return EthereumActivity.class;
}

@Override
public String getDescription() {
return "Executes an Ethereum call";
}

@Override
public String getElementGroup() {
return "Blockchain";
}

@Override
public String getShortLabel() {
return "Ethereum";
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -124,22 +124,22 @@ private Contract loadOrDeployContract(String clazz, String url, String contractA
}
}

private static Class<?> loadClassWithCurrentClassloader(String fullyQualifiedClassName) throws ClassNotFoundException
private static Class<?> loadClassWithCurrentClassloader(String fullyQualifiedClassName) throws Exception
{
try
{
return EthereumExecutor.class.getClassLoader().loadClass(fullyQualifiedClassName);
}
catch (ClassNotFoundException ex)
catch (Exception ex)
{
return loadClassWithProjectClassloader(fullyQualifiedClassName);
}
}

private static Class<?> loadClassWithProjectClassloader(String fullyQualifiedClassName) throws ClassNotFoundException
private static Class<?> loadClassWithProjectClassloader(String fullyQualifiedClassName) throws Exception
{
IProcessModelVersion pmv = DiCore.getGlobalInjector().getInstance(IProcessModelVersion.class);
ClassLoader projectClassLoader = Sudo.exec(() -> IvyProjectNavigationUtil.getIvyProject(pmv.getProject()).getProjectClassLoader());
ClassLoader projectClassLoader = Sudo.call(() -> IvyProjectNavigationUtil.getIvyProject(pmv.getProject()).getProjectClassLoader());
return ClassUtils.getClass(projectClassLoader, fullyQualifiedClassName, false);
}

Expand Down
Loading

0 comments on commit cab6d88

Please sign in to comment.