"[MOSTLY SOLVED] Trying to build the tutorial's extension"
I'm trying to follow the "How to Extend RapidMiner 5" white paper and having trouble.
At section 7.1 "The Extension Bundle", it talks of "the tutorial extension that comes with this guide. As all RapidMiner extensions it comes as a single jar file." No such jar came with the white paper or its accompanying zips (it's not in the Tutorial, Template or Unuk projects). The contents of the manifest which are given make it look like the jar is produced by the Tutorial, but section 7.2 "The ant Build File" contradicts this by clearly using the Template as the source.
The first confusion occurs in chapter 4 "Creating your own Extension", on p. 20, where it reads "If you are going to deploy your Extension to RapidMiner for testing purpose, you might execute the install target of the ant file build.xml." This should specify which build.xml: Template, Tutorial, or either.
Next, section 5.1 "Our First Operator" should indicate which (of Template or Tutorial) to use as the basis for the new class. I've used the Template.
Small correction: on p. 23 (section 5.2 "Adding Ports"), the 'exampleSetInput.getData()' call is deprecated, and should be replaced with 'exampleSetInput.getData(ExampleSet.class)'.
On p. 25 (section 5.3 "Declaring operators to RapidMiner"), the OperatorsTemplate.xml shown doesn't match the one that came with the Template project. It is currently loaded with a 'generate_extract' operator named 'com.rapidminer.operator.features.construction.TextInformationExtractionOperator'; this should be replaced with what is shown in the white paper (i.e. <key>numerical_to_date</key> <class>com.rapidminer.operator.preprocessing.transformation</class> <replaces>Numerical2Date</replaces>).
Once the OperatorsTemplate.xml is updated and the Numerical2DateOperator.java has been written in the Template's source, running the ant install fails. All 74 errors are along the lines of "error: package com.sun.javadoc does not exist", and clearly are a consequence of the javadoc's tools.jar not being in the JRE (it's in the JDK instead).
It's possible to add tools.jar manually to the Unuk project; in order for the .classpath addition to be a relative path, one could add tools.jar to /lib/. However, this is pointless as it will not solve the ant install failure.
It turns out one needs to set the JRE to the JDK's when running the ant install. From the Template's build.xml, choose Run as: Ant Build...: Edit Configuration: JRE: Separate JRE: jdk, then Run.
But my ant install still fails. The edited log concludes this post, below. The last error message is in French (my OS is French) and basically complains about "unauthorized content in prologue". The problem seems to be that the ant install run goes through all the projects in my Eclipse project repository, including the .metadata folder. Note that the error apparently concerns the very first file it looked at. How do I fix that?
At section 7.1 "The Extension Bundle", it talks of "the tutorial extension that comes with this guide. As all RapidMiner extensions it comes as a single jar file." No such jar came with the white paper or its accompanying zips (it's not in the Tutorial, Template or Unuk projects). The contents of the manifest which are given make it look like the jar is produced by the Tutorial, but section 7.2 "The ant Build File" contradicts this by clearly using the Template as the source.
The first confusion occurs in chapter 4 "Creating your own Extension", on p. 20, where it reads "If you are going to deploy your Extension to RapidMiner for testing purpose, you might execute the install target of the ant file build.xml." This should specify which build.xml: Template, Tutorial, or either.
Next, section 5.1 "Our First Operator" should indicate which (of Template or Tutorial) to use as the basis for the new class. I've used the Template.
Small correction: on p. 23 (section 5.2 "Adding Ports"), the 'exampleSetInput.getData()' call is deprecated, and should be replaced with 'exampleSetInput.getData(ExampleSet.class)'.
On p. 25 (section 5.3 "Declaring operators to RapidMiner"), the OperatorsTemplate.xml shown doesn't match the one that came with the Template project. It is currently loaded with a 'generate_extract' operator named 'com.rapidminer.operator.features.construction.TextInformationExtractionOperator'; this should be replaced with what is shown in the white paper (i.e. <key>numerical_to_date</key> <class>com.rapidminer.operator.preprocessing.transformation</class> <replaces>Numerical2Date</replaces>).
Once the OperatorsTemplate.xml is updated and the Numerical2DateOperator.java has been written in the Template's source, running the ant install fails. All 74 errors are along the lines of "error: package com.sun.javadoc does not exist", and clearly are a consequence of the javadoc's tools.jar not being in the JRE (it's in the JDK instead).
It's possible to add tools.jar manually to the Unuk project; in order for the .classpath addition to be a relative path, one could add tools.jar to /lib/. However, this is pointless as it will not solve the ant install failure.
It turns out one needs to set the JRE to the JDK's when running the ant install. From the Template's build.xml, choose Run as: Ant Build...: Edit Configuration: JRE: Separate JRE: jdk, then Run.
But my ant install still fails. The edited log concludes this post, below. The last error message is in French (my OS is French) and basically complains about "unauthorized content in prologue". The problem seems to be that the ant install run goes through all the projects in my Eclipse project repository, including the .metadata folder. Note that the error apparently concerns the very first file it looked at. How do I fix that?
Buildfile: C:\Users\username\Documents\Eclipse\RapidMiner_Extension_Template\build.xml
Trying to override old definition of task get
Trying to override old definition of task rpm
Trying to override old definition of task post
clean:
[echo] Cleaning...
[delete] Deleting directory C:\Users\username\Documents\Eclipse\RapidMiner_Extension_Template\build
[delete] Deleting directory C:\Users\username\Documents\Eclipse\RapidMiner_Extension_Template\javadoc
[mkdir] Created dir: C:\Users\username\Documents\Eclipse\RapidMiner_Extension_Template\build
[mkdir] Created dir: C:\Users\username\Documents\Eclipse\RapidMiner_Extension_Template\javadoc
version.get:
[echo] Long version: ${extension.version}.${extension.revision}.${extension.update}; short version: ${extension.version}.${extension.revision}
init.setEncoding:
init:
Trying to override old definition of task post
Trying to override old definition of task post
init.setEncoding:
copy-resources:
[echo] Copying resources...
[copy] Copying 9 files to C:\Users\username\Documents\Eclipse\RapidMiner_Extension_Template\build
build:
Trying to override old definition of task post
Trying to override old definition of task post
build.rm:
Trying to override old definition of task post
Trying to override old definition of task post
build.dependencies.prepare:
[echo] Dependencies of Template:
[echo] C:\Users\username\Documents\Eclipse\.metadata\.bak_0.log
...
(thousands of echo lines going through all projects in C:\Users\username\Documents\Eclipse)
...
[echo] C:\Users\username\Documents\Eclipse\RapidMiner_Unuk\svn.project
build.dependencies:
[echo] Building plugin dependencies of Template...
BUILD FAILED
C:\Users\username\Documents\Eclipse\RapidMiner_Unuk\build_extension.xml:139: The following error occurred while executing this line:
C:\Users\username\Documents\Eclipse\RapidMiner_Unuk\build_extension.xml:191: The following error occurred while executing this line:
C:\Users\username\Documents\Eclipse\RapidMiner_Unuk\build_extension.xml:196: The following error occurred while executing this line:
C:\Users\username\Documents\Eclipse\.metadata\.bak_0.log:1: Contenu non autorisé dans le prologue.
Total time: 8 seconds