The dependency I'm using is for Oracle which, reading from another post, is not included in the default maven repo due to legal issues. For this reason I've added the dependency to my local repo using:
mvn install:install-file -Dfile=/home/<myname>/development/Libraries/ojdbc6.jar
-DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.3 -Dpackaging=jar
My problem is that maven is attempting to pull the file from the default remote repo and failing although it was my understanding that the local repo is checked first.
My install of maven is the default version packaged with STS (basically Eclipse).
Kind Regards,
Justin
Checking whether the jar got properly installed in your local repository might help. If you navigate to the .m2/repository/com/oracle/ojdbc6/11.2.03/ you should find the jar present there.
if this problem is present, i can suggest you to select the Offline option on maven uptade project. Whith this option enabled, the maven install search for local repository.
Related
How can I copy a resource during Tycho build from Nexus repository so that it resides in Eclipse install directory once it's uncompressed? My end goal is to copy archived Maven repository to Eclipse install directory and use that as local Maven repository.
In our Eclipse application we use Shrinkwrap Resolver to fetch runtime jar dependencies from Nexus repository and add them to ClasspathContainer. This works well, however there will be instances when application will be running in environment that has no Internet connection. For this we need Maven repository to reside where our Eclipse application is installed - parallel to features, plugins directories; this is the best location I can think of where to host this repository.
I have forked my own repo of a Jenkins plugin on Github (and made some changes), and I have downloaded it as .zip file. How can I install this onto Jenkins? I assume I need to convert the .zip contents into a .hpi, but not sure how to do this?
I worked this out by creating a Maven project in Eclipse then running the maven command "package" against the pom.xml, this is what produces the .hpi file.
I am looking for a solution to this. Here is my setup:
Local Eclipse with all maven projects on. When i commit them to GitHub, my Jenkins server automatically builds the project. (For every push to github)
However, in my Maven repository on the Jenkins server, i want to be able to get each one (1.0.1 -> 1.0.2 etc.) is there any way i can do this? Ideally an eclipse plugin so that it changes the version before it gets to GitHub.
If i used the maven-version-plugin, it would not update on my local eclipse machine, therefore it would just use the same version each time.
Any Solutions?
I would suggest to use the maven-release-plugin which exactly does things like this. This comprises of two steps. First mvn release:prepare and second mvn release:perform.
I have a Maven project called Utils that i'm working on. I also have another project, called A, that uses classes of Utils. So, I've added a dependency to Utils in the POM of A. I precise that the two projects are not installed in the local repository (or another private repository). When I try to package the project A, I get an error because Maven tries to get the Utils project from the local repository and central repository, but it's not there. I don't want to install the project because it's not final, i don't want to give it a version because there is no release.
Thanks
It's safe to install the project into local repository. Just use mvn install in the Utils' project folder. Anytime you do install it will be replaced by newest in your local repo.
But don't deploy it, it means others could use it. In comparison, your local repo is used only by you.
It seems that the Maven plugin on Eclipse provides this possibility. And there is no need to install the artifacts corresponding to the active projects in the local repository. It seems that the plugin considers the workspace as a second local repository (you can see this using the Maven repositories view). First, the Workspace resolution feature must be enabled (Right click on the project then under Maven). When I want to run the project, I use Run configurations wizard, and Resolve workspace must be checked.
Is it a good solution? I don't know if it just seems to work or if it really works.
Thanks
I have installed m2eclipse and EGit, I can checkout a project from a git repository and I can build a maven project, but I cannot checkout a maven project from the git repository.
The problem is, that the SCM URL field is empty (apart from EGit I have SVN team providers as well...) and when I paste the url I just get SCM provider is not available in the maven console.
I tried searching for this issue and I found I have to install m2eclipse SCM integration and SCM handler for git, however those aren't on the update sites.
Any ideas?
Maven SCM integration in Eclipse used to be good. It used to be that you could do Import > Check out Maven projects from SCM and put in a URL like scm:git:ssh://git#git:project.git but in Helios or the new version of m2eclipse + extras you can't do that anymore. It always gives the error that the original post is talking about. Disappointing that you have to check out in EGit and then add dependency management. This isn't a great solution because it isn't smooth with parent / children POMs.
Ok, so now it works. First clone the repository with EGit, then create generic project, then add dependency management and everything installs just fine and works.
If I understand your saying, I can do what you need in this way. Just place this in the projects' pom.xml:
<scm>
<connection>scm:git:https://gitUsername#github.com/gitRepo/projectname.git</connection>
<url>scm:git:https://gitUsername#github.com/gitRepo/projectname.git.git</url>
<developerConnection>scm:git:https://gitUsername#github.com/gitRepo/projectname.git.git</developerConnection>
</scm>
A git project is not checked out, it's cloned.
To clone the project just type
git clone <project url>
I found a partial solution to my problem. I use Apache Ivy (IvyDE, plugin for Eclipse) instead and the thing I want to checkout is in the default dependency repository.