Cannot resolve Derby 10.5.3.0 dependancies with Maven - maven

I'm trying to build my client application to include Derby 10.5.3.0 in a maven build. My pom.xml dependancy is :
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.5.3.0</version>
<scope>compile</scope>
</dependency>
I get this error during the build:
Could not resolve dependencies for project DERBY:DerbyDemo:jar:0.0.1-SNAPSHOT: Failed to collect dependencies for [org.apache.derby:derby:jar:10.5.3.0 (compile)]
Other versions of Derby build fine. I wanted to use 10.5.3.0 in the build to stay in sync with the version of the server, which is the Oracle Download of Java DB 10.5.3.0

For reference sake, at post time version 10.9.1.0 works:
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.9.1.0</version>
</dependency>
I just picked the latest version from the Derby site

That's a fairly old version of Derby. Not all versions of Derby are stored in the master Maven repositories. Can you use a newer version?

Related

maven Failed to collect dependencies for flapdoodle.embed.mongo

I have an issue locally with maven range. Maven failed to collect dependencies for below dependency. But in deed, there is version for 3.4.6 which was downloaded already.
May u have any hints?
<dependency>
<groupId>de.flapdoodle.embed</groupId>
<artifactId>de.flapdoodle.embed.mongo</artifactId>
<version>[3.4.6,3.5.0)</version>
<scope>test</scope>
</dependency>
Check your internet connection also see if you need to configure proxy for your internet
I had similar issue and this fixed it.

Dependency for driver-class com.ibm.db2.jcc.DB2Driver is missing

i added the followinig dependency for my project to connect to the database:
<dependency>
<groupId>com.ibm.db2.jcc</groupId>
<artifactId>db2jcc4</artifactId>
<version>4.19.26</version>
</dependency>
Since the connection to my database gets refused (ERRORCODE=-4499, SQLSTATE=08001) i tried to add a newer driver
<dependency>
<groupId>com.ibm.db2.jcc</groupId>
<artifactId>db2jcc4</artifactId>
<version>11.1</version>
<scope>system</scope>
<systemPath>${basedir}/lib/com/ibm/db2/jcc/db2jcc4/11.1/db2jcc4-11.1.jar</systemPath>
</dependency>
I installed the jar with the maven install comand in my project directory. It created a lib folder with everything in it.
However i now get the following error:
Dependency for driver-class com.ibm.db2.jcc.DB2Driver is missing!
The maven project is definitly able to locate the jar-file.
There is a second dependency you are missing :
<dependency>
<groupId>com.ibm.db2</groupId>
<artifactId>db2jcc_license_cu</artifactId>
<version>11.1</version>
<systemPath>${basedir}/lib/com/ibm/db2/jcc/db2jcc4/11.1/db2jcc_license_cu.jar</systemPath>
</dependency>
Found on nacho4d's blog

JBoss EJB Remote Client version corresponding to server version

In the Readme-File of the jboss-client, it says:
Maven users should not use this jar, but should use the following BOM dependencies instead [...]
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-ejb-client-bom</artifactId>
<type>pom</type>
</dependency>
In the Maven Repository, there are several different versions of jboss-as-ejb-client-bom. Unfortunately, there is no indication in the readme, which version of this artifact to use.
When using JBoss libraries, I usually declare this dependency in the pom.xml's dependencyManagement section in the version corresponding to JBoss server version:
<dependency>
<groupId>org.jboss.bom</groupId>
<artifactId>eap-runtime-artifacts</artifactId>
<version>7.0.0.GA</version>
<type>pom</type>
</dependency>
In the eap-runtime-artifacts BOM, the jboss-as-ejb-client-bom is not managed, thus I need to specify a version. As there is also no version 7.0.0.GA of the client, I am not sure which version to use. So, my questions basically is:
Do I have to use a specific version of jboss-client (artifact jboss-as-ejb-client-bom), depending on which version of JBoss server (artifact eap-runtime-artifacts) I use? If so, where do I find the corresponding versions of client and server?

No suitable driver found for jdbc (only in jar file)

I'm using netbeans to create a simple java maven application with a very simple JavaDB database connectivity. I've configured the dependencies in maven pom.xml file as follows, and my application works correctly when I run it from the IDE.
pom.xml
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.12.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbyclient</artifactId>
<version>10.12.1.1</version>
</dependency>
Yet when I build the project with dependencies and try to run the final jar, I get the following error.
java.sql.SQLException: No suitable driver found for jdbc:derby://localhost:1527/TestDB
I've even tried copying the derby.jar to the application jar file location. But still the above error appears. I'm not sure what I'm doing wrong.

Is there a maven JBOSS dependency that includes all JBOSS runtime jars?

I have a maven application that will be deployed to JBOSS 5.1 as a war. I want to know how to get it so that Maven can use the JBOSS 5.1 jars (i.e. all the jars in the common/lib folder and any other resources available to JBOSS at runtime) at compile time but not bundle them into the war file.
I thought I could just include some kind of JBOSS dependency with provided scope to do this however I can't find such a dependency. I have done a good bit of searching and can't really find such a dependency. There are a lot of references to pointing to a central JBOSS repository and pulling dependencies from there. I thought there would be just one global dependency that would include all JBOSS runtime jars. Os there such a thing?
If you need more than the standard Java EE API like JBoss packages or resolve some compatibility problems, you can use this dependency :
For JBoss / Java EE 7 Specification APIs
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-7.0</artifactId>
<version>1.0.1.Final</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
For JBoss / Java EE 6 Specification APIs
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>3.0.2.Final</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
For JBoss WildFly 8.2.0.Final complete runtime dependencies
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-parent</artifactId>
<version>8.2.0.Final</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
Now, you can also use those POM files to extract the specific dependencies you need.
This could be useful in remote debug time to let your IDE resolve automatically the server dependencies jars and sources currently loaded, or appearing in stacktraces ... in development mode.
In a production MAVEN build, you probably just need this kind of configuration (depending on your JBoss version) :
http://www.mastertheboss.com/jboss-server/wildfly-8/maven-configuration-for-java-ee-7-projects-on-wildfly
Considering JBoss is an EE container, adding the JavaEE dependency should be enough.
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
Scope provided ensures that JBoss's own libraries are used once the application is deployed to the server.

Resources