Skip to content

Commit

Permalink
Merge pull request #212 from AuthorizeNet/future
Browse files Browse the repository at this point in the history
Future
  • Loading branch information
gnongsie authored Sep 18, 2024
2 parents c76c9a1 + d6b7f85 commit b1ef536
Show file tree
Hide file tree
Showing 278 changed files with 917 additions and 796 deletions.
40 changes: 0 additions & 40 deletions .classpath

This file was deleted.

73 changes: 73 additions & 0 deletions .github/workflows/java-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Authorize.net Java CI
on:
push:
pull_request:
workflow_dispatch:
env:
sdk_java: 'sdk-java'
sample_code_java: 'sample-code-java'
jobs:
workflow-job:
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, macos-latest, windows-latest]
java-version: ['8'] # , '11', '16', '17', '18', '19', '20', '21', '22'] # Blocking higher versions SDK using jaxb
distribution: ['temurin']
runs-on: ${{matrix.operating-system}}
steps:
- name: Creating separate folders for SDK and Sample Codes
run: |
rm -rf $sdk_java
rm -rf $sample_code_java
mkdir $sdk_java $sample_code_java
- name: Checkout authorizenet/sdk-java
uses: actions/checkout@v4
with:
path: ${{env.sdk_java}}
- name: Checkout authorizenet/sample-code-java
uses: actions/checkout@v4
with:
repository: 'authorizenet/sample-code-java'
ref: 'future'
path: ${{env.sample_code_java}}
- name: Setup Java 1.8 to build the SDK
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '8'
- name: Build the Java SDK
run: |
mvn -version
java -version
cd $sdk_java
mvn clean install
- name: Replace the version of SDK in samples' pom file
run: |
cd $sdk_java
SDK_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo $SDK_VERSION
cd ../$sample_code_java
perl -i -spe "BEGIN{undef $/;} s|<groupId>net\.authorize<\/groupId>\s*<artifactId>anet-java-sdk<\/artifactId>\s*<version>.*?<\/version>|<groupId>net.authorize</groupId>\n <artifactId>anet-java-sdk</artifactId>\n <version>\${version}</version>|g" -- -version=$SDK_VERSION pom.xml
cat pom.xml
- name: Setup Java version to Build the samples
uses: actions/setup-java@v2
with:
distribution: ${{matrix.distribution}}
java-version: ${{matrix.java-version}}
- name: Build the Sample Project and Run the Samples
run: |
mvn -version
java -version
cd $sdk_java
SDK_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo $SDK_VERSION
cd ../$sample_code_java
mvn install -DsdkVersion=$SDK_VERSION -DskipTests=true -Dmaven.javadoc.skip=true -B -V
echo "Running Samples"
mvn test -DsdkVersion=$SDK_VERSION -B
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
target
logs
log

#intellij files
.idea
*.iml
.DS_Store
docs/.DS_Store
*.xsd
23 changes: 0 additions & 23 deletions .project

This file was deleted.

4 changes: 2 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<property name="javadocs.dir" value="${basedir}/docs/javadocs" />
<property name="build.dir" value="${basedir}/target" />
<property name="classes.dir" value="${basedir}/target/classes" />
<property name="lib.dir" value="${basedir}/lib" />
<property name="lib.dir" value="${basedir}/target/lib" />
<property name="src.tests" value="${basedir}/src/test/java" />
<property name="resources.dir" value="${basedir}/resources" />
<property name="reports.tests" value="${basedir}/target/reports" />
Expand Down Expand Up @@ -106,7 +106,7 @@
<javadoc destdir="${javadocs.dir}" author="true" version="true" encoding="UTF-8" use="true" windowtitle="Authorize.Net Java SDK" verbose="off" serialwarn="off">

