Maven Project From Github To Eclipse - java

I am a beginner in maven
so, I am trying to create maven depend on progect in github
I git this project https://github.com/jenshuesken/incubator-olingo-odata4
I need to use ODataJClient, I am trying to git clone and import it in eclipse
but nothing come, please see figure 1
figure 1
I need to use engin in ODataJClient
AM waiting

The right step is build all modules in eclipse,then push it to github. A parent pom includes all modules information. After this,you can git clone it correctly.

Related

How to import BOTH Git repository and Maven dependencies to Eclipse?

I am trying to run this tool.
It says that the jar is available on Maven. I created a Maven project in Eclipse and added dependencies in pom.xml. At the same time, I cloned the git repository to Eclipse, but then I have 2 separate projects: one is the Maven project with dependencies and another is cloned git.
Is it possible to combine them? Are there any other ways to install and run a project from github with Maven dependencies?
I checked similar questions but they resolve either Maven or GitHub importing which I know how to do. I am having problems with doing both in one eclipse project.
Thank you.
UPD: I want to inspect Reach tool to see if it fits my research purposes
According to the README it's a standard SBT project, so if you want to import it in Eclipse IDE I would advise to use the Scala IDE (Eclipse plug-in) and sbtclipse (plug-in for SBT).
That being said, the Scala IDE is not maintained anymore so it may be easier to use SBT support in IntelliJ instead.
Anyway you have to clone the git repository locally. From Eclipse IDE you can import it afterwards, see sbtclipse's README.

Git repository to Gradle dependencies

I am developing a project in java, using eclipse, making backup by git (Bitbucket), and I decided to use build it using gradle.
Some of my source code can be used by other project, so I want to move them to other project and manage with another git repository. I want to add them as a dependency to the original project. What should I have to write in build.gradle?
Here are the docs you need. Basically you need to create a standalone gradle project from the separate part. And then with the usage of settings.gradle create a multi project build. Maybe git modules will be also useful.

Trouble creating Eclipse/Java projects from Git repo

I am brand new to Git and EGit. I have been asked to troubleshoot a project stored in a Git repo located at http://com.myorg.gitrepo/githome/myapp.git.
First I tried just doing this on the Git command-line. From a terminal, I executed:
git clone http://com.myorg.gitrepo/githome/myapp.git myapp
The command was successful and I can now see a project checked out under /home/myuser/myapp (I'm on Ubuntu 14.04).
Now I'm trying to load the checked out project into Eclipse as a Java project. Here are the steps I'm taking:
1. Right-click Package Explorer>> Import >> Git >> Projects from Git >> Next
2. Existing local repository >> Next
3. Select `myapp` project to import >> Next
4. No project found!?!?
As you can see, EGit is looking for some config that isn't there, or perhaps I'm just using it incorrectly.
My questions:
What am I doing wrong, and what can I do to fix this and get the project imported?
How could I improve this process in the future, by using EGit to do the initial clone (bypassing the need to use the raw Git command line)?
Are you sure the project you are importing contains the files eclipse uses for project management?
How does the .gitignore look like? Does it include .metadata/, .project/ for example?
If it does, it means that repo is configured to ignore the configuration files eclipse uses for managing the project, and you should use the wizard to create the project.
I think it is considered good practice to not include any editor specific files in the repos, as these cause a lot of conflicts, and the project shouldn't really depend on the editor like that anyways.

Eclipse GIT Repo Multi Module - Adding a new project

Using eGIT I can successfully clone a GIT repo.
I can also import (as maven module), the multi-module project (by selecting the parent pom) into eclipse. As per best practise, my local workspace and GIT repo are in separate directories. I can make changes to existing classes / packages (i.e. add, commit and push to GIT origin on GitHub), and am starting to understand the GIT workflow...
What I cant figure out is how to add a new java project to the multi-module project? Should I create in GitHub first?
Other Config:
- Local GIT repository (i.e. where I created clone):
c:\dev\gitrepos\xxx-api-client.git
Local Workspace (i.e. my workapce where I imported clone into - which btw is ):
c:\dev\apis
I do have write access to then GIT repo
If I understand your question correctly and you are using Maven as a build tool ,then I don't think you have to add separately in your repository , GIT will automatically take care of that.
Only thing you have to do create a new module and declare that in your parent pom file like this.
<modules>
<module>module1</module>
<module>module2</module>
<module>your_new_module</module> </modules>
Now next time when you do a commit , you have to add this pom file. From there onwards it will be a part of your repository and whenever anybody do a clone it will be available.
Please correct me if i have not understand your question correctly.

Eclipse + Maven Plugin + EGit Plugin = Checkout from GitHub a specific Branche and Tag?

I know this is a relatively special question. Maybe some knows this nevertheless:
I want to compile Hector with Maven in Eclipse=> Branch: 0.7.0 and Tag: hector-0.7.0-29
(https://github.com/rantav/hector.git). (The mentionaed Branch/Tag are not(!) the Master Branch, so requires a dedicated Checkout.)
I have installed: Maven-Maven Plugin and the EGit Plugin for Eclipse
My Problem:
1.)Maven Plugin allows to checkout directoly from a SCM like GitHub (when installing the maven-git-plugin= this is not the same as egit plugin). I am now able to downlaod a Project directly from Github with the maven plugin. On Disk I find the Tag and Branch (as Git files in the .git Directory.)
But the Problem is, the Version that is checkout out is the MASTER Branch. And I do not find an option to checkout the specific Branch and Tag directly within Eclipse. When clicking on "Team-Context-Menu" I normally have all the EGit Options (to checkout a specific Branch/Tag). But due to the fact the Project got downladed via the Maven Plugin it seems it is not regarded from Eclipse as an Git Repository.) So klicking on "Team" where I normally have all my Git-Commoands is more or less empty. I need to find a way to tell Eclipse that this Project is a GIT/EGIT managable project, so that I have the menu options to manage it.
2.) Furthermore I want the downloaded Project to be completely "SCM-Managed" (via Git) so that I can "track" my local changes to the files. Therefore all "Egit Context Menu" Stuff should be working for this checked out project.
If someone knows how to do this, I would be very kind for any advice!
Thank you very much! Jens
Well, the simpler answer would just be to clone the repository with EGit, right click on the repository in the repositories view and select "Import Projects".
I had a similar problem with a repository already cloned, but new projects were on a new branch. I switched to the desired branch and used "Team" -> "Show in Repositories View" -> "Working Directory" -> "Import Maven Projects..." on the desired projects.

Categories

Resources