[QFJ-499] Modify build system to use Maven Created: 10/Jan/10  Updated: 02/Apr/15  Resolved: 09/Jun/14

Status: Closed
Project: QuickFIX/J
Component/s: Build
Affects Version/s: None
Fix Version/s: 1.6.0

Type: Task Priority: Major
Reporter: Steve Bate Assignee: amichair
Resolution: Fixed Votes: 12
Labels: None

Attachments: Zip Archive codegenerator.zip     File quickfixj.zip    
Issue Links:
Relates
relates to QFJ-783 Update documentation and website to r... Closed
Requires
is required by QFJ-782 Get rid of cyclic package dependencies Open
is required by QFJ-599 make quickfixj artifacts into osgi bu... Closed

 Description   

Things which have been done on the ant build in the meantime and which need to be considered:

  • UTF-8 encoding
  • compiler level JDK 6
  • ...


 Comments   
Comment by Toli Kuznets [ 19/Jan/10 ]

Steve,
Marketcetera is all SVN-based, let me know if you need some help or want me to take a first stab at this.

Comment by Steve Bate [ 05/Apr/10 ]

I've made changes to the project structure to make it more Maven-like. I've attempted a Maven conversion and have run into a couple of issues. The first issue is that our distribution preparation process is somewhat complex and not a great fit for Maven's assembly module. The other issue is that we cannot publish the QFJ libraries to the Maven central repository because we depend on some libraries (proxool 0.9.1 and Sleepycat JE) that are not in that repository. However, we could run our own repository on quickfixj.org to workaround that issue.

In fact, we can still post QFJ to our own repository if we'd like, even without a Maven build. Another option is to use Ivy for dependency management and then generate the QFJ POMs from that tool.

Comment by Sergey Ivanov [ 18/Apr/10 ]

Steve,

I am currently working in my spare time on a maven plugin for message source generation from a dictionary (I started by taking the code from MessageCodeGenerator and transforming it into a Maven2 mojo). Once it is completed, I shall be happy to contribute it to QuickFix/J project under your licence. It will (hopefully) make it easier to mavenise QuickFix/J build.

Comment by Steve Bate [ 18/Apr/10 ]

Sounds great. Thanks.

Comment by Claudio Bantaloukas [ 14/Sep/10 ]

I packaged the code generator as a maven project.

Sources are from the QFJ 1.5.0 release. The main stumbling block is that the xslt engine cannot load resources directly so I had to copy paste the copyright info inside the xslt file.

Apart from that, the code is an adaptation of the castor plugin.

Once installed, it can be added to the pom with the following snippet

<plugin>
<groupId>quickfixj</groupId>
<artifactId>codegenerator</artifactId>
<version>0.0.1-SNAPSHOT</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<dictFile>src/main/resources/custom-fix-dict.xml</dictFile>
<packaging>com.myapp.fix</packaging>
<fieldPackage>com.myapp.fix.field</fieldPackage>
<!-- optional configs schemaDirectory, outputDirectory, decimal, orderedFields -->
</configuration>
</execution>
</executions>
</plugin>

Of course the generated projects require proper qfj library dependencies but hey, it's a start!

Comment by Claudio Bantaloukas [ 24/Jan/11 ]

I have a working build that mirrors trunk under subversion branch QFJ-499

Can someone help me test on a machine != mine?

Thanks!

Comment by Jim Scott [ 27/Apr/11 ]

I am attaching everything that I have done to mavenize quickfixj. I have left some of the files for the different subprojects in place just to show where the files go, but I deleted most of them to not have a huge zip file. I would happily post my entire copy of the 1.5 (mavenized) code base if requested.

  • I could not get the maven jalopy plugin to work, so this build will not beautify the generated code.
  • I could not find a plugin that would work anywhere near as nicely as globmap from ant to check if the generated sources are up-to-date, but it will check (although far from perfect).
  • The maven project (surefire plugin) defines the path to the test resources via system properties.
  • There are diff files for the very few changes I had to make to the tests to make them work in maven.
  • This mavenization does NOT accomodate for the jdk1.4 build from ant.
  • This mavenization does NOT accomodate for the .NET build from ant.
  • The only test I could not get to work (which is marked as exclude from testing) is quickfix/SLF4JLogTest.java

