Search code examples
javaeclipsemavenvisual-studio-codequickfixj

Quickfixj setting up sources for development - Could not find artifact org.quickfixj:quickfixj-codegenerator


I can't import successfully the QuickFIX/J project into any of my IDEs, I've tried with Eclipse, VS Code and IntelliJ.

Following the QuickFIX/J project instructions, first I build the project with:

$ mvn clean package -Dmaven.javadoc.skip=true -DskipTests -PskipBundlePlugin

Everything goes well in the build:

[INFO] Building zip: /home/helesto/kdi/github/quickfixj/quickfixj-distribution/target/org.quickfixj-2.2.1-SNAPSHOT-bin.zip
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for QuickFIX/J Parent 2.2.1-SNAPSHOT:
[INFO] 
[INFO] QuickFIX/J Parent .................................. SUCCESS [  4.654 s]
[INFO] QuickFIX/J Code Generator Maven Plugin ............. SUCCESS [ 28.844 s]
[INFO] QuickFIX/J Dictionary Generator .................... SUCCESS [  1.178 s]
[INFO] QuickFIX/J Core engine ............................. SUCCESS [06:51 min]
[INFO] QuickFIX/J Message classes for various FIX specs ... SUCCESS [  0.003 s]
[INFO] QuickFIX/J Message classes for FIX 4.0 ............. SUCCESS [  1.028 s]
[INFO] QuickFIX/J Message classes for FIX 4.1 ............. SUCCESS [  0.835 s]
[INFO] QuickFIX/J Message classes for FIX 4.2 ............. SUCCESS [  0.874 s]
[INFO] QuickFIX/J Message classes for FIX 4.3 ............. SUCCESS [  0.839 s]
[INFO] QuickFIX/J Message classes for FIX 4.4 ............. SUCCESS [  1.082 s]
[INFO] QuickFIX/J Message classes for FIX 5.0 ............. SUCCESS [  1.349 s]
[INFO] QuickFIX/J Message classes for FIX 5.0 SP1 ......... SUCCESS [  1.283 s]
[INFO] QuickFIX/J Message classes for FIX 5.0 SP2 ......... SUCCESS [  1.215 s]
[INFO] QuickFIX/J Message classes for FIXT 1.1 ............ SUCCESS [  0.710 s]
[INFO] QuickFIX/J Message classes for all FIX specs ....... SUCCESS [  2.294 s]
[INFO] QuickFIX/J Examples ................................ SUCCESS [  0.004 s]
[INFO] QuickFIX/J Examples - Executor ..................... SUCCESS [  7.030 s]
[INFO] QuickFIX/J Examples - Order Match .................. SUCCESS [  4.830 s]
[INFO] QuickFIX/J Examples - Banzai ....................... SUCCESS [  5.036 s]
[INFO] QuickFIX/J All runtime modules ..................... SUCCESS [ 18.797 s]
[INFO] QuickFIX/J Distribution ............................ SUCCESS [ 16.725 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  08:31 min
[INFO] Finished at: 2021-01-15T19:11:18-03:00
[INFO] ------------------------------------------------------------------------

Then I try to import it into the IDEs and something goes wrong with the quickfixj-codegenerator.

I've tried some things that I've found on the internet, but nothing solve my problem.

I'll be very happy if someone could help me :)

My machine

Maven

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /kdi/maven
Java version: 11.0.9.1, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.8.0-36-generic", arch: "amd64", family: "unix"

Java

openjdk version "11.0.9.1" 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)
javac 11.0.9.1

OS

Linux machine 5.8.0-36-generic #40~20.04.1-Ubuntu SMP Wed Jan 6 10:15:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

QuickFIX/J build instructions

At https://www.quickfixj.org/usermanual/2.1.0/installation.html#dependencies I've found:

IDE support: There are Eclipse and Netbeans project definition files in the top-level directory of the checked out directory. When the project is first created, it will not have the generated message classes and compile errors will occur! Best is to compile once on the command line before importing the project into the IDE.

I've searched the project documentation and I didn't find nothing about this issue.

Eclipse - Error

Version: 2020-12 (4.18.0)

Reports the following error when I import the project:

No marketplace entries found to handle maven-plugin-plugin:3.2:descriptor in Eclipse.  Please see Help for more information.
No marketplace entries found to handle Execution default-descriptor, in /quickfixj-codegenerator/pom.xml in Eclipse.  Please see Help for more information

After importing, the /quickfixj-codegenerator/pom.xml says that:

Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-plugin-plugin:3.2:descriptor (execution: default-descriptor, phase: process-classes)

VS Code - Error

Version 1.52.1

Error:

Could not find artifact org.quickfixj:quickfixj-codegenerator:jar:2.2.1-SNAPSHOT

IntelliJ - Error

Version Community 2020.3.2

Error:

Cannot resolve plugin org.quickfixj:quickfixj-codegenerator:2.2.1-SNAPSHOT
Cannot resolve plugin org.apache.maven.plugins:maven-install-plugin:<unknown>

QuickFIX/J email support - same issue as mine

The same issue was reported on the email of support discussion of Quickfixj:

On the email thread, I didn't find the answer to this problem.

The problem was reported on 2019, March. The only difference for me is that the Quick/FIXJ is now in a newer version.

Quoting the same problem of the email:

I'm trying to create a development environment for quickfixj on eclipse. I cloned the repository, downloaded the sources, and ran the command:

mvn clean package -Dmaven.javadoc.skip=true -DskipTests -PskipBundlePlugin

just as suggested on the website. This part worked without any errors.

Afterwards, I try to import the projects in eclipse. The projects are identified as maven projects and added to the workspace, but when compiling, after the import, it shows the error: Could not find artifact org.quickfixj:quickfixj-codegenerator:jar:2.2.0-SNAPSHOT Which does not allow quickfixj-core to build, which in turn does not allow any other projects to compile, since they all depend on the core project.

I have tried a suggestion I found on the net, to run mvn eclipse:eclipse to help build the eclipse projects but by the time it reaches the core engine project, it throws the same error: [ERROR] Plugin org.quickfixj:quickfixj-codegenerator:2.2.0-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.quickfixj:quickfixj-codegenerator:jar:2.2.0-SNAPSHOT -> [Help 1]


Solution

  • I was able to successfully import the project into IntelliJ and Netbeans using the help of @ChristophJohn.

    First, run:

    mvn clean install -Dmaven.javadoc.skip=true -DskipTests -PskipBundlePlugin
    

    And then just import it to IntelliJ or Netbeans.

    I wasn't able to import it to Eclipse or VS Code. But, as this worked with IntelliJ and Netbeans, for me it is enough.