[QFJ-884] quickfixj-messages-fix44 is including quickfixj-messages-all Created: 25/Mar/16  Updated: 13/Dec/16  Resolved: 30/Apr/16

Status: Closed
Project: QuickFIX/J
Component/s: Engine, Message Generation
Affects Version/s: 1.6.2
Fix Version/s: 1.6.3

Type: Bug Priority: Major
Reporter: Guido Medina Assignee: Guido Medina
Resolution: Fixed Votes: 0
Labels: QuickfixJ


 Description   

Dependency quickfixj-messages-fix44 is including quickfixj-messages-all, this wasn't like that before so I wonder if the generator was broken during latest commits.



 Comments   
Comment by Guido Medina [ 25/Mar/16 ]

I had to do this to fix it when I noticed, kind of heavy dependency to add all messages (21mb)

{{
<!-- QuickFixJ-->
<dependency>
<groupId>org.quickfixj</groupId>
<artifactId>quickfixj-core</artifactId>
<version>$

{quickfixj.version}</version>
</dependency>
<dependency>
<groupId>org.quickfixj</groupId>
<artifactId>quickfixj-messages-fix44</artifactId>
<version>${quickfixj.version}

</version>
<exclusions>
<exclusion>
<artifactId>quickfixj-messages-all</artifactId>
<groupId>org.quickfixj</groupId>
</exclusion>
</exclusions>
</dependency>
}}

Comment by Guido Medina [ 26/Mar/16 ]

The following commits totally went back in time with the pom composition:

  • 1018578fda5d8316f9a0480ca26348c6e2146508
  • d30acc75f873225d230220a481eeff33a8f8f240

First it changed the distribution from bundle to jar and secondly it introduced quickfixj-messages-all as a dependency of every individual quickfixj-message-fixXX dependency, I tried to fix it but so many things were changed that I honestly don't know what to do.

Comment by Guido Medina [ 26/Mar/16 ]

I'm working on a PR but it will need more attention later as I think the poms were a bit screwed up, maybe I'm wrong.

Comment by ManuReno [ 29/Mar/16 ]

Hi,

Dependancy to message-all has been introduced in QFJ-855 so that all message source files are merged and then compiled before they are JARed in order, to reproduce the packaging behavior that existed in the previous ant build.
Merging the source of all messages before compilation is required since some FIX messages type differ from one FIX spec to another : messagexx.jar are thus not inter-changeable if built independantly.

Although this dependancy is not a maven best practice, the jar themselves should be OK thanks to the following block in the messagexx/pom.xml (example for fix44):

<plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <groupId>org.apache.maven.plugins</groupId>
                <version>2.6</version>
                <configuration>
                    <classesDirectory>${project.basedir}/../quickfixj-messages-all/target/classes/</classesDirectory>
                    <includes>
                        <include>FIX44.xml</include>
                        <include>FIX44.modified.xml</include>
                        <include>quickfix/fix44/**</include>
                        <include>quickfix/field/**</include>
                    </includes>
                    <archive> 
                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                    </archive>
                </configuration>
            </plugin>

Looking again a this, a dependancy to the core module may nevertheless replace the dependancy to message-all if the <classesDirectory> of the jar plugin configuration is also changed to point to :

<classesDirectory>${project.basedir}/../../quickfixj-core/target/classes/</classesDirectory>

The code generation may then also be removed from the message-all, thus ensuring that messages are compiled only once and this would also save build time.

Generated at Sat Nov 23 07:17:03 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.