Cannot import github project in Spring STS 3.2.0 - spring

I want to import https://github.com/nebhale/spring-one-2012 into Spring and be able to run it.
I cloned this repository on my local machine in /space/GIT/spring-one-2012, created a directory /space/spring_workspace_sample and switched Spring to use this workspace.
To import this project I did:
File -> Import... -> Git -> Projects from Git -> Local
Once added the local repo, I selected the option "Import existing projects", but upon clicking "Next" I get "No projects found".
If I choose "Import as a generic project", the project is imported but the option to run it on the server (vFabric tc Server) is no longer there.

In order to import existing eclipse (STS) project you have to include .project file into source control (git).
If you've lost the .project file you can use maven-eclipse-plugin to re-generate it.
Other popular option if you don't want to use .project is to use maven, and use "Import Existing Maven Project", then navigate to your pom.xml
With maven approach you're not tied to eclipse, your team member can use other IDE

Related

How to save a module from one computer and import into into another computer in IntelliJ with Maven

I have a Maven module in IntelliJ which works fine from one computer. I have saved the ".iml" file together with the project in Git. When I check it out on another computer,
"New Project"
then "File" -> "New Module from Existing Sources" -> Select the ".iml" file, the structure is all there, but no Maven dependencies are resolved.
How do I get IntelliJ to download and import the Maven dependencies?
Things I have tried:
"Re-build Project"
Right-click the module and "Re-build module"
"File" -> "Invalidate Caches / Restart" (both invalidate and restart)
"Re-import All Maven Projects", this simply deleted the two Maven modules from the project. I then had to re-create the modules as above, once they were there again I had the same problem.
On the comand-line "mvn" is able to import the project and resolve all dependencies just fine.
Additional information:
The ".iml" file, when I look at it in a text editor, does not have any absolute paths in it.
Here is a picture of the module settings window:
If your goal is to just import the project on another PC, don't rely on the iml files. Some even consider it bad practice to commit IDE specific files in maven projects, as not everyone on a project might use the same version or even a different IDE. If you take a look at popular .gitignore files (e.g. this one), you'll most often find that any IDE specific files get excluded.
Consider importing the projects pom.xml:
Import Project -> from external model -> Maven
EDIT
JetBrains recommends to NOT include the iml file with Maven or Gradle projects, see here

Maven - Wrong folder structure

I have checked in one of my projects to GIT repo. When i cloned it from GIT, imported the project to eclipse and converted the project to Maven Project, the folder structure of maven seems to be a bit different
This should have been src/main/java, src/test/java, src/test/respurces folder structures and com.vod... as package.
I have tried maven>update project, project>clean, maven>clean, eclipse::clean, eclipse::eclipse. But this project structure does not seem to go off.
Any possible solutions for this please?
After importing the project as eclipse general project, below is the structure.
This is a typical problem due to the lack of Eclipse metadata files in the GIT repository.
How to solve it:
Open the project's contextual menu > Java Build Path > Configure Build Path > Source. Drop off folder src and set as folder sources just these:
src\main\java
src\main\resources
src\test\java
src\test\resources
This will save some metadata to the .classpath file.
Also, you should ensure that this was set as a Maven project: Open the project's contextual menu > Configure. If there is the Convert to Maven command, execute it (if not, it is already a Maven project). This might save some metadata to the .project file.
Then, be sure to check in the Eclipse metadata files (.classpath, .project and .settings folder) to GIT. And, in order for this project can be safely shared to other developers, be sure not to enter absolute paths in the java build path, nor other system-dependant constraints.

Xcode 5, Export Project to SVN repository

In previous version of Xcode there was a repository section in Organiser which is now missing in Xcode 5. How to export project to SVN in Xcode 5.
One way is using an svn client. The one which is obviously available is the command line svn client. So here's how I use it:
Our repository is: https://myserver.me.com/svn/
The repository is added to Xcode using Xcode->Preferences->Accounts.
Create a new project inside Xcode 5: $HOME/IOS/Projects/MyProject
Close the project or maybe even better close Xcode to avoid Xode interfering with svn. Really.
Open a terminal and change directory into the projects folder
cd $HOME/IOS/Projects
Import the project into svn:
svn import -m "New Import" MyProject/ https://myserver.me.com/svn/trunk/MyProject
Checkout the project again to create a working copy
svn co https://myserver/svn/trunk/MyProject MyProject
Re-open the project in Xcode and enjoy svn. The project is now part of the repo.
Select Source Control -> Check Out…
This shows a “Check Out” dialog.
Select SVN from Recents or Repositories tab.
Now, select the directory in which to check out the project.
Click on “Check Out”. This updates the local project to remote SVN.
please refer this.
https://developer.apple.com/library/ios/recipes/xcode_help-accounts_preferences/articles/add_repository.html#//apple_ref/doc/uid/TP40013306-CH4
and on click on setting btn you can import and export also.
In XCode 5, you can add/view repositories at Xcode->Preferences->Accounts. You can also view/enter the repository at "Source Control"->"Check Out..."

Can't add OracleDriver to Subclipse build path

I need to make some modifications to the Subclipse Eclipse svn plugin. To do so, I need to connect to a specific Oracle database, but my code keeps dying on this line:
Class.forName("oracle.jdbc.OracleDriver");
With (surprise) :
ClassNotFoundException
I've added the ojdbc.jar to the build path of my project
(org.tigris.subversion.subclipse.core, the project that tries to connect to the database)
This works fine in a regular project, just not with the Subclipse plugin, so it's not being deployed I guess.
I do have it checked in this menu:
Configure Build Path -> Order and Export
Any idea what I'm doing wrong?
Copy the jar to the plugin directory.
Open the file "META-INF/MANIFEST.MF" in the plugin project directory, switch to
the "runtime" tab, and then click "add" button the the "class-path"
section to select the driver jar file.

No archetypes currently available. The archetype list will refresh when the indexes finish updating

In Eclipse with m2eclipse installed, when I choose
File > New > Project... > Maven > Maven Project
with
Use default Workspace location
and
Catalog: Nexus Indexer
selected, the following error message is showing up:
No archetypes currently available. The archetype list will refresh when the indexes finish updating.
Why does this error occur?
I had same problem and it was solved by adding a remote catalog:
http://repo1.maven.org/maven2/archetype-catalog.xml
This solution i found at :
http://jira.talendforge.org/secure/attachment/36787/DeveloperGuide-Feedback.pdf
in this case you can use another solution, you need to configure a local ctalogue using eclipse :
1- suppose that you need to use mave catalogue : http://repo1.maven.org/maven2/archetype-catalog.xml
2- download from your web broser the file http://repo1.maven.org/maven2/archetype-catalog.xml and save it in ~/.m2/archetype-catalog.xml
3 now go to eclipse "Window-->Preferences-->maven-->Archetypes" then click the "Add Local catalogue" and set the ctalogue file to the ~/.m2/archetype-catalog.xml, save and exit
4- now go back to eclipse and try to create project using your new local catatlogue archetypes, it should work
Updated remote catalog link: https://repo1.maven.org/maven2/archetype-catalog.xml
Either copy the link and add a remote archetype or download the XML file and go for a local archetype option and follow #sofiene-zaghdoudi 's solution.

Resources