Compiling the FileSys Sample Code

Compiling the sample java code to create the custom connector.


Before you begin:

Install the SDK as described in the SCM Connectors Administrator's Guide.

See Also
Deploying the FileSys Sample Code
In Other Guides
Adding a New Connector
  1. You need to compile the supplied java code into a “jar” file. Use whatever process you would normally use for building JAVA code. The following example shows a sample build.gradle file from an Eclipse/Gradle environment:
    plugins {
     // Apply the java-library plugin to add support for Java Library
     id 'java-library'
    }
    repositories {
     mavenCentral()
    }
    dependencies {    
        compile files('/home/SCMSRVR/3DSCM/STAGING/ematrix/WEB-INF/lib/ENOXSoftwareConnectorDaemonSDK.jar')
        compile files('/home/SCMSRVR/3DSCM/STAGING/ematrix/WEB-INF/lib/ENOXSoftwareConnectorCommon.jar')
        compile files('/home/SCMSRVR/3DSCM/STAGING/ematrix/WEB-INF/lib/commons-fileupload-1.4.jar')
        compile files('/home/SCMSRVR/3DSCM/STAGING/ematrix/WEB-INF/lib/jakarta.xml.bind-api.jar')
        compile files('/home/SCMSRVR/3DSCM/STAGING/ematrix/WEB-INF/lib/httpcore.jar')
        compile files('/home/SCMSRVR/3DSCM/STAGING/ematrix/WEB-INF/lib/httpclient.jar')
        compile files('/home/SCMSRVR/3DSCM/linux_a64/code/tomee/lib/servlet-api.jar')
        compile files('/home/SCMSRVR/3DSCM/linux_a64/code/tomee/lib/javaee-api.jar')
    
    }
    sourceSets {
     main {
     resources {
     srcDirs "src/main/java"
     }
     }
    }
    sourceCompatibility = 11
  2. Once you have the jar file, copy it to the <server dir>/webapps/3DSCM/WEB-INF/lib directory.

    Tip: A program like "jdeps" can be used to help you identify dependencies.

  3. Open the scmfilesys.web.xml.part file and add the contents between the <web-app>…</web-app> tags to the <server dir>/webapps/3DSCM/WEB-INF/web.xml.
  4. Copy the contents of the webapps/scmfilesys folder to the <server dir>/webapps/3DSCM/scmfilesys folder.
  5. Restart the server.

The FileSys example connector is ready to test.