I am trying to access DB2 tables in a java project. I am able to access the tables when I manually added the jar files - db2jcc4.jar and db2jcc_license_cisuz.jar. No issues in accessing the tables.
But when I try to add these jar files through Maven, they won't add to the project.
<dependency>
<groupId>com.ibm.db2</groupId>
<artifactId>db2jcc4</artifactId>
<version>9.7.0.4</version>
</dependency>
Error Message - Missing artifact id.
Also, the latest db2jcc4.jar files (Version 11.1) are not present in Maven repository. Is there any other place I can access it from?
You have to download the right driver from IBM.
http://www-01.ibm.com/support/docview.wss?uid=swg21363866
Then install it to your local maven repository
http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html
As written in maven central repository the artifact is in another repo.
Add it to your pom and it will work.
<repositories>
<repository>
<id>Alfresco</id>
<name>Alfresco</name>
<url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
</repository>
</repositories>
Assuming that , using share drive is the option to go.
<dependency>
<groupId>com.ibm.db2.jcc</groupId>
<artifactId>licences</artifactId>
<version>0.7</version> <!-- Adjust this properly -->
<scope>system</scope>
<systemPath>R:\JDBC drivers\IBM DB2_db2_2.2.0.v20130525_0720\db2jcc_license_cisuz.jar</systemPath>
</dependency>
According to maven central repository the artifact is in another repository. Include these two in your pom.xml and it should work:
<dependency>
<groupId>com.ibm.db2.jcc</groupId>
<artifactId>db2jcc4</artifactId>
<version>10.1</version>
</dependency>
<repositories>
<repository>
<id>com.ibm.db2.jcc</id>
<url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
</repository>
</repositories>
Related
I need to work with be.ac.ulg.montefiore.run.jahmm package for Hidden Markov Models in java.
My project is a mevenized project so I need to use the corresponding dependency.
<dependency>
<groupId>be.ac.ulg.montefiore.run.jahmm</groupId>
<artifactId>jahmm</artifactId>
<version>0.6.2</version>
</dependency>
The above dependency is not being resolved in my project.
Does anyone know how to help me?
Thank you.
Your dependency is not in the Maven Central Repository.
Find out the repository used by the authors to publish their artifacts and add this repository to your POM or to your settings.xml.
If it is not published to the usual online maven repositories, you will need to install it on your local machine first.
So download the sources, go to the top level and do the usual
mvn install
Once you installed jahmm locally, your project can resolve it from your maven cache.
Adding this repository should do the trick:
<repositories>
<repository>
<id>jsi</id>
<url>http://repo.springsource.org/libs-release-remote</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>be.ac.ulg.montefiore.run.jahmm</groupId>
<artifactId>jahmm</artifactId>
<version>0.6.2</version>
</dependency>
...
</dependencies>
How can I install caldav4j from central maven repository?
I've added dependency as seen below to pom file, but package is not downloaded
<dependency>
<groupId>org.osaf</groupId>
<artifactId>caldav4j</artifactId>
<version>0.7</version>
</dependency>
Unfortunetly caldav4j is not in the central repository so you have to add external repository to your pom file. According to caldav4j FAQ repository address is at: https://caldav4j.googlecode.com/svn/maven/ so here is what you should add to pom file:
<repositories>
<repository>
<id>org.osaf.caldav4j</id>
<name>org.osaf.caldav4j</name>
<url>https://caldav4j.googlecode.com/svn/maven/</url>
</repository>
</repositories>
I developed an java web-app application with spring and vaadin, in this application, I used some addons like easyuploads and wizards-for-vaadin. Then i added the following configuration in my pom.xml.
<dependency>
<groupId>org.vaadin.addon</groupId>
<artifactId>easyuploads</artifactId>
<version>7.0.1</version>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>wizards-for-vaadin</artifactId>
<version>1.1.0</version>
</dependency>
<!-- Add-On Repository -->
<repositories>
<repository>
<id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository>
</repositories>
Now I'm installing artifactory (for the first time) like tool of repository managment and I thought to add a remote repository for the vaadin-addons. But this not work:
How can I solve it ?
Is this the correct way?
Their repository is not browsable, that's why you get the 404 on testing. You can disregard the error, if should resolve the artifacts just fine (assuming the coordinates are correct).
We found out by accident that there seems to exist a browsable Nexus repository now: http://vaadin.com/nexus/content/repositories/vaadin-addons/
We have successfully included it as a proxy repository in our local Nexus installation.
I have the following JAR that my project needs so I added it to my pom.xml...
<dependency>
<groupId>org.reficio</groupId>
<artifactId>soap-builder</artifactId>
<version>1.0.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.apache.ws.commons.schema</groupId>
<artifactId>XmlSchema</artifactId>
</exclusion>
</exclusions>
</dependency>
But when I run Maven it tries to download from various repos and finally fails. It only creates a "lastUpdated" file whose contents are below..
http\://repository.jboss.org/nexus/content/groups/public-jboss/.lastUpdated=1392941827625
http\://www.terracotta.org/download/reflector/releases/.lastUpdated=1392941828195
Does anyone have any suggestions? Is this JAR simply not there anymore?
Thanks.
That artefact isn't in Maven Central (or other default repo) and so Maven won't find it automatically. The reficio/soap-ws page on Github explains:
soap-ws is not yet located in the central maven repo, thus you also have to add an additional repository to your config.
<repositories>
<repository>
<id>reficio</id>
<url>http://repo.reficio.org/maven/</url>
</repository>
</repositories>
I installed Eclipse Helios with the m2eclipse maven plugin.
I want to create an application using JPA. So, what I do is: New > Maven Project then I select the maven default archetype.
The problem is that I want to add the "org.eclipse.persistence" dependency that I can't find.
Where is it? Can we add it manually? Should I update a sort of "repository"?
Then, is it the right archetype that I'm using?
EclipseLink is not available in Maven central repository, you need to add its repository manually. For example, to use the "full" version of EclipseLink 2.0 (you didn't mention the artifact you're looking for):
<dependencies>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
...
</dependency>
<dependencies>
...
<repositories>
<repository>
<id>EclipseLink Repo</id>
<url>http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo</url>
</repository>
...
</repositories>
This is documented in the EclipseLink/Maven page.
Regarding the archetype you're using, it's impossible to answer without more details on the kind of project you want to create. And anyway, you can always modify the POM after the facts.
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
...
<repositories>
<repository>
<url>http://repo.maven.apache.org/maven2</url>
</repository>
</repositories>
You can check below link. I found eclipse JARs on this link.
However, no idea about how to add it on Nexus.
http://dev.nightlabs.org/maven-repository/repo/