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?
Related
I want to make it so, that when I export my project, Eclipse would create .jar file as well as folders and other files I desire on the same path. I am making a game and I rely a lot on external files, be it animation images or scripts, and it is very annoying copy pasting same stuff over and over again, additionally to making the "run" option not viable.
You can use Eclipse File sync Plugin to solve your problem, basically
this plugin synchronizes your eclipse workspace files to any external
folder you configured:
FileSync plugin for Eclipse is a file synchronisation tool. The main
goal is to keep files outside of Eclipse projects in-sync with Eclipse
project files. The plugin works as builder in Eclipse and will
synchronize all changes on Eclipse project files with mapped external
folders. E.g. if a file is created, changed or deleted in Eclipse,
then the mapped (external) file will be created, changed or deleted
too.
http://marketplace.eclipse.org/content/filesync
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.
I am using Eclipse 3.8.1. I have one project with sources and one which I build.
--ProjectSRC (from svn)
-- src
--main.java
--Project_build (builded project using ProjectSRC files)
--src
--main.java
--build
main.class
I have svn project and I downloaded locally these files but I want to make a new project from them. I am trying to link sources but when I change something in eclipse for example in file main.java in Project_build , another project in eclipse which is linked with the svn do not see changes of this file, so I have to copy changes manually, or to build the project with sources. And if I do that, when I synchronize with the repository there are a lot of build directories and .project files which every time I have to unchecked.
So how to connect sources from one svn project and to create new with them and when a change become to be reflected on the two places, through Eclipse?
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.
I have an eclipse Tomcat project that has several dependencies on other eclipse projects.
For example imagine the main project is called server and has several dependencies:
server
(depends on):
data-lib
server-utils
messaging-utils
Currently every time I change data-lib,server-utils,messaging-utils I have to recreate the .jar file and copy it into WEB-INF/lib directory of server. At that point I export the server as a .war and deploy to my server.
I want to make this process work from the cmd line using ant (note I know maven is out there but I know ant pretty well from past experience so would prefer sticking to it for now). Its easy enough to create the build file for server -- it will end up creating a .war file. But I want it to automatically build the dependent libs. I want to do this while preserving my development workspace in Eclipse.
What is the easiest and cleanest way to do this? Currently my thought is each individual project will have its own build.xml (i.e. data-lib/build.xml , server-utils/build.xml , etc). I will have the server/build.xml do an antcall to these individual build files and then copy the jars to the server/WEB-INF/lib directory.
Is there an easier/better way?
if you want an Ant based script, I would go with Apache Ivy. The basic idea is that each of your submodule has its own build.xml file and publishes (via Ivy) their "publications" (like a Jar file) to a repository on the file system. The other modules then import these "publications" to build the final product.
I am not sure if it can help you, but in your WAR project, right-click on it in Package Explorer, and click on Properties.
There is a "J2EE Module Dependencies". In this option, select all of the dependencies (i.e. "data-lib", "server-utils" and "messaging-utils").
Now, when you modify a Java class in one of the dependencies, Eclipse will recreate the JAR file and deploy it directly in the WEB-INF/lib of your web application.