Sending last version from SVN to Tomcat6 webapp directory - java

Well, I have a SVN Server where is all my application, my doubt is very simple but i can't find any good answer in internet. I want to know if have some way to automatic "copy" the last version of SVN Trunk TO my /var/lib/tomcat6/webapp/myproject/.
So, i want to make this "copY" only when is needed, i.e: all the night i can't configure the crontab to make this copy for me.

I do not know whether I got your question or not. But if you want to update your workspace project from svn you can update like following:
Use svn software like: TortoiseSVN. Download from Here. And Install in your computer.
Right click selecting your project and there is option svn...and you will find update option
. Click update your project will be updated from svn.
If you want to copy all file form your trunk you can also
checkout project from svn clicking checkout option which is available in TortoiseSVN.
If you are using netbeans ide you can also do from there.
a: First you can checkout (if you want to copy all file) STEPS : Go to Team --->Sub Version--->checkout
b: Second if you had already checked-out STEPS: Select your project--->Right Click ---> Sub Version --->Update. It will update all from svn.

Related

Eclipse Plugin auto update installation

I am new to eclipse plugin world and I happened to create on hello world plugin.
I am able to give it to my friends by telling them to drop the exported jar (that I exported from my project) in the dropin folder, which works well. But I now want to upload that jar to a web location (say on github) and want them to install it using eclipse-> install new software-> add -> archive option (I think this is how I should let them install for internal usage) . I tried n number of things without success , a simple approach that I tried was to archive local jar from disk through the eclipse-> install new software-> add -> archive-> local option, but I get error "no software site found at jar:file:/{location to my jar folder}/hello-world_1.0.0.0.2015XXXX.jar!/. Do you wish to edit the location?" message .
Any guidance is appreciated.
My plugin.xml
My jar folder structure: META-INF,icons,lib,plugin.xml,hello
Testing on same eclipse were-in the dropin method works.
To be able to install and update you first need to create a Feature project as well that links to your plug-in. Then at first you should use Export... > Deployable Feature, select your feature and set Generate p2 repository under Options. You can generate to a directory first. This will contain:
folder/
+plugins/
+features/
+p2/
-artifacts.jar
-content.jar
You can use this as a local site to install from, and when you upload it to an online location, as an update site.
Once you are fed up with manual exporting, you will learn about maven, tycho and automatic update site creation and upload ;-)

How to checkout an old revision using Subclipse subversion

I need some help checking out a java project from a SVN repository. In order to validate my work, I created a test java project in my local workspace, and am able to create a jar file of it. But I can not do that with the project that I check out from SVN. This is a project, which others have successfully checked out. Before I started I knew very little about SVN, so I read this url: How to use Subversion with Eclipse
I am using subclipse v 1.6.18
I choose checkout after right-clicking the repository from repository perspective. The developer of the code told me to use revision 10. So I click the selection button, and from the list of revisions I double click revision 10. and click on Finish. !
I also choose the "check out as a project in the workspace" and call the project javacardreader.
Unlike the tutorial I saw on youtube about SVN. I do not see any option to synchronize with the repository in the java perspective. I do see the javacardreader project in my java perspective. But when I try to create a jar file from it, the folder does not show up as an option like my other test project.
I also do not see an option for adding the binaries to SVN ignor in my list.
My question is what am I doing wrong? My understanding is that revisions are changes / improvements that developer(s) make to the code. One question that came up in my discussion with the developer was if I am pulling the committed code. How can I make sure I am doing that? Where should I look? Am I missing something about how SVN works?

not able to find svn options in eclipse?

I have imported a maven project. i did some modifications and need to check in. i have subclipse installed in my eclipse. but when i right click on the project, i could not find the options like commit, synchronize with repository..etc..
i am seeing only two options on right cliking on the project. they are :
Team ----> **apply patch** and **share project**
if i select share project, i am getting below error:
svn: The path 'D:\myproject_space' appears to be part of a Subversion 1.7 or greater
working copy. Please upgrade your Subversion client to use this
working copy.
How can i get the other features?
Thanks!
To use SVN 1.7 you will need to install Subclipse 1.8 by adding the following to your list of Update Sites: http://subclipse.tigris.org/update_1.8.x
To support Subversion 1.7 and corresponding working copy format you need to install Subclipse 1.8.x. See Downloads tab on Subclipse web site.

How to properly delete Java packages under SVN control?

