How to import latest Ignite Scheduler repository - maven

I would like to import the Scheduler repository in my project, and I have add the dependency in pom as below
<dependency>
<groupId>org.apache.ignite</groupId>
<artifactId>ignite-schedule</artifactId>
<version>2.1.0</version>
</dependency>
But it reports error to load it.
Anyone can help me out, much appreciate for any hints.

ignite-schedule is optional LGPL dependency and it's not published to apache maven repo.
You can build it by yourself from code or use GridGain maven repository to get it.
Here is information about it:
https://ignite.apache.org/download.cgi#3rdparty

Related

How to incorporate BIRT 4.9.0 into POM?

Scenario:
I am refactoring my application to work under java 17. Birt runtime 3.7.x is embedded in my application.
In updating to point to birt 4.9.0, I have updated my pom as follows:
<dependency>
<groupId>org.eclipse.birt</groupId>
<artifactId>birt-runtime</artifactId>
<version>4.9.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.eclipse.birt/birt-runtime-osgi -->
<dependency>
<groupId>org.eclipse.birt</groupId>
<artifactId>birt-runtime-osgi</artifactId>
<version>4.9.0</version>
</dependency>
When I build, I get the exception
org.eclipse.birt:birt-runtime:jar:4.9.0 was not found in https://repo1.maven.org/maven2 during a previous attempt
I have deleted and rebuilt my local .m2 directory.
When I dig around the maven repository I find the file at https://repo1.maven.org/maven2/org/eclipse/birt/birt-runtime/4.9.0/
This link (BiRT latest Runtime as one Maven Dependency for Eclipse) was resolved by manually downloading the file and pointing to a local copy. I'd prefer to avoid that, since Maven is all about avoiding that kind of scenario.
I suspect there's something in the maven path I am missing.
Thank you in advance.

NoClassDefFoundError BytecodeVisitor when deploying my own Java rule implementation

I have created a new rule implementation in Java. The POM includes the following:
<dependency>
<groupId>org.codehaus.sonar</groupId>
<artifactId>sonar-plugin-api</artifactId>
<version>4.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.codehaus.sonar-plugins.java</groupId>
<artifactId>sonar-java-plugin</artifactId>
<type>sonar-plugin</type>
<version>3.1</version>
<scope>provided</scope>
</dependency>
The new rule extends
org.sonar.java.bytecode.visitor.BytecodeVisitor
which IntelliJ IDEA resolves as being in
org.codehaus.sonar-plugins.java:java-squid:3.1
However, upon deploying the plugin artifact to a brand new installation of Sonar 5.1.2 I get
java.lang.NoClassDefFoundError: org/sonar/java/bytecode/visitor/BytecodeVisitor
To deploy, I put the plugin.jar into the "plugins/downloads" folder and attempt to start Sonar,
Can someone confirm that I am using the correct dependencies for a plugin targeting Sonar 5.1.2 ?
I observe that my plugin has no META-INF/lib/, whereas some larger plugins do include JAR files in that location.
Any help greatly appreciated.
Thanks, Robin.
I was completely off the mark.
I was trying to deploy a Rule as if it was a Plugin.
The correct structure is described here:
http://docs.sonarqube.org/display/DEV/Developing+Plugins

can't find valid maven repository for hibernate-search-4.2.0.Final.jar

I use maven.
I want to use the last version of hibernate-search : 4.2.0.Final
I was under 3.3.0.Final
I can't a valid maven repository for this version.
Which maven repository I have to use to get this version of hibernate search ?
Because if you go there :
https://repository.jboss.org/nexus/index.html#nexus-search;gav~org.hibernate~hibernate-search~~~~kw,versionexpand
You'll find the version I need, but when I download hibernate-search-4.2.0.Final.jar and I unarchive it, I see there is only META-INF folder but no class in the jar : the jar is invalid !
Thanks for your help !
The hibernate-search project changed their artifact structure to use hibernate-search-orm instead of hibernate-search. Hibernate-search is now just a jar that declares a dependency on hibernate-search-orm which maven will resolve transitively and include in your project.
See the upgrade notes here - https://community.jboss.org/wiki/HibernateSearchMigrationGuide
More specifically this note - https://community.jboss.org/wiki/HibernateSearchMigrationGuide#New_jars_Maven_modules_reorganization
If you look in the pom for hibernate search you will see the dependency - this should all be resolved from central without any additional repository.
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>hibernate-search-orm</artifactId>
<version>${project.version}</version>
</dependency>
The best repository for JBoss artifacts is: https://repository.jboss.org/nexus/content/groups/public-jboss/
The available repositories are explained in their wiki: https://community.jboss.org/wiki/MavenRepository
The group public-jboss contains all releases and third-party artifacts required to by JBoss artifacts.
Isn't maven central good enough ?
http://search.maven.org/#search|ga|1|hibernate-search
Since this is a JBoss project, you can get newest builds from our Nexus repository. Here is how to configure it in your ~/.m2/settings.xml. Your pom.xml then should contain this dependecy.
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search</artifactId>
<version>4.2.0.Final</version>
</dependency>

Where to find Maven CXF 2.2.6 jar?

I'm converting an ANT project that uses CXF into a Maven one. The problem is that this projects depends on CXF v2.2.6 and when I go to here or even here, there is no jar to download. I don't know what to do. I have the JAR but I want to use the Maven features like dependency management.
Thanks for your help
If using Ant, it likely used the cxf-bundle jar that pretty much contains all of CXF. You can just add:
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-bundle</artifactId>
<version>2.2.6</version>
</dependency>
to your new pom and it would get that jar along with all the dependencies that it would require.
It is available at Maven central. Use repo1.maven.org as your repository.
Either install it manually to your local repository or use a repository manager like Nexus.

Choosing dependency version in maven and maven plugin

I have a maven plugin which is using hsqldb 1.8.0.10. In my pom.xml from the plugin, it is declared like this:
<dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.8.0.10</version>
</dependency>
But if I run that plugin from another maven project, and that project has a newer version of hsqldb (for instance 1.9.0), how can I configure my plugin that he will use the newest version of hsqldb, without changing it's pom.xml?
And is it possible to do this the other way around as well? If my other maven project uses hsqldb 1.7.0 (for instance), that he will use the 1.8.0.10 version which is specified in the maven plugin itself?
I hope someone can answer my question.
Kind regards,
Walle
Your main question is possible, but it might not work properly if the plugin doesn't work with the newer code for any reason.
A plugin can have it's own personal dependencies section, and will use standard Maven dependency resolution, choosing the highest version requested. So, you can do
<plugin>
<groupId>some.group.id</groupId>
<artifactId>some.artifact.id</artifactId>
<version>someversion</version>
<dependencies>
<dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.9.0</version>
</dependency>
</dependencies>
</plugin>
I don't think going the other way around is possible, though.
use properties place holder for the version, say ${hsqldb.version} then declare in different project pom the version you want to put in it

Resources