I recently created new project with maven and committed on SVN server from Eclipse. Everytime i build this project SVN wants to commit also .settings, .project and some other files form target folder. I have succeeded to make SVN ignore from eclipse but it will work only for me.
How to make a "global" svn ignore that would work for all svn users? Can it be done only from svn server or it is a possibility that i can do it from my svn client?
Please suggest any working solutions :).
Best Regards.
You should use the svn:ignore property instead global configuration change. You have to edit/add the svn:ignore property to your trunk folder and should have the following content:
target
.settings
.classpath
.project
This can be done using your svn client.
Related
I would like to start the program from this repository: https://github.com/SaifurRahmanMohsin/Personal-Diary but when I dowload it and open the project in Eclipse I am not able to build/compile it. So i also can't run it.
Do I have to change run configurations or build a working set or something like that? I usually don't work with Eclipse so I am a bit overwhelmed.
screenshot eclipse1
screenshot eclipse2
Check out. Delete the files .project, .classpath, and folder .settings before you import because those hold data unrelated to your system.
File, Import, Project from existing sources
Pick the inner Personal Diary folder, not the repo folder
You will need to download two libraries to add to the classpath
JSON-Simple and Apache HTTP Client
I exported my Project to Github and checked it out in eclipse. This process worked - however it seems like eclipse does not recognize my.java files as javacode. It does not try to compile anything.
I do have a .project file and a .classpath file in the repository. Why doesn't it work. //reference removed
This is how it currently looks like. I am not sure whats causing this problem, but it might be that i got the main folder as project and the actual project inside this folder (nested). How can I fix this if this is the problem?
Thank you :)
You Should not check-in .project, .classpath files and .settings folder. As eclipse will only generate these files for you.
Try deleting these files from your git repository and then again clone it , it should work.
let me know if you face any issue.
You need to commit your folder structure starting from :
/DragonsEdgeRefactored/
Since your project is already a Git repo, you can move the contents accordingly and commit the changes accordingly. I recommend using a GUI Git client like SourceTree or GitKraken.
I have created an EJB project in netbeans 8.0.2. I am creating webservice client. Also I am creating pojos using jaxb binding. All these files are saved by netbeans in generated-sources folder under build folder. When I try to commit in netbeans, it doesn't give me any option to commit the files under generated-sources folder. One option is to go into file explorer and commit to svn from there. However I was looking for an option to commit these files from within netbeans itself. Any option to do the same?
I can't seem to find this configuration at .project file. I am looking for a way to change this setting programmatically as "I don't know why" my eclipse is losing this configuration every time I clean the project.
The deployment assembly settings are stored in the file:
.settings/org.eclipse.wst.common.component
However, in a basic J2EE Eclipse install this file shouldn't be modified by cleaning the project. Maybe you have some other plugin installed that is updating the deployment settings during the build.
I faced the same problem and the reason being that the file .settings/org.eclipse.wst.common.component contained entries added by Git. On removing them, and restarting the eclipse worked for me.
I will be hosting a java project on SVN which will need to be downloaded by other developers with the ability of that project to be compiled / packaged on their local machine.
I would like to know what files are needing to be stored on SVN and which ones can be left out. I know the files that Netbeans creates can be left out and the build.xml will need to be included as it has code to package the libraries used in the project into the .jar file.
I am assuming that the following need to be stored on the SVN server:
/lib
/src
build.xml
Does any of the files in the
nbproject folder need to be added?
If not what svn commands (IE
svn-ignore) will I need to run to
ignore all the files except for those
in /lib, /src and the build.xml file?
What should my file structure on the
svn look like? Should I keep the
source files in the src directory on
svn or should I name the folder
something else so the developer can
then "Create a new project from
existing source"?
You shouldn't host you lib directory on your SVN, you can use Ivy or Maven as a dependencies manager which will download all your dependency from a repository.
Concerning the netbeans files it depends on the way your team work, I would say that you can let them on the SVN it will be useful for other developers using netbeans and shouldn't bother developers using another IDE.
For the svn:ignore part you have to do svn propset svn:ignore dirname . in command line.
A general file structure is :
/svn
|-projectName/
|-branches/
|-tags/
|-trunk/
|-projectName/ (Sometimes this directory doesn't exists and its content is put right into trunk)
|-pom.xml (Maven !)
|-module1Name/
|-src/
|-main/
|-java/
|-resources/
|-test/
|-java/
|-resources/
|-pom.xml (Maven !)
|-module2Name/
|-module3Name/
Resources :
Apache Ivy
Apache Maven
Subversion - svn:ignore
On the same topic :
Which files should be imported in a subversion repository for a web services project?
-How to ignore a directory with SVN?
I decided to take another route. While I had read your original post about using Maven, we are wanting to stay away from Maven as we are basically just writing a command line interface for an existing library.
Another reason I decided to do what I did was during adding my svn:ignore's I realized that some of the developers here keep their netbeans project settings in different directories which would basically not do any good since it wouldn't be an svn working copy in that dir.
So what I did was just add the /src and /lib directory to the repo.
The end user then checksout the repo with svn co svn+ssh://path/to/repo/trunk . and then will open netbeans and select "Create project from existing source". At which point they will go in and add the library from the /lib directory.
I have Up Voted your answer as it would have been very helpful should I of gone through with using Maven.