We have wrapped an example connector project into a Maven Archetype to make it easier for developers to start. It contains a basic FileSystem Connector implementation and lots of comments to guide you through your development.
Let's start!
Open your command line terminal and execute:
> mvn archetype:generate -DarchetypeGroupId=com.accenture.aspire -DarchetypeArtifactId=aspire-connector-archetype -DarchetypeVersion=4.0 -DrepositoryId=stPublic
You will be prompted to enter:
From the previous step you now should be able to see a folder created with the "artifactId" you entered as its name.
Now let's import that project into eclipse:
Now open the source in eclipse and look though all of it. The principal class to look for is the RAP one, this is the implementation of the RepositoryAccessProviderinterface which is the entry point from Aspire in order to crawl a repository. The code implemented there is a simply FileSystem Scanner which scans recursively from a start root folder.
Now it is time to compile and see the connector working in Aspire
Compile the code and run the unit tests by opening the Command Line into to your project folder and executing:
> mvn clean install
Now it is time for you to implement your connector logic, go ahead and visit General Scanning and General Metadata Population in order to know how to implement the RepositoryAccessProvider for scanning and populating metadata.
If your connector doesn't fit with the default behavior, visit Recipes for more example code for having your connector do whatever you need.