How is bazaar as a version control tool? [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
We are planning to use bazaar as a version control tool over cvs and svn. So i don't know much about it, Where can i find a tutorial of using it? and compared to svn and cvs what extra features does it provides.
And is it worth using for the application with large amount of code to manage?

The major difference with CVS or SVN is that Bazaar is a DVCS (Distributed Version Control System), not a VCS:
see Comparison between Centralized and Distributed Version Control Systems,
and you can see a good feature matrix in this Wikipedia entry.
Any DVCS will require a more complex workflow than a classic VCS, even if you can replicated the "central" repo model with a DVCS:
(source: infoq.com)

Our most senior developer is a big fan of version control systems and he installed Bazaar so we could try it for a while before migrating new projects to it - unfortunately, we had to stop in the middle because the Maven release plugin doesn't integrate very well with Bazaar and the plugin is more important than using Bazaar instead of Maven now.
It works pretty well, let me say that. One of the major pains that I found when working in a team are conflicting changes, and also the fact that you should not commit a change to the central repository until the change is actually ready to be committed. With Bazaar, I can commit my changes locally and then, when I am ready to do so, I can commit all those changes back to the central repository. I never loose my unresolved conflicted changes (with SVN, you have to resolve it before you can submit it).
I didn't test this, but even getting the changes back from the central repository into your local repository (with your local changes) should be easier with Bazaar. What the experts say is that, as branching/ merging is way easier to be maintained with Bazaar, you won't be afraid of it anymore.

You can read tutorials and comparisons of bzr to CVS and SVN at the official Bazaar VCS site in the Documentation section, check the documentation for the latest stable release (which is bzr 2.1 as of March 2010): http://doc.bazaar.canonical.com/bzr.2.1/en/
There is:
Tutorials
User Guide and User Reference
Migration Guide which covers such topics as:
Why Switch to Bazaar?
Bazaar for CVS users
Bazaar for Subversion users
Also Bazaar allows you to work directly with SVN repositories using bzr-svn plugin. You can find more information on this workflow in the guide Using Bazaar on Subversion projects.

Bazaar's biggest strength over all other system is its flexibility.
For example, developers can work in either traditional centralized mode, or they can work in the newer-style, distributed mode. Oh, and they can do it simultaneously on the same repository. Oh, and they can switch back and forth as much as they like.
Bazaar also has two things which are fairly rare to version control systems: excellent documentation and available commercial support.
For me, Bazaar has the most flexibility, best documentation and in general just works. Those things are far more important to me than the fact pulling a branch would be 10 seconds faster with git for example.

Bazzar work slow on large project with huge history (bzr log on file from Emacs sources take 1 minute!).
And have inefficient http:// protocol (designed for local net connection, require ~5 MiB of traffic at least for any remote operation).

Check out Bzrinit for a gentle introduction to distributed version control with Bazaar.

Related

What's the best way to use GIT in our work environment? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
We currently do not use any kind of version control software. We recently started using Eclipse, and our source code is maintained on a network drive. An Eclipse project was created and everyone has imported the project into Eclipse on their machines. Due to the way we are set up, we are always getting stuck in clean/build loops throughout the day which is hurting productivity.
We would like to start using some kind of VCS (most likely GIT). I am envisioning a centralized workflow with each developer having a local copy of the code on his/her machine. We would rather use GitHub Enterprise for the shared repository instead of hosting the code on GitHub.
I am not quite sure where to start in getting this setup correctly. I have been watching videos and reading tutorials, however none seem to directly apply to how we would like to do things. Is GIT the right software to use for the type of setup we desire? Also, how does clean/building work with Eclipse and the local copies vs the shared repository?
First, watch this video.
Second, if you're using Eclipse, you're gonna wanna use EGit. Very detailed tutorial here.
Third, don't throw yourself at GIT. Take SVN into consideration at some point (after documenting on GIT). Maybe a Central Version Control System will do you better than a Distributed Version Control System.
Edit:
Oh and by the way... there's a veeeeeeery long and famous Q&A right here regarding this topic. Best of luck.
Second edit:
As for SVN, here you have an easy tutorial on Subversive, and here you can find the full in-your-face Subversive documentation.
You have your needs now but your needs will change. Save yourself the headache of later moving to Git from SVN and start with Git. Here are the reasons to go with Git over Subversion:
Speed - Git is WAY faster
Disk space - Git history is small. Most of the time it takes up 1/10th the space of SVN history.
No server - DVCS allows no admin and you can skip a centralized server altogether. Your central repository can just be files on a network share.
Integrity - data corruption very easy to detect and correct.
Snapshot history - the whole project is snapshotted for each version. No mixing and matching paths with versions.
Open Source dependencies - most of the projects you may want to use are on Github. You can easily just add a submodule and version that dependency.
Power:
git bisect - find a where a bug was introduced quickly
rerere - reuse how you fixed conflicts if they come up again
supports any workflow
proper 3-way merges - this will save a ton of headaches in the future
rebasing - you can keep your history linear, even after someone merged
My last point is very important. You are just now starting to use source control. Start with the best option. You are at a point where you know the least about your needs. Things you think you don't need right now you will need later - guaranteed.
I would create a git repository on the shared drive, you don't need a server like github at all. After setting it up developers can clone from the shared drive to their local computer and push the changes back when they are done.
Every developer will end up with a local copy of the code where they have their own build environment and never be in each others way anymore.
Start with a sample project with just some files in it and play around with it, since you will need to get some experience with a version control system. Also learn the git command line tools (for windows use msysgit), because most of the examples on the internet are writen for those. For more information on git be sure to read the free git book: http://git-scm.com/book
Also see this question about using git on a windows share: How to git clone a repo in windows from other pc within the LAN?
EGIT for eclipse is the good one to integrate git in your eclipse project environment.
Besides, if you are on windows, you can download the Github for Windows, it's really simple, effective to use.
GIT is certainly the preferred way and nicely integrates with Eclipse IDE. But you could also use Subversion as all you want to have is a local copy of code on user machine(call it subversion branch). I say preferred way because GIT is way too flexible: Offline commits, full copy of body of code versus just branch etc....list is too long.
As you mentioned, you can also use github. Roughly, steps are as follows:
Just signup for it
create a repository.
Get the link to repository and Point it as new git repository in Eclipse
Push your code. Commit it.
You will have your code files in github. This will work provided you have Git installed in Eclipse. I believe Eclipse Juno already is setup with EGit (plugin for Git)
For resolving the build issues, you can use set up some Continuous Integration tools like Jenkins. This can be setup as Eclipse plugin as well.
As some already noted, for question
the best way to use GIT?
in your situation (zero SCM-experience) best and fair unbiased answer will be
Do not use Git at all!
Contrary to "Why is Git better than Subversion?" topic you can also read (some subset as result of fast-recall)
GIT - What gotchas should newcomers to version control be aware of?
What does SVN do better than git?
What are pre-requisites for learning & understanding Git?
and check other topics under git tag with multiple laments of Git-boys.
While Subversion is rather good choice (with some edge corners anyway: you may fall into "Merge Hell" even if you think about development as linear: some branches may and have to happen, into "Refactoring Nightmare" with famous "Tree conflict" error...) you can think about "Usable as Subversion and powerful more than Git" alternatives (even you'll use only small needed part or overall power): - Mercurial "DVCS with a human face, made by software engineers for software engineers, not for fashionable dudes".
MercurialEclipse is answer for Eclipse request (in Aragost recommendation Mercurial users trust)
TortoiseHG is user-friendly cross-platform GUI for all and any Mercurial needs outside Eclipse
Mercurial server require a lot less headache (notably "under Windows"), than equivalent Git-server
Mercurial real experts can be easy found (while Git-boys is more fun-club of rapturous teenagers)

How to share Java project with other developers? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am working on a Java project together with a collaborator, and we are both using the Eclipse editor. What I want to do is to be able to share the .java files with him so that we can both edit it separately but see what has the other has written. Currently, I am doing this is an ad-hoc way by sharing a Dropbox folder that contains the project. However, this approach does not work well because he is using a different version of Java (as he runs a Mac while I am using Windows). For me to run the project, I would have to clear all the .class files that he has created which will appear on my computer since Dropbox just shares all the files.
I have heard of CVS as a way to manage file sharing among developers, but it sounds like a lot of work. I don't know for example how to get a CVS server or what to do to get it to work. Is there an easy and straightforward way to enable us to work together on the same Java project? Is GitHub the answer?
This is definitely the job of source control, as other answers have mentioned, Git or SVN are probably your best choices. Git is the newer one and is gaining a ton of popularity (probably thanks to GitHub).
GitHub is pretty easy to learn and can even take care of a lot of the more difficult tasks for you with their new GitHub for Windows client. They also have a GitHub for Mac client. Once you are more familiar with the tool you can get the EGit plugin for eclipse so you can control the source control directly from your IDE.
Additionally, GitHub created an online interactive tutorial for learning git.
As for clearing out class files (and also your .settings and .project and .classpath files from eclipse), you can instruct git to ignore these types of files using a .gitignore file. You can find templates for various languages (including Java) here.
you could spent the time to learn git at: https://help.github.com/articles/set-up-git
it's a very valuable tool and once you get used to it it will be very easy to share code.
Or better yet, Mercurial. It follows the same approach as Git, but is way simpler and works without hassle. To start a repository within the current directory, just run:
hg init
Have a look at the documentation for more information.
I recommend "Subversion"
Google it and look at the information.
You can easily check out files and check in.
I wish you luck.
Depending on what your future plans are the Git or Subversion would be fine. I finally made the switch to Git after years of using SVN.
Note that in addition to Github (which is great) there are also some other repository hosting services, some of which offer free "personal" accounts (most make your code public, but I think a few still give you a limited amount of space for free).
CVS is getting old and people are moving out of it to other source code control tools
The most famous tools are SVN and Git. There are other tools but less famous I believe
You definitly need a software revivision tool if you are going to work in a team(or even alone for that matters), as it marks the changes that have been made, when and by whom, etc...
google code for example offers an easy way to setup your svn repository in one minute. there are also alot of companies offers such a service online for free or for small money, depending on your need. So if you just need a sandbox, then setup a svn on google code and try it out
a code revision tool is almost a must for every programmer
good luck

Alternatives to Java Web Start? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
We're having huge issues with Java Web Start in production. We're afraid to release because every time we do, help desk gets calls from 1/3 users getting an "unable to launch" error. It's hard to tell whether it's because of user error, cancellation in the middle of download, poor network connection or anything. But the bottom line is:
We find it terribly unreliable.
What are the alternatives for deploying and updating a rich Swing application? Either free or commercial, I'm more interested in features and robustness.
Reliability is key, but I would also like to have the following:
Install once, update automatically from a simple HTTP hosting like JWS
Differential updates
Support for multiple configurations (think of 30 instances which may have different versions of the application or different launch parameters - would be nice not to build 30 artifacts each time)
Win / Mac / Linux support. Hopefully one that does not mean I have to maintain 3 builds for each instance.
I feel your pain, the biggest issue I've had with JWS is visibility, that is, what is it doing and why is it doing it. Most of our issues were related to internal proxies (Java seems to really not like authenticating proxies) and the wrinkles seem to be ironed out for the moment. Nevertheless, I did consider simply writing a replacement. This is not as crazy as it sounds, JWS does an awful lot of stuff that I don't really care about, namely, integrating with the web browser and checking JVM versions. Consider the following scenario:
You launch a Java application (the launch app). This application takes a single parameter which is a URL of a JNLP file.
The launch app hashes the URL and uses this as the basis for a local folder (repository) in which to store any downloaded jars for the app. If the repository doesn't exist, it will create it.
The launch app attempts to download the JNLP pointed to by the URL. If it can't download it, it will just launch whatever is in the repository (maybe warning the user)
If it can download the JNLP, parse it and list any jars that need downloading. If you already have the jars, use something like Apache HttpClient in order to determine whether the server has a newer version and download if required. The important point is that any downloads should be stored in a temporary folder. Once ALL of the downloads have succeeded, you can apply these to the local repository. Ideally, you will back up what is already there in order to allow some sort of rollback procedure.
This should provide some very significant advantages over regular JNLP:
Visibility, you can log exactly what is happening
Much better failure modes: if the download gets interrupted just launch the version that's already there (obviously, this won't work if the interrption occurs on the first download), if you feel like telling the user about it then do so.
By running as a local app you should avoid running into issues with signing of jars, I honestly don't understand the Java Web Start security model with respect to signed jars but it seems that if different classloaders are involved, JWS will complain about it (I think)
Sadly, I'm not in a position to fire you over a working version of the above, I did start a prototype but suspended it. I may have to return to it in future in which case, I'll be happy to share the finished version.
Cheers,
Phil
Currently we are using GetDown to handle distribution of our swing applications. We use Tomcat to distribute updates and GetDown to download those updates. It's really flexible and powerful, and much better than java WebStart and because it produces check sum for changes it saves bandwith and downloads just changed files.
A good tutorial : http://www.hascode.com/2012/05/creating-updatable-java-applications-using-getdown-and-the-getdown-maven-plugin/
You could use an installer: for example Install4j.
You can find a list of installers here: What are good InstallAnywhere replacements for installing a Java EE application?
With Java Web Start being deprecated by Oracle, we are considering using Microsoft's .NET Click Once to download and launch our Java application.
We will have a Click Once .application file run a little MS program that detects Java, downloads our latest jar files and then launches our Java program using the detected version of Java and the Jar files.
Of course, this is only a solution for Windows machines, but we are customers are exclusively on Windows, so this works in that environment.
MS's Click Once: https://learn.microsoft.com/en-us/visualstudio/deployment/clickonce-security-and-deployment
You could also give Zero Install a try. It's cross platform (Linux, Win, Mac), offers jrd download and auto update and has a nice system integration.
Drawback in my eyes that its not easy to handle..
http://0install.net/

Parallel development Pain in Java EE

Do you know any product like Microsoft Team Foundation Server 2010 that solves the parallel
development pain/conflict for Java EE development?
subversion + jira + wiki ...
I have no experience with Microsoft Team Foundation Server, but a combination of source control, continous integration (like Hudson) and a good issue tracker / collaboration tool (like Trac) gives a good overview of current activities / quality over time / current issues / progress while allowing for collaboration through wikis and the issue tracker. Mailing lists and an IRC channel can be a good additions for more permanent and live discussions respectively.
In my opinion Trac is really nice since it is easy to use, has a 'team timeline' and shows great information - code diffs along with issue numbers and developer comments bundled together - giving a great 'togetherness' feeling in the team.
The continous integration solution can provide many different code and quality metrics over time without manual intervention. Great for management.
If you don't mind to pay for good products you can look at Teamcity & Youtrack by Jetbrains. They provide useful tools for team programming.
If you work on an open source project, you can give a try to Hudson & Jira.
And Subversion or git will be a good way to manage your sources.
(Teamcity is free for an open source projects too)
Saros - Distributed Collaborative Editing and Distributed Party Programming
Pretty cool, just requires eclipse and a xmpp server.
I'm currently working in a team of 15 or so Java devs. I don't feel any pain of development. This is an environment using Maven, Subversion & Atlassian tools mainly. Maven makes it comparatively easy to build even large projects. Subversion does a decent job of updating & merging where necessary. Atlassian tools handle bug tracking, code review and automated builds but cost $$$. You could get by with Bugzilla and Hudson.
If by parallel you mean everyone gets their own branch then I suppose you could go with Clearcase but get ready to kiss your budget, sanity and productivity goodbye. Git might be a better choice for that kind of thing.

Java licensing for commercial distribution [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm thinking of using Java to write a program that I might try to sell one day. I'm new to Java so I have to ask, what types of tools/software/etc will I need (from development, to distribution, to user-friendly installation on users' machines) that have licenses that must be considered to make sure they allow sales and closed source code, etc.?
Should we assume the user already runs at least one Java app, and therefore has a fairly recent version of Java on their machine?
Also, do you have any recommendations for specific tools that are definitely suitable for this purpose?
It's very rare to see any development tools that restrict the way you can use software created using them. The only exception to that are libraries, and that is not a problem with standard Java libraries. Tools, IDE and so on - regardless of whether they're free or not - will not affect how you can distribute your code.
There are some weird exceptions, like BitKeeper source control software, the license of which prohibits anyone using it from trying to create software that could compete with BitKeeper - which is why I advise to stay as far away from the thing, and the company behind it, as possible. In the end, if you want to be absolutely legally clear, you'll have to hire a lawyer and have him go through licenses and EULAs for all software you're going to use in your development process, because of stuff like this.
Some specific data points: Java itself is okay (both compiler and libraries); both Ant and Maven are okay; and Eclipse and NetBeans are okay.
For development, you will likely need an IDE. The top picks are:
Eclipse (most features)
IntelliJ (non-free)
Netbeans (easiest to learn, imo)
A few others with much lower popularity
For a free installation program, I've had the best experiences with IzPack, but there are others available. Similarly, to convert to a .exe for easy launching, I recommend Launch4J.
I don't think that its safe to assume that users have Java installed. Many will, but the versions will vary fairly widely, and the few that don't will tend to cause problems. Obviously, this may vary depending upon your intended audience (and how much control you have over them).
For cross platform distribution you might want to look into launch4j: http://launch4j.sourceforge.net/
Also you might also want to obfuscate and optimize your code, for that you can use ProGuard: http://proguard.sourceforge.net/
For your development use any of the open source tools available such as eclipse or netbeans, or even emacs with jdee.
You should not assume users have Java, package a version of java with your application.
For installation you might want to search for some open source solutions, the only one I know of is install4j and it is commercial. http://www.ej-technologies.com/products/install4j/features.html
This is a question that is really hard to answer because the requirement and the preferences of the users are different from each other.
But I will tell you one entry point. Use ECLIPSE as your IDE to develop your Java code. It is an opensource one so you don't need any licence for that. When you are working on your project you will need variety of other tools to do various stuff. Fortunately most of the essential functions are implemented as plugins for eclipse. You can seperately add them to eclipse.
With time, you'll get the experience and you will have enough knowledge to swich to the necessary tools etc

Categories