Page History
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<dependency> <groupId>com.searchtechnologies.aspire</groupId> <artifactId>aspire-connector-services</artifactId> <version>3.0</version> </dependency> <dependency> <groupId>com.searchtechnologies.aspire</groupId> <artifactId>aspire-connector-framework</artifactId> <version>3.0</version> </dependency> <dependency> <groupId>com.searchtechnologies.aspire</groupId> <artifactId>aspire-services</artifactId> <version>3.0</version> </dependency> <dependency> <groupId>org.osgi</groupId> <artifactId>org.osgi.core</artifactId> <version>4.2.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.osgi</groupId> <artifactId>org.osgi.compendium</artifactId> <version>4.2.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.searchtechnologies.aspire</groupId> <artifactId>THE-CONNECTOR-TO-USE</artifactId> <version>3.0</version> </dependency> <dependency> <groupId>com.searchtechnologies.aspire</groupId> <artifactId>aspire-core</artifactId> <version>3.0</version> </dependency> |
Step 2
...
Initialize the crawl and configuration objects:
Code Block | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
public static void main(String[] args) { //Get the scan properties from the arguments String scanPropertiesFile = args[0]; //Instantiate a new RepositoryAccessProvider from the connector implementation JobFactory.initializeForStandAloneUsage(); ComponentImpl component = new SP2013RAP(); component.initialize(emptyDom); RepositoryAccessProvider rap = (RepositoryAccessProvider) component; //Create a CrawlControllerImpl, as some connectors depends on it StandaloneCrawlController crawlCtrlImpl = new StandaloneCrawlController(rap); //Load the content-source.xml configuration into an AspireObject AspireObject scanProps = new AspireObject("doc"); AspireObject scanPropsFile = AspireObject.createFromXML(new File(scanPropertiesFile)); scanProps.add(scanPropsFile); //Create and initialize a new SourceInfo from the RAP SourceInfo info = rap.newSourceInfo(scanPropsFile); info.initialize(scanProps); info.setCrawlController(crawlCtrlImpl); crawlCtrlImpl.setSourceInfo(info); |
For Legacy connectors standalone crawls see:
...
Overview
Content Tools