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/
Related
I am trying to import a library in Maven which is Kotlin Multiplatform.
This is it's Github repo (does not actually matter much of course)
Point is, it says it can be imported in with this dependency for Gradle:
dependencies {
implementation("com.github.ajalt.colormath:colormath:2.0.0")
}
Obviously, just converting it to Maven does not work:
<dependencies>
...
<dependency>
<groupId>com.github.ajalt.colormath</groupId>
<artifactId>colormath</artifactId>
<version>2.0.0</version>
<type>jar</type>
</dependency>
</dependencies>
So I added it's pom to the project as this answer explains it:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.github.ajalt.colormath</groupId>
<artifactId>colormath</artifactId>
<version>2.0.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
This dependency is resolved (it can be only resolved as pom type. Then I add it as dependency:
<dependencies>
...
<dependency>
<groupId>com.github.ajalt.colormath</groupId>
<artifactId>colormath</artifactId>
<version>2.0.0</version>
<type>jar</type>
</dependency>
</dependencies>
It still cannot find it.
I also added the repo1, because I did not see where Maven was looking for this artifact:
<repositories>
<repository>
<id>central</id>
<name>Central Repository</name>
<url>https://repo1.maven.org/maven2</url>
</repository>
</repositories>
But still no success. I don't understand why it's not working.
The code can be found in the repo1, but Maven does not resolve it.
This must be a very simple thing I am not understanding here, please help.
The link to the Maven Central from GitHub points to a bare POM artifact, without any dependencies and/or attached JARs.
It looks like Kotlin MP uploads JVM-specific artifacts with a different artifactId - colormath-jvm in this case. Please check corresponding directory in the Maven Central.
I suggest using following dependency declaration in the POM:
<groupId>com.github.ajalt.colormath</groupId>
<artifactId>colormath-jvm</artifactId>
<version>2.0.0</version>
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>
I'm using this Guide for adding MapDb to my project.
i'm trying to make a simple user registration but i don't understand where and how i can put the lib inside my project!
Where include this code
<dependency>
<groupId>org.mapdb</groupId>
<artifactId>mapdb</artifactId>
<version>VERSION</version>
</dependency>
and this code
<repositories>
<repository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.mapdb</groupId>
<artifactId>mapdb</artifactId>
<version>VERSION</version>
</dependency>
</dependencies>
i'm new with GWT and MapDB and if someone can tell me how put the libraries of MapDB with all steps it's can be very grateful!
After that i manage the data store/retrieve in the server gwt application?
While this is a very old question, I'll reply in case it's still helpful to you.
The XML configuration code you've quoted above should be inserted in a Maven POM file. Maven is a configuration management tool for Java-based projects.
If you aren't using or don't want to start using Maven, you can download the jar from Maven central and add it manually to your project.
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.
Is there a public Maven repository that contains spring-core 3 yet?
I can find 2.5.4 all day long but not 3. If there answer is yes, please include the location in the answer.
You can get the milestones and release candidates from Spring's Maven repository. The repository is difficult to browse, but the files are there, e.g. the spring-core 3.0.0.RC1 pom
Here is an example repository declaration and dependency:
<repositories>
<repository>
<id>springsource maven repo</id>
<url>http://maven.springframework.org/milestone</url>
</repository>
</repositories>
...
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>3.0.0.RC1</version>
</dependency>
</dependencies>
Since the question was asked, the Spring Enterprise Bundle Repository has been put online and is easier to browse.
Browse by Library, and then by Spring Framework, and you'll find what you're looking for.
<repository>
<id>com.springsource.repository.bundles.release</id>
<name>SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases</name>
<url>http://repository.springsource.com/maven/bundles/release</url>
</repository>
...
<dependency>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.core</artifactId>
<version>3.0.2.RELEASE</version>
</dependency>