This mavenization does generate all artifacts as equivalent or better to what the current ant build generates. I say or better because certain things like the manifest file is customized within each jar. Just little things like that.

The assembly that I built can be modified very simply to produce zip as well as tar.gz.

This build also generates the source jars and javadocs to check into the maven artifact repository. So, anyone depending on the binary via maven will automatically pick up the source and javadocs.

To generate the javadocs run -PRelease and to skip running tests add -DskipTests (buids quite fast without javadocs or tests running). If you want to force the build not to generate the code use -Dskip.exec=true

All artifacts also have the proper dependencies in their pom's. e.g. if you only require fix 42, you can depend on the fix42 jar via the pom and it will automatically pull in fix41, fix40 and fix core.

Comment by Steve Bate [ 03/May/11 ]

Moved issue to 1.6.0 based on discussions from the mailing list.

Comment by Andrei Pozolotin [ 06/May/11 ]

Steve, Claudio:

please consider using sonatype oss:
https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide

for maven snapshot and release staging

thank you

Andrei.

Comment by Andrei Pozolotin [ 06/May/11 ]

please also consider conversion into osgi bundles:
http://www.quickfixj.org/jira/browse/QFJ-599

Comment by Claudio Bantaloukas [ 07/May/11 ]

Andrei, I'd love to use sonatype but we currently depend on oracle's sleepycat packages. Is it possible to upload those too in sonatype? Please see this page for the full list of dependencies. If we can upload them it would be great...

http://quickfixj.svn.sourceforge.net/viewvc/quickfixj/branches/QFJ-499/quickfixj-core/pom.xml?revision=997&view=markup

Comment by Andrei Pozolotin [ 07/May/11 ]

Claudio:

1) yes it is possible to upload non-publicly available packages to sonatype oss;

2) in case of bdb, there is no need to; bdb is available from public repo:

<repositories>
<repository>
<id>oracleReleases</id>
<name>Oracle Released Java Packages</name>
<url>http://download.oracle.com/maven</url>
<layout>default</layout>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>com.sleepycat</groupId>
<artifactId>je</artifactId>
<version>4.1.7</version>
<optional>true</optional>
</dependency>
</dependencies>

Andrei.

Comment by Andrei Pozolotin [ 07/May/11 ]

http://www.oracle.com/technetwork/database/berkeleydb/downloads/maven-087630.html

Comment by Andrei Pozolotin [ 07/May/11 ]

http://search.maven.org/#search|ga|1|je

Comment by Jim Scott [ 07/May/11 ]

I have not been able to get to the oracle maven repo in quite a long time and this still doesn't seem to work ..

If you notice in the pom I submitted I already have all the dependencies accounted for including sleepycat.

This is in the central repository:
http://repo1.maven.org/maven2/berkeleydb/je/
<dependency>
<groupId>berkeleydb</groupId>
<artifactId>je</artifactId>
<version>2.1.30</version>
<optional>true</optional>
</dependency>

Comment by Andy Flury [ 27/Jul/12 ]

is there any time schedule for finishing the mavenization? Would be great to have QFJ available from maven central or sonatype oss

Comment by Ryan Lea [ 07/Mar/13 ]

+1.

I would be more than happy to help out in any way to assist in this process as well.

Comment by Christoph John [ 09/Dec/13 ]

Hi, anyone of you guys willing to push this further? Thanks

Comment by Claudio Bantaloukas [ 10/Dec/13 ]

I'm afraid I cannot work on this right now, but if you have the time, feel free to check out the work I did on branch 499. Unfortunately it has not received attention in the last 3 years...

The new url is:
http://sourceforge.net/p/quickfixj/code/HEAD/tree/branches/QFJ-499/

Comment by Christoph John [ 17/Feb/14 ]

Hi Claudio, thanks for your contributions on this. I found it very useful. Will also check the changes done by Jim Scott.

Comment by amichair [ 09/Jun/14 ]

Thanks everyone for your contributions - I rebased Claudio's branch, modified and updated it, and added a bunch of further improvements, incorporating stuff from the other patches as well. This was done on the QFJ-499-revisited branch, now merged into master.

Generated at Sat Nov 23 08:44:57 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.