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 and Clients 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 {
        implementation files('scm_install/linux_a64/docs/javaserver/ENOXSoftwareConnectorDaemonSDK.jar')
        implementation files('scm_install/linux_a64/docs/javaserver/ENOXSoftwareConnectorCommon.jar')
        implementation files('scm_install/linux_a64/docs/javaserver/jakartaee-api9.jar')
        implementation files('scm_install/linux_a64/docs/javaserver/commons-fileupload2-core.jar')
        implementation files('scm_install/linux_a64/docs/javaserver/commons-fileupload2-jakarta.jar')
    }
    
    sourceSets {
        main {
            java {
                srcDirs = ['src/FileSys']
            }
            resources {
                srcDirs = "src/FileSys/resources"
            }
        }
    }
    
    java {
        sourceCompatibility = 11
    }
    
    // Package resources
    tasks.named('processResources') {
        from('src/FileSys/resources/filesys.properties') {
            into 'com/dassaultsystemes/xsoftware/scmdaemon/filesys/resources'
        }
    }
    
  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.

Result: The FileSys example connector is ready to test.