Is it possible to put Eclipse GWT project under EGit?
If I select an option "Use or create repository in parent folder of a project", Eclipse says "Creation of repositories in the Eclipse workspace is not recommended" and does not allow me to go further.
If I deselect this option, it moves the project files into a separate folder of Git repository and breaks the classpath. For example, Web App Libraries entry remains pointing to the old place and does not fix it upon recreate.
Trap! How to get out?
When it shows that warning, you need to hit the "Create Repository" button at the bottom of the dialog. That will allow you to select your project as your repo and use Finish.
See EGit User Guide/Repos for a discussion on why it's better to have an external repo.
PW
You have to select project folder in the project view, then right click 'Team>Add'. 'Team>Add to index' in newer eclipse versions. Make a commit and the Web App Libraries fixes itself.
Related
I want to use TortoiseSVN together with Eclipse.
For now I just want to try it out.
So I use a local folder as repository.
I have installed TortoiseSVN 1.7.13.
I created a folder called 'REPOSITORY' and chose 'Create repository here' from
the context menu.
As other websites told, I installed Subclipse 1.8.22 in Eclipse.
I use the SVNKit1.7.9 as client or connector (Whatever it is called).
I had already some projects in eclipse's workspace.
From the context menu I chose 'Team->Share Project'.
That is what other websites told to do.
It did show the normal commit dialog and so on.
The projects are marked as commited but the folder 'REPOSITORY'
is still small in size.
It seems, that the projects where not copied or moved to the repository.
At work we have a server based SVN. I just want to have something like that at home.
Did I miss something?
Isn't it the purpose of the SVN repository to hold a copy of the projects?
So the commited projects should be inside the REPOSITORY, right?
Greetings
Mike
Apparently, you have to manually import the project in Eclipse into the repository created with TortoiseSVN before actually committing to it.
This other page might help you. It gives a very detailed walkthrough of how to set up exactly the kind of local system you want. In essence:
In Eclipse, delete the project but not its contents (Delete project contents on disk unchecked). This will leave the project's folder under your workspace location untouched.
Outside Eclipse, import the project folder into the repository previously created with TortoiseSVN (Right click on folder > TortoiseSVN > Import and select the URL of the repository). Once imported, you may wish to delete the project folder.
Back in Eclipse, checkout the project from TortoiseSVN's repository (e.g. Right click on Package Explorer > Import.. > SVN > Projects from SVN).
Hope that helps.
If your project's folder structure and package structure are the same, you can use Eclipse Subversive. It's just a plugin for eclipse and provides all features of TortoiseSVN
I have two eclipse project. The second one depends on the first one. When I try to rename a java class of the first project (using the rename function on the java file on the project explorer) it correctly do the refactor of that project but it doesn't changes anything on the project that depends on it.
Is there a way in eclipse to tell the renaming function to act even on the projects that are linked to the refactored one? Thanks for help.
My Eclipse version is Juno.
Update:
Forgot to mention that the projects are linked to an SVN repository. Maybe it could be relevant.
Update 2:
I add more details after mliebelt request of clarification.
My Eclipse version is Juno, Eclipse Java EE IDE for Web Developers, build id: 20120614-1722.
I've installed some plugins: subclipse, JRebel, m2e, Eclipse Web Tool Platform.
The second project is linked to the first one as a project dependency in eclipse. I have added the first project in the project tab of Java Build Path. Everything seems to work fine, even the renaming function.
Then, I tried to put the two project in two different SVN repositories. I created two repositories on the SVN server and I installed on my machine the client tortoiseSVN and the eclipse plugin subclipse. Since I didn't succeeded in importing the projects on the server directly from eclipse, I copied the projects' folders in a different location and I removed the projects from eclipse. I used tortoiseSVN to import the projects, each one on a repository with the same name of the project, and than I imported the project back to eclipse. To do that I used the eclipse "import existent project into workspace" function with the "copy project into workspace" option selected. Everything seems to work but not the renaming function.
It does work (for me), so here is what I have done to reproduce the behavior. I hope that this helps to find the error.
Create two projects, and make the second dependent on the first.
Create some source code, so that you can refactor it. Ensure that a class in Test2 is dependent on a class in Test.
Select from the context menu of the method you want to rename. Enter there a new name for the method, only then is the Preview option available. Ensure that Update references is checked.
Press the button Preview to see which classes will be changed by the refactoring.
As you can see, it works for me. Please check what is different in your context:
Define dependency different
Use different refactoring (which possibly contains a bug)
... ?
I then added the two projects to a (local) repository (I use the plugin Subversive, it that matters), and have retried the refactoring, and it works the same way. What is that "it does not work if the projects are in SVN"? The projects have to be in Eclipse, refactoring cannot be done on the Subversion repository directly.
I have made another attempt to reproduce the error, but could not. Here is what has worked for me (no screenshots included):
Installed Java EE from Eclipse (version Indigo)
Installed Subclipse 1.8 from the Eclipse Marketplace.
Defined the 2 projects as before.
Added the projects to the different Subversion repositories by using Team > Share Project...> SVN > select the repository location > Finish
I have then deleted the 2 projects, and instantiated them inside the workspace by doing the following steps:
Go to the SVN Repository Exploring perspective.
Open in the view SVN Repositories your repository locations, and select for each project from the menu Checkout....
The projects will be reinstantiated insided the workspace, and the dependency between the 2 is not lost.
After that, I am able to rename a method as I have shown above.
The problem in my workflow, described in Update2, was that, when I imported back the projects to eclipse, I used "import existent project into workspace" function.
I had to use SVN Checkout Projects from SVN instead, choosing the repositories I previously created.
I have added locations into Eclipse so I can, say, create projects from SVN locations.
I am no longer using one of the SVN locations, but it still comes up in the list that appears when I go to Team > Create project from SVN location.
How can I remove this SVN location from the list, using Subclipse?
Window -> show view -> Other... -> SVN repositories
lists the available repositories and lets you delete the one you don't want any more.
Follow these steps:
Goto "SVN Repositories Exploring"
perspective.
You will get "SVN repositories" view.
"SVN repositories" view shows list of
locations.
You can right click on location and
select "Discard Location" menu.
Hope this helps.
I had to disconnect the local project first, before I was able to discard the svn location using Spring Tool Suite 2.9.2.
So I closed out the project,
went to the svn repository perspective,
discarded the location,
then I reopened the project.
Open your SVN repository exploring, then right click on the location that you want to remove and click Discard Location
NB. before doing that, disconnect all projects that are connected to this repository location.
To disconnect a project from SVN repository follow this:
Right click on the connected project -> Team -> Disconnect...
If are you looking for how to remove/clear the unused Urls from the "Add SVN Repository" dialog, the way "under the hood" is to edit/delete the file located under <Eclipse Workspace Location>\.metadata\.plugins\org.tigris.subversion.subclipse.ui\dialog_settings.xml
Be careful not to deleting the project when removing a repository location, the plugin developers where not smart enough to advidce clearly that the project is delected
A newbie question (I haven't really created new projects in Eclipse yet): I have a machine running Linux with a fresh install of Eclipse 3.5.2. I want to create a new Java project in an existing subversion repository (which already contains some unrelated stuff). So after running Eclipse I get this dialog to specify workspace. What is the best practise here? Should it be in subversion? Then when I created a random one, when I add a project it goes into the workspace. So if my workspace is not in subversion, where and how should I get these projects there?
Background: probably I will work on my own on this project, however I have 2 PC's which I want to be able to use interchangeably.
What I usually do is put the workspace out of the way in ~/.workspace (invisible directory). Then I create new projects outside of that workspace, in the Subversion checkout directory.
You can create a project outside the workspace as follows:
Create a directory in your Subversion repository. Your project will live in this directory.
In Eclipse, click File; New; Project.
Choose the desired project type; click Next.
Instead of "Create new project in workspace" (the default), select "Create project from existing source". The name is misleading: the source does not have to exist, just the directory!
Click Browse and select the directory that you just created.
Eclipse will create a .project file and other support files in the directory you specified. Simply add all these files to Subversion, and you're all set.
Your workspace is the folder where eclipse will place all of your projects.
Basically, once you've linked Eclipse with a SVN repository, retrieving a SVN project will send him to the workspace, thus allowing you to work on it. Once you've made the changes, you can right click on your project in the project bar (on the left, by default) and chose ->team/subversion (depending on the eclipse version) -> commit.
If you want to send a project into your subversion, you create a new project inside your workspace. Then, you right click on the project in your project bar and do the same thing.
let's say that your workspace dir is /home/grzenio/workspace and your project name is project
first of all, go to to /home/grzenio/workspace, then checkout the source code, so the code will be at /home/grzenio/workspace/project.
Open eclipse, and create a new project from the folder selecting "Create project from existing source". Select /home/grzenio/workspace/project
Voilá!
I've installed the m2eclipse plugin with WTP integration in my eclipse workbench. When I use to run the project on a server, the dependencies which has to be provided at runtime (e.g. spring) are not deployed. Is this working like intended? Maybe some of you can provide me the right way.
Is this working like intended?
No.
Maybe some of you can provide me the right way.
Not with the level of detail you provided (like your POM, especially your spring dependency, your eclipse version, the m2eclipse version...).
P.S. On the basis of your wording, I suspect that you are using a runtime scope for some dependencies and you could face MNGECLIPSE-1231. If you do so for the Spring artifacts, then I don't know why and I'd suggest to use the default scope. But this is a big guess.
Right click on your project, select "Properties"
From the properties menu click "Deployment Assembly"
Click "Add" -> "Java Build Path Entries" then click "Next"
Select "Maven Libraries" on the list and click "Finish"