I hava a Java project and am using Eclipse (Indigo) with the Subversive SVN plugin. I have successfully setup a remote SVN server that I'm using for the project repo.
I recently decided that I no longer needed a package that had a few unused classes in it. So I did the following:
I deleted the package and all of its contents from inside Package Explorer
I then right-clicked my project's root directory, and went to Team >> Synchronize with Repository
I found the newly-deleted package showing up in the list of changes under the Synchronize SVN panel, right-clicked the package, and select "Commit". My thinking here was, "I've deleted the package locally, now I want to commit those deletion-changes to the server."
The changes were not committed, I got an error message (which I failed to look at...) and now this is what I see back in Package Explorer (the net.appuzi.domain.loads.http package is the one I deleted):
Now, if I go back into Team >> Synchronize with Repository, I see the package like so:
If I select both Java sources and try to "Override and Commit" them, I get the following error:
Some of selected resources were not committed.
svn: Commit failed (details follow):
svn: '/<path-to-my-project>/MyProject/src/main/java/net/appuzi/domain/loads/http/HttpMethod.java' is not under version control
So my immediate question is: how to "synch" my local working copy and the repo so that this deleted package no longer exists in either one (on the server-side I'm committing to trunk/).
Besides that immediate problem, which is my current blocker, I guess the next logical question is: what are the proper procedures for deleting packages that are under version control in SVN.?" Thanks in advance!
Try making sure that your local files are the same as the remote files before trying to delete. That way the only change being detected is the deletion of the entire files, and Eclipse won't get confused about conflicts. Just update or revert as necessary and then try deleting again.
Try this:
delete the packages.
right click on your project inside the project explorer.
go to "Team" and click on "Update to HEAD.
again go to "Team" and click on "commit...".
Good Luck
I had similar issue earlier, all I did was committing parent folder. In you case "src". Get those files back and delete them again, and this time commit the parent folder.
Hope this helps.
Just delete the folder using Svn repository exploring, then update the project.
I had a similar issue where the package got deleted from the SVN repository but still showed up in the Synchronize View in Eclipse. I have the subversion plugin installed in my Eclipse. To resolve my issue, I disconnected the project from SVN (Right Click on Project --> Team --> Disconnect...) while opting to check the option "Also delete the SVN meta information from the file system."
Once disconnected, I reconnect the project to SVN, synchronized with the repository once more and the deleted package/files were no longer visible in the Synchronize view.

How to read SVN Tortoise Command from Java application

As I am doing an application which requires to do all the operations like checkout, checkin, commit, rollback and etc.. Please can any one give command line options for SVN tortoise?
As I understand, you want to implement a Java application that calls Subversion commands. I think there are 3 options you could go with:
(and best one): Use SVNKit as a pure Java implementation of the Subversion API in Java. So you have there Java classes and methods and can do anything you want (if you understand how to use it correctly).
You could use JavaHL which is more difficult to install, but then comparable in usage to SVNKit. However, the implementation differs on different platforms (no Java-only implementation), so depending on your usage scenario, it may not be an option.
You could just start svn commands from Java, but I would not do that.
There is enough information available on the internet how to do the base commands with SVNKit, so just give it a try.
TortoiseSVN is a front end to subversion. See the Version Control with
Subversion book for a list of all the command line commands. Appendix E. Command Line Interface Cross Reference of the TortoiseSVN documentation provides another source for the commands.
You will get enough help from internet about tortoise SVN.
You can create a repository in system folder or in Eclipse.
These steps will install SVN plug-in in Eclipse.
Open Eclipse.
Go to Help Click Install New Software
Click “Add” button
Put “Subclipse 1.2.x (Eclipse 3.2+)” under Name and “http://subclipse.tigris.org/update_1.8.x” under Location:
Click ok
Select subclipse selection option in selection window. Select all
Click next button n/a
In review the items to be installed window. Click next.
Licenses must be reviewed and accepted before the software can be installed. Click I accept radio box. Click finish.
During installation eclipse may ask for the validity of plugin being installed. Click ok
After installation. Restart Eclipse.
Create SVN Repository Location in Eclipse
In the navigator perspective, right click and choose new
Choose SVN > Checkout Projects from SVN
Select the option to create a new repository location.
Fill in the location of the SVN repository (https://link-to-repository) and click next. Project info is loaded.
It may ask username and password or validation of repository site certificates. Click “accept permanently”.
From RAD File menu, choose Import to display the import manager. Choose Checkout Projects from SVN. Click Next
Select Use existing repository location option to enable the Next button.
It will load all projects from repository in “trunk”. Expand trunk menu option
Select all the projects one by one to import in projects in workspace.
Why would you not call svn commands directly from java? I mean can't we open a command prompt using a RunTime instance and passing the svn command to it.Is that a bad idea?If yes, what are the disadvantages?

Categories