Maven repository for QuickFIX/J library - maven

I am using QuickFIX/J in the newest version (1.6.0) and want you to ask if you know any Maven repositories to integrate in my pom file?
I could manually add the jar files to my local repository but maybe there is a nicer and quicker way.

QuickFIX/J version 1.6 and newer can now be found in Marketcetera repository.
Add repository to your Maven pom file:
<repositories>
<repository>
<id>marketcetera</id>
<url>http://repo.marketcetera.org/maven</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
And then the artifact:
<dependency>
<groupId>quickfixj</groupId>
<artifactId>quickfixj-all</artifactId>
<version>${quickfix.version}</version>
</dependency>
${quickfix.version} can be 1.6.0, 1.6.1, or 1.7.0-SNAPSHOT, but also older version are available there. They host both floating point-based and BigDecimal-based versions. The default is floating point. To use BigDecimal versions, append '-bd' to the version.
EDIT (13th August '15):
Unfortunately this QuickFIX/J bundle does NOT contain dependent Apache Mina library for network transportation, you have to add also this to your Maven pom file:
<dependency>
<groupId>org.apache.mina</groupId>
<artifactId>mina-core</artifactId>
<version>${apache.mina.version}</version>
</dependency>
where ${apache.mina.version} is actual version of library (these days it's 2.0.9).
Without that you will be getting NoClassDefFound exceptions.
UPDATE (22.7.2016):
Good news!
Since the release of new QuickFIX/J version 1.6.2 the library is now available from official Maven repository so the only thing you need is following artifact in your pom.xml file:
<dependency>
<groupId>org.quickfixj</groupId>
<artifactId>quickfixj-core</artifactId>
<version>1.6.2</version>
</dependency>
More info at official pages.

You can use the Marketcetera repository. Add this to the list of repositories in your POM:
<repositories>
<repository>
<id>MarketceteraRepo</id>
<url>http://repo.marketcetera.org/maven</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
By the way, you could have looked up this information from the QuickFIX/J User Manual.

Marketcetera switched to using org.quickfix for the group ID, so the proper Maven dependency is:
<dependency>
<groupId>org.quickfixj</groupId>
<artifactId>quickfixj-all</artifactId>
<version>1.6.2-bd-SNAPSHOT</version>
</dependency>

Related

Why maven is not able to download "SNAPSHOT" artifacts from azure artifacts repository? (Snapshot translation to timestamp is malfunctioning)

Maven is not able to download artifact when referred by version such as 'XXX-SNAPSHOT' but it is able to download every other dependency from it. It even download the SNAPSHOT if & only if I replace 'SNAPSHOT' by the real timestamp, for example, replace 155-SNAPSHOT by 155-20220224.175558-1.
We are hosting SNAPSHOTS and releases both under the same azur artifact feed. Any advice on how to approach/fix this missing snapshot translation to timestamp?
I wasn't able find the detailed documentation on how this snapshot translation mechanism works on client or server side, can anyone please point it to me?
<dependency>
<groupId>com.st.services.clients</groupId>
<artifactId>st-ccs-web-service</artifactId>
<!-- <version>155-SNAPSHOT</version> --><!-- not works -->
<version>155-20220224.175558-1</version>
</dependency>
<repositories>
<repository>
<name>My Hosted Maven Repo Group</name>
<id>maven-feed</id>
<url>https://pkgs.dev.azure.com/my-org/my-project/_packaging/maven-feed/maven/v1
</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
Not the outcome you were after, but,
Having also tried this myself, I think Azure DevOps simply does not support this.
There are a few aspects of Azure DevOps's Artifacts feature that doesn't entirely align with Maven/how Maven does things. Unfortunately, this appears to be one of them.
(An example of another is the management of timestamped snapshots of the same version as individual versions, which Sonatype Nexus can do but DevOps Artifacts cannot).

Import component from add-on directory

I am using Vaadin version 21.0.7 with Spring Boot and i want to import Paginator add-on.
I have added addon's groupId in applicaton.properties as follows: vaadin.whitelisted-packages=com.test.demo,com.vaadin.componentfactory.
The problem is that i get the following error: Paginator cannot be resolved to a type.
Some questions you may want to update your question with answers to:
Are you using Maven? Gradle? Something else?
JDK version?
Is the error a compile-time one? If so, you should add the full output to your question.
Now, for a potential solution:
Assuming you are using Maven...
(1) Make sure that Maven resolved the dependency.
Your IDE should tell you if not, or you can check your local .m2 directory. On Windows, it is located at ${user.home}. On macOS and most Unix/Linux distributions, it is located at ~. Check .m2/repositories/com/vaadin/componentfactory/paginator/<version>/ and ensure that the JARs were downloaded.
If they were not, make sure you
(a) defined the Vaadin Addons repository in your POM, e.g.,
<repositories>
<repository>
<id>vaadin-addons</id>
<url>https://maven.vaadin.com/vaadin-addons</url>
</repository>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2/</url>
</repository>
</repositories>
(b) and defined the dependency, e.g.,
<dependencies>
<dependency>
<groupId>com.vaadin.componentfactory</groupId>
<artifactId>paginator</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies>
(2) Are you using Jigsaw (Java 9+ modules)?
If you are, make sure you specified the dependency:
module myModule {
requires paginator;
}

Maven: Error resolving version for plugin

I am trying to get Batik working, having not worked with Java much in the last ten years or so and I'm running into problems with Maven being able to find the org.apache.maven.wagon:wagon-ssh-external package.
When I open or try to build the project in Netbeans, it reports the following error:
The project org.freehep:freehep-graphicsio:2.1.1 (/home/glenatron/Projects/batik/freehep-graphicsio/pom.xml) has 1 error
Unresolveable build extension:
Error resolving version for plugin 'org.apache.maven.wagon:wagon-ssh-external' from the repositories [local (/home/glenatron/.m2/repository), freehep-maven (http://java.freehep.org/maven2), central (http://www.ibiblio.org/maven2), Codehaus (http://repository.codehaus.org/), Codehaus Snapshots (http://snapshots.repository.codehaus.org/)]:
Plugin not found in any plugin repository -> [Help 2]
As far as I can tell this is correct, however, I have the following in my pom.xml file for the project:
<repositories>
<repository>
<id>freehep-maven</id>
<name>Maven FreeHEP</name>
<url>http://java.freehep.org/maven2</url>
</repository>
<repository>
<id>maven-apache</id>
<name>Maven Apache</name>
<url>http://repo.maven.apache.org/maven2</url>
</repository>
<repository>
<id>maven1</id>
<name>Maven.org</name>
<url>http://repo1.maven.org/maven2</url>
</repository>
</repositories>
From what I can judge a) that plugin should be available in one of those repositories and b) if they are in the pom.xml file, Maven should be searching them but I can't see any sign of it doing that.
The project I am trying to work with is the FreeHEP EMF driver. The bigger screen solution was to use the unsignposted but much more up to date Github repository version.
It turns out that the solution was in the message after all: Error resolving version for plugin.
So obviously it's not a repository it is a pluginRepository which goes in a different part of pom.xml:
<pluginRepositories>
<pluginRepository>
<id>maven1</id>
<name>Maven.org</name>
<url>http://repo1.maven.org/maven2</url>
</pluginRepository>
</pluginRepositories>
Remove the entries with repo1... cause this is maven Central and used by Maven by default so no need to define it explicit. Furthermore the given freehep.org is also available via Maven Central. So if i see it correct you don't need to define supplemental repositories at all.

Maven can't resolve the dependency it just found

Maven must be losing its mind.
I added a dependency using Netbeans Add Dependency dialog. I searched for jax-rs-ri. It updated the index from central and showed several versions of jax-rs-ri. I selected 1.9.1 and it added this to the pom.xml:
<dependency>
<groupId>com.sun.jersey.ri</groupId>
<artifactId>jax-rs-ri</artifactId>
<version>1.9.1</version>
</dependency>
Looks right, but when I build I get the following error:
Failed to execute goal on project reply-to.test-web:
Could not resolve dependencies for project jms:reply-to.test-web:war:1.0-SNAPSHOT:
Could not find artifact com.sun.jersey.ri:jax-rs-ri:jar:1.10-b03 in
central (http://repo1.maven.org/maven2) -> [Help 1]
I've also tried changing the repository the following with the same results:
<repositories>
<repository>
<id>maven2-repository.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2</url>
<layout>default</layout>
</repository>
</repositories>
This was working earlier today. Did something just get broken with Maven?
In these cases it's worth to check the local repository (usually c:\Users\<username>\.m2\repository\com\sun\jersey\ri\jax-rs-ri or /home/<username>/.m2/repository/com/sun/jersey/jax-rs-ri) and Central:
http://search.maven.org/#artifactdetails|com.sun.jersey.ri|jax-rs-ri|1.9.1|pom
(The important part now is the "Available Downloads" table.)
So, there isn't any jar file just a zip (and the POM). You should use <type>zip</type> in your dependency like this:
<dependency>
<groupId>com.sun.jersey.ri</groupId>
<artifactId>jax-rs-ri</artifactId>
<version>1.9.1</version>
<type>zip</type>
</dependency>
Since it's a zip maybe you want to unpack it. This answer could help: Unzip dependency in maven
Please note that 1.9.1 is not the latest jax-rs-ri version and your Maven uses 1.10-b03. If you want to force it to use 1.9.1 you have to use <version>[1.9.1]</version> inside the dependency tag.

Qi4j maven configuration

I'm currently trying to figure out how Qi4j works. So i decided to start with a simple example. I tried to use the Qi4j lib in my pom.xml and am now facing the problem, that the artifact can't be found. I'm using NetBeans 7.0.1 and my pom.xml parts are shown below:
<repository>
<id>qi4j-official</id>
<url>http://repository.ops4j.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<dependency>
<groupId>org</groupId>
<artifactId>org.qi4j</artifactId>
<version>1.4</version>
</dependency>
I'm i doing something wrong? Thanks a lot.
Qi4j consists of many many artifacts, to keep the total footprint down as most applications won't use all bits and pieces.
<groupId>org.qi4j.core</groupId>
contains the artifacts (as of 1.3)
<artifactId>org.qi4j.core.api</artifactId>
<artifactId>org.qi4j.core.spi</artifactId>
<artifactId>org.qi4j.core.runtime</artifactId>
<artifactId>org.qi4j.core.bootstrap</artifactId>
<artifactId>org.qi4j.core.testsupport</artifactId>
For "compile" scope api and bootstrap should be enough. testsupport is obviously "test" scope and runtime should not be used by your code and only be a "runtime" dependency.
<groupId>org.qi4j.library</groupId>
The Libraries varies greatly in completeness and quality. Extensions can depend on libraries but not the other way around.
<groupId>org.qi4j.extension</groupId>
Extensions implements the slowly growing SPI pluggable functionalities; entity stores, indexing/query and caching. Next release (2.0) will have more extensions for value serialization and others.
Hope that helps, or meet the Qi4j community at the qi4j-dev Google Group for additional support.
Based what i can see in the given repository the groupId and artifactId are completely different...
http://repository.ops4j.org/maven2/org/qi4j/core/org.qi4j.core.spi/1.4/org.qi4j.core.spi-1.4.pom
To learn how to depend on Qi4j in your build see the dedicated how-to that's now present on the Qi4j website: http://qi4j.org/latest/howto-depend-on-qi4j.html
Here are the release and snapshot repositories :
https://repository-qi4j.forge.cloudbees.com/release/
https://repository-qi4j.forge.cloudbees.com/snapshot/
Weekly SNAPSHOTs are uploaded the snapshot repository so you need to add this url as a maven repository :
<repositories>
[...]
<repository>
<id>qi4j-snapshots</id>
<url>https://repository-qi4j.forge.cloudbees.com/snapshot/</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
[...]
</repositories>
And then you can add dependencies to Qi4j:
<dependencies>
[...]
<dependency>
<groupId>org.qi4j.core</groupId>
<artifactId>org.qi4j.core.bootstrap</artifactId>
<version>QI4J_VERSION</version>
</dependency>
<dependency>
<groupId>org.qi4j.core</groupId>
<artifactId>org.qi4j.core.runtime</artifactId>
<version>QI4J_VERSION</version>
</dependency>
[...]
</dependencies>
Where QI4J_VERSION is the version you want to use.

Resources