TranslateXml - mehdimo/janett GitHub Wiki
You can control janett translation process completely using translate.xml file
translate.xml file may be located in input folder (Java folder) you specify in command-line. A compatible version of this file included in Janett distributions (in root folder).
You can specify parameters in this file. Command-line parameters override these values.
| Parameter | Description | Default | | ----------------- |:----------------------------------------------:| ------------------:| | Mode | Which mode to use (DotNet/[IKVM](IKVM)) | DotNet | | OutputFolder | Where outputs created | ..\<Solution\>- | | Solution | Visual studio solution name | InputFolder name | | Package | root Package name | - | | Namespace | Namespace to replace package | - | | ReferenceFolder | Folder which contains ProjectReferences | Lib |
You can add Files element to include or exclude files (patterns are like Ant and NAnt):
#xml
<Files>
<Include Path="src\**"/>
<Include Path="test\**"/>
<Exclude Path="net\sf\classifier4J\**\AllTests.java"/>
</files>
If only Exclude tags are present default will be added.
In Projects tag you can specify multiple projects. Each project node can contains these attributes:
| -------------- |:-----------------------------------------------:| ----------------------------------:| | Name | name of project and output folder | required | | Folder | sub-folder of input folder | required | | Reference | reference to other projects (comma separated) | optional | | AssemblyName | name of project output assembly | optional (Name if not specified) | | Guid | project Guid used by Visual Studio | optional | | -------------- | ----------------------------------------------- ----------------------------------
Also you can use Include and Exclude as child elements. for example in Classifier project:
#xml
<Projects>
<Project Name="NClassifier" Folder="core\src\java">
<Exclude Path="net\sf\classifier4J\bayesian\*JDBC*.java" Mode="DotNet"/>
<Exclude Path="net\sf\classifier4J\util\Resource.java"/>
<Exclude Path="net\sf\classifier4J\CustomizableStopWordProvider.java"/>
</project>
<Project Name="UnitTests" Folder="core\src\test" Reference="NClassifier">
<Exclude Path="net\sf\classifier4J\**\AllTests.java"/>
<Exclude Path="net\sf\classifier4J\CustomizableStopWordProviderTest.java"/>
</project>
</projects>
you can specify values repeatedly for each Mode:
#xml
<OutputFolder Mode="IKVM">..\IKVM</outputfolder>
<OutputFolder Mode="DotNet">..\DotNet</outputfolder>