<classpath>
<fileset id="libFiles" dir="lib">
<fileset id="libFiles" dir="target/lib">
<include name="**/**/*.jar" />
</fileset>
</classpath>
Expand Down
Binary file removed lib/commons-logging-1.2.jar
Binary file not shown.
Binary file removed lib/gson-2.3.1.jar
Binary file not shown.
Binary file removed lib/hamcrest-core-1.3.jar
Binary file not shown.
Binary file removed lib/hamcrest-library-1.3.jar
Binary file not shown.
Binary file removed lib/httpclient-4.5.12.jar
Binary file not shown.
Binary file removed lib/httpcore-4.4.13.jar
Binary file not shown.
Binary file removed lib/jmock-2.6.0.jar
Binary file not shown.
Binary file removed lib/junit-4.8.2.jar
Binary file not shown.
Binary file removed lib/log4j-1.2.16.jar
Binary file not shown.
36 changes: 24 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,31 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
<version>1.3.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<!-- <dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
<scope>compile</scope>
</dependency>
<dependency>
</dependency> -->
<!-- <dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.14</version>
<scope>compile</scope>
</dependency> -->
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>5.3.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.core5</groupId>
<artifactId>httpcore5</artifactId>
<version>5.2.5</version>
</dependency>
<!-- Log4j Dependencies -->
<dependency>
Expand Down Expand Up @@ -106,7 +117,7 @@
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.3.1</version>
<version>2.11.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand All @@ -117,39 +128,40 @@
<maven.compile.target>1.5</maven.compile.target>
<maven.compile.optimize>true</maven.compile.optimize>
<maven.compile.deprecation>true</maven.compile.deprecation>
<log4j.version>2.17.1</log4j.version>
<log4j.version>2.23.1</log4j.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<version>3.13.0</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<version>1.2.1</version>
<!-- <executions> <execution> <phase>initialize</phase> <goals> <goal>read-project-properties</goal>
</goals> <configuration> <files> <file>${user.home}/anet-java-sdk.properties</file>
</files> </configuration> </execution> </executions> -->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.9</version>
<version>2.12</version>
<configuration>
<includes>
<include> **/mocktest/**.java</include>
</includes>
<skipTests>false</skipTests>
<forkCount>1</forkCount>
<systemPropertyVariables>
<!--suppress UnresolvedMavenProperty -->
<API_LOGIN_ID>${api.login.id}</API_LOGIN_ID>
<!--suppress UnresolvedMavenProperty -->
<TRANSACTION_KEY>${transaction.key}</TRANSACTION_KEY>
</systemPropertyVariables>
<environmentVariables>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2021.01.27 at 04:18:12 PM GMT+05:30
// Generated on: 2024.08.29 at 03:44:59 AM IST
//


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2021.01.27 at 04:18:12 PM GMT+05:30
// Generated on: 2024.08.29 at 03:44:59 AM IST
//


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2021.01.27 at 04:18:12 PM GMT+05:30
// Generated on: 2024.08.29 at 03:44:59 AM IST
//


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2021.01.27 at 04:18:12 PM GMT+05:30
// Generated on: 2024.08.29 at 03:44:59 AM IST
//


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2021.01.27 at 04:18:12 PM GMT+05:30
// Generated on: 2024.08.29 at 03:44:59 AM IST
//


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2021.01.27 at 04:18:12 PM GMT+05:30
// Generated on: 2024.08.29 at 03:44:59 AM IST
//


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2021.01.27 at 04:18:12 PM GMT+05:30
// Generated on: 2024.08.29 at 03:44:59 AM IST
//


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2021.01.27 at 04:18:12 PM GMT+05:30
// Generated on: 2024.08.29 at 03:44:59 AM IST
//


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2021.01.27 at 04:18:12 PM GMT+05:30
// Generated on: 2024.08.29 at 03:44:59 AM IST
//


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2021.01.27 at 04:18:12 PM GMT+05:30
// Generated on: 2024.08.29 at 03:44:59 AM IST
//


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2021.01.27 at 04:18:12 PM GMT+05:30
// Generated on: 2024.08.29 at 03:44:59 AM IST
//


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2021.01.27 at 04:18:12 PM GMT+05:30
// Generated on: 2024.08.29 at 03:44:59 AM IST
//


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2021.01.27 at 04:18:12 PM GMT+05:30
// Generated on: 2024.08.29 at 03:44:59 AM IST
//


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2021.01.27 at 04:18:12 PM GMT+05:30
// Generated on: 2024.08.29 at 03:44:59 AM IST
//


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2021.01.27 at 04:18:12 PM GMT+05:30
// Generated on: 2024.08.29 at 03:44:59 AM IST
//


Expand Down
Loading

0 comments on commit b1ef536

Please sign in to comment.