-
Notifications
You must be signed in to change notification settings - Fork 123
Codecs
Richard Warburton edited this page Nov 23, 2018
·
12 revisions
If you want to use the encoders and decoders from Artio in order to parse or generate FIX then you should use the CodecGenerationTool
. It takes two arguments. The first is the output directory, and the second is the path to the XML dictionary to use to define the variant in use.
java -cp "fix-gateway-samples/build/libs/artio-samples.jar-${ARTIO-VERSION}-all.jar" \
uk.co.real_logic.artio.dictionary.CodecGenerationTool \
/path/to/generated-src/directory \
src/main/resources/your_fix_dictionary_file.xml
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
<phase>generate-sources</phase>
</execution>
</executions>
<configuration>
<mainClass>uk.co.real_logic.artio.dictionary.CodecGenerationTool</mainClass>
<arguments>
<argument>${project.build.directory}/generated-sources/java</argument>
<argument>src/main/resources/your_fix_dictionary_file.xml</argument>
</arguments>
</configuration>
</plugin>
task generateCodecs(type: JavaExec) {
main = 'uk.co.real_logic.artio.dictionary.CodecGenerationTool'
classpath = sourceSets.main.runtimeClasspath
args = ['/path/to/generated-src/directory', 'src/main/resources/your_fix_dictionary_file.xml']
outputs.dir '/path/to/generated-src/directory'
}