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.
Related
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
I'm currently in a desperate situation right now, I already tried dropping the JAR file into both the "plugins" folder I created inside the "dropins" directory and also into the other "plugins" folder that was already created. I add the "-clean" option into the target of the eclipse shortcut and then I start eclipse. I go to the "plug-ins" section and try searching my plugin, but it does not appear.
I am using Eclipse Jee Neon and this is the JAR plugin I am attempting to use. Can anyone help me resolve this?
https://mvnrepository.com/artifact/org.codehaus.mojo/exec-maven-plugin/1.5.0
I have imported a existent maven project (swagger for jersey jax-rs) into eclipse.
I get a bunch of errors:
It always has to do with the jackson-databind.jar
Example error:
Archive for required library: '.../.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.1.5/jackson-databind-2.1.5.jar' in project 'swagger-core_2.9.1' cannot be read or is not a valid ZIP file
I cannot find the .m2 folder? I am new to the maven stuff,
do i have to install something extra before i import a maven project into eclipse?
Thx
I cannot find the .m2 folder?
By default the .m2 directory is located at the home directory.
For *Unix operating systems, it will be something like /home/<user_who_fires_maven_commands>/.m2/...
For Windows machines , the m2 will be located at C:\Users\<user>\.m2\...
As for the exception you are getting
Archive for required library: '.../.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.1.5/jackson-databind-2.1.5.jar' in project 'swagger-core_2.9.1' cannot be read or is not a valid ZIP file
It is most probable that the archive file has gotten curropted ( maybe a download issue or might be possible that its sha1 doesn't match with the one that is on the central repo ). So you can try by simply deleting this jar file and then run mvn install and it will re-attempt to download the file again.
Another thing I would like to point out is that since this is a new eclipse installation, I would suggest that you re-index your local m2 folder so that this new eclipse knows about the files and folders inside the original m2 folder. To re-index, goto Window -> preferences --> Maven --> User settings --> there will be a text field stating the path of the .m2 ( make sure its correct ) and then press re-index
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
Using NetBeans 7.1.2.
When editing pages with NetBeans as per the procedure explained below, the IDE offers only autocompletion for <jsp:...> tags:
This is how I have created the NetBeans project and the jsp (though it isn't archetype specific, nor the issue has anything to do with opencms): I have created a maven project with the OpenCms-Module archetype
mvn archetype:generate -DarchetypeCatalog=http://bp-cms-commons.sourceforge.net/m2repo
The archetype creates a maven project with jar packaging.
After that, I have added a jsp under src/main/opencms/modules/blahblah/templates.
And then I have added the taglibs.standard dependency to the project, to try to provide NetBeans with the corresponding tlds.
After several hours trying to get this working, I found this reported and closed bug that hinted me into the right direction:
Added src/main/webapp directory Edit 1: There is autocompletion only for jstl tags if the files are inside src/main/webapp. Workaround in linux (not sure if windows links will work): Create a symlink:
ln -s opencms/ src/main/webapp from the project root folder
Change maven project packaging to war (Project properties -> General -> Packaging)
(Notice that neither the #taglib directive nor the taglibs.standard dependency are necessary.)
If the Web Pages entry does not appear under your project (in the projects view), you may need to restart NetBeans. Now you'll have full autocompletion (only) under src/main/webapp! :-)
Edit 2
Unfortunately, if under version control, NetBeans sees the symlink as a new directory, and all files under it, as new files :-( This is very inconvenient, because to access the IDE integrated version control functionality, you still need to open the original resource.