I can't find any good documentation for the new version of maven (Maven 3)
There are few blog entries that are mostly related to Maven 3 Beta.
Do you know of any official/unofficial documentation or tutorial for Maven 3?
From the Maven3 Plan, you get the Maven3 wiki, which is the closest piece of "maven 3-specific" documentation out there.
You can find the documentation on the official website right here http://maven.apache.org/ref/3.0.2/index.html
The documentation is on the left hand side.
The current Maven 3 documentation is on the main Maven site. It is still getting updated however, and I'm sure would appreciate help with any inconsistencies that you find. Because of the amount of work that went into making Maven 3 backwards compatible, most of the documentation is still valid. The compatibility notes do a good job highlighting the differences.
If you're already using Maven 2 and are looking for reasons to upgrade, see the stack overflow question on whether Maven 3 is worth it.
Also, note that due to the nature of betas/alphas/release candidates, the documentation shouldn't change much between versions, so all the blog posts on pre-release Maven 3s should be pretty much correct.
On a sidenote, I can tell you what is not Maven 3 documentation: Apache Maven 3 Cookbook, shiny new from print this month. It does not talk about sophisticated native americans cooking recipes, but neither does give you anything useful specifically related to Maven 3. Learn from my painful experience and stay away from it (still a decent book on Maven in general, though).
Related
I am looking for Fest APIs for Java swing application testing.
I can't seem to find any APIs posted online anywhere (their website seems to be down) and I've decided to check out the Git repository that you can download the source code from to do what you wish with.
But when I do this there are tons of errors and the Java doc refuses to get generated.
I was curious if anyone knew where I could either find a copy of the docs or if it is possible to generate the docs directly from Git?
As mentioned in fest-assert-2.x issue 167:
Fest Assert is not active anymore these days, you might have a look to AssertJ a fork of fest-assert-2.x.
... And yes, that fork AssertJ does have a JavaDoc API!
http://joel-costigliola.github.io/assertj/core-8/api/index.html
The latest release dates from 10 days ago: AssertJ Core 2.8.0 2017-05-21.
I have been trying to start with studying OSGI for quiet a few days now. I've tried many tutorials to work on eclipse especially to start with apache felix or Equinox but the step by step tutorials never take me to the end of creating even one bundle.
I even tried the console commands with no luck. Is OSGI out dated? All the tutorials on the alliance web site are also extremely old and I couldn't follow them to the end. I also tried the BndTools Totorial here but on eclipse it couldn't resolve "#Component" when I reach 4.3 so I stopped there. When following Osgi Book Preview, I also couldn't find "Make Bundle" so I stopped again. I'm really frustrated. Isn't there a way for beginners to get into OSGI?
UPDATE:
For other people who are interested in getting started with OSGI, I found the book Osgi in Action as very helpful and a good guide for beginners.
The Bndtools tutorial was mentioned and dismissed in the original question; however we were able to resolve the issue. So I post this as an answer for others who might be looking for an introductory OSGi tutorial: check out the Bndtools Tutorial!
Actually there are two questions being posed here, which I asked myself recently as well, one in the title and one in the content. The question in the title seems mostly rhetorical. It expresses a notional answer for the real question that you find at the end of the text: "I'm really frustrated. Isn't there a way for beginners to get into OSGI?"
Answer: There are ways, but they aren't as easy as they should be. The "update" to the question mentions "OSGi in Action". This is a good book (which I discovered too late, it's not really on the top of the search results), but quite outdated with respect to tooling (e.g. Bndtools appears in the appendix only).
Finding no easy way for beginners, I eventually started to dig my way through the topic using an eclectic selection of resources found on the web. I documented my experience in what you might call a log of my (ongoing) journey in the hope that it may be helpful to others. I'll leave it to you to judge whether this can be considered a shy "yes" to the question, after all.
Not having reached "the end of my journey" yet, I'm not perfectly sure why there are so few up-to-date resources for beginners to get into OSGi. I suppose that the attention that OSGi got from a lot of people because it was used in Eclipse was one of the first problems. The attempt of the OSGi alliance to align with enterprise edition features was another (there are references for this, but I'm not allowed to post more than 2 links). Both incidents led first to hype (and lots of articles) and then to disappointment. In the time following, experts understood the technology better and better and applied it successfully to the problem domains where it is of use. (And these are fewer than the initial hype suggested -- or different, OSGi may regain some attention with the IoT.) But as it is often the case in such cases, the (now) experts never felt tempted to write the kind of introductions that you find during the hype-phase of a new technology.
Which brings me back to the question from the title, after all: "Is there a new standard?" (which implies whether it is worth to spend time on looking into OSGi). The answer depends on what aspects of OSGi are important to you. Project JigSaw aims to bring modules to the Java platform and to developers. With a target date of March 2017 for the central JSR 376 I'd say this might be called an "upcoming standard" (provided it gets finished). But OSGi is more than just modules. Other key features are dynamic configuration (I can't see any competing standard regarding this feature) and micro-Services (be careful about that term, it seems to have two different interpretations currently). Eventually, you have to look a bit into OSGi yourself to decide on its usefulness for your project.
You can check tutorials that help you start with OSGi OSGi Tutorial: From project structure to release and OSGi Tutorial: 4 ways to activate code in OSGi bundle
There's a lot of outdated tutorials out there, outdated documentation, and stuff which is deep in the Java EE thinking bog - incomprehensible if you're not familiar with the problems arising from the solution to the problems arising from the solution to some obscure Java decision in the previous millennium, which you're now stuck with in your mammoth EE app.
Today, there is the OSGi enRoute projects which provides a set of pretty nice tutorials, along with an OSGi "distribution" which makes dependency resolution easier. My understanding is that a lot of the additional services in enRoute are en route (ha!) to becoming the OSGi Release 7 standard.
If you want to do new development in OSGi, it's what I would go to for sure. In fact, even if you want to use OSGi in some legacy-support function, I'd read up on the enRoute way first, before getting into all the ugly compromises needed for legacy's sake.
If you are mainly looking for server side OOGi then using maven and the maven bundle plugin works very well. See http://www.liquid-reality.de/display/liquid/2011/02/15/Karaf+Tutorial+Part+1+-+Installation+and+First+application
Apache Karaf is an OSGi container that I believe makes OSGi, 'easier,' to understand and work with. You might consider getting this installed and just try it out. Documentation is pretty good as well. Take some time learning about a running OSGi container; watch it run first trying out a few commands and then deploy some simple bundles while putting a tail on the karaf.log.
Seeing Karaf running will help you understand more about OSGi and what it takes to get a bundle built and deployed/running.
IMHO: Both BndTools and Maven Bundle plugin are fantastic resources for OSGi development.
I've read the HornetQ FAQ, but I can't find anything related.
I'm using HornetQ 2.2.5, it contains a bug (yeah, just one ;). According to this post https://community.jboss.org/message/624958?tstart=2 it's been fixed from 2.2.7.Final onward.
On the main download page, http://www.jboss.org/hornetq/downloads the latest version available is 2.2.5.Final. I'm not scared of compiling a newer version myself, but can I consider it stable?
I'd say yes since it's a minor release update, but I'd like some other opinions. Thanks.
This answer uses the 2.3.X branch as an example. Let's skip looking at their Downloads page, and go straight to the artifacts:
http://mvnrepository.com/artifact/org.hornetq/hornetq-pom
You can see that 2.3.X went through Alpha, Beta and CR stages, to finally reach 2.3.0.Final, the Community release. This is what most people in the open source world would end up using, and what you will find available for easy download.
It's also the last version the non-paying customers are intended to use (in the typical JBoss release cycle - see e.g. the JBoss AS/EAP FAQ). Now, from a commerical perspective, 2.3.0.Final would be considered Alpha again. An analogy from the JBoss AS/EAP FAQ which probably applies here too: "The first EAP stage Alpha is of equivalent, or better, quality to a community Final release [...] we don't recommend using it in production" (probably an overly harsh judgement, but anyway.)
After 2.3.0.Final, they fix more bugs (2.3.1.Final, 2.3.2.Final, ...) until they get to a commercial production release (which they bundle into their other commercial products). So, you should be using the latest .Final that you can for production (for the 2.3.X branch, it was 2.3.13.Final).
Do you have to pay for 2.3.13.Final? From what I can tell, you don't. (HornetQ is also not available commercially AFAICT, except when bundled into other products.)
How do you get 2.3.13.Final? You probably won't find a nicely packaged RPM or even zip file. Instead, you will need to get the JARs from public Maven repos (or build from source).
Do you need a postgrad degree in JBoss Versioning and Product Naming to use their products? Perhaps :) - I don't have one, so apologies in advance if I have failed to comprehend the enormous complexity of the beast. But I do wish the HornetQ developers would make it easy to get a stable release of their product, and know that this is what one is using. It's a good product (perhaps the most fully featured of the lot), with an excellent manual, but a snap judgement of the download page and FAQ may make some people look at competing projects instead.
Well, after some more research, I can say yes, it is stable.
In particular, JBoss EAP 5.1.2 package includes HornetQ version 2.2.10.GA.
I wonder why there is no direct link on the HornetQ download page.
I am trying to get up to speed with Java after spending my last couple of years with Python and Perl. And boy is this hard! First of all, there's no easy to use build system that can do only what you want it to do without adding tons of boilerplate. Then, how to add dependencies to your project, how do you run junit tests from the build systems (say ant for example)? How can I make the build system download the dependencies on the fly (or can't I?)
Can I find some docs around that can get me up to speed with this without reading a couple of books ? I am trying to be "agile", but the comeback is hard.
Please feel free to close it if it is too subjective. Thanks!
This question is close to textbook trolling... anyway.
There are a lot of build systems that resolve dependencies for you out there (maven, ant, buildr, etc).
I'd say go with buildr since you are familiar with scripting languages.
NOTE
Though many people pointed out maven, considering your background (perl, python, etc) that will make you hate java even more (it's a sea of <XML> out there dude!). Please consider buildr if you feel frustrated enough
You don't mention which build systems you've tried (other than ant). I feel either Maven or Gradle would meet your needs (although I think Maven might fail your "tons of boilerplate" test; it certainly fails mine).
There are an awful lot of questions here. "Maven" is the Java build system that automatically downloads dependencies; it is based on Ant, which does everything else you ask about (running tests, etc).
If you want to use Maven, get started by using Maven's quickstart docs and examples.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
From my small amount of experience, I've only used Ant as a build tool. Are there any other projects which are better, and why?
Maven
It is much better than ant because for most common tasks you don't have to write a complicated build.xml, maven has very good defaults and it's all convention over configuration.
It has also a big central repository of libraries and it's very easy to configure it to, like, "use latest stable commons-whatever". Maven will then download the latest stable version for you (no more checking in jars into VCS) and if a new upstream stable version is released, it will download it as well. Of course, it's just as easy to lock it to some specific version should you need that.
It is also well integrated both with Netbeans and Eclipse (m2eclipse plugin) so the IDE honors whatever settings (including dependencies) you declare in the pom.xml file.
There are also some downsides to maven: some plugins are rather poorly documented, integration with both IDEs is not really perfect, and that in different ways, some error messages may be hard to understand.
Ant is still a major player. In my experience, it is dominant. Plus, with Ivy, it handles some of Maven's strengths. IMO, Ant will become a framework for other tools: XML is too rigid (see link below).
Maven 2 is also a major player. I know people who quite like it and bristle at criticisms that were true for Maven 1 (it has come a long way).
Groovy is offering some cool stuff in the build space, because they build on Ant. Gant is used in Grails, but may be subsumed into Gradle. These can be used for Java as well.
At the risk of pimping my own blog, here is a post about Gant and Gradle. Here is a link to the very current debate about their future.
in the enterprise, ant is still the entrenches player. dependencies don't change fast. unlike open source projects that keep moving to fairly newest version of dependent jars, MOST enterprises try NOT to change their dependencies too fast. Given that, maven's advantages are NOT too much compared to ant.
Then again, if you want some of maven's features, ant folks have ivy (http://ant.apache.org/ivy/) for the dependencies feature.
IF you want to continue using ant, get hold of "ANT IN ACTION", 2nd edition so that you can use ant to the best productivity.
Good luck,
Some people like Ivy, which is a dependency managing thingy for Ant so I suppose that people coming from an Ant background will like it.
Others like Buildr. It's a JRuby thing, so if you can juggle Ruby and Java in the same projects, then I suppose it'll be interesting.
Personally, I just use Maven. It's easy to whip up a default pom.xml file and have all the build commands at your disposal. And when the project grows, you already have the infrastructure in place for running plugins and adding dependencies.
You also have Gant. Gant is Groovy + Ant, you can write your tasks in plain groovy and you can also call any ant task. If you are a Java shop and want to reuse the ant skills you have but dislike XML, I recommend Gant, it is ver easy to setup and you can embed it in ant (and also call gant from ant).
I really like SCons, which is a build tool whose configuration files are all just Python scripts. This will appeal to anyone who knows Python or similar scripting languages. SCons is designed to work well with Java as well as C/C++ and other languages, and I've been very satisfied with it in the past.
Because SCons files are written in Python, you can write arbitrary Python code if you find yourself needing to do anything special. However, if you're completely unfamiliar with Python, then there will possibly be a higher learning curve than trying to extend Ant or something similar to do what you want.
Maven2 seems to be the up and coming thing.
For our projects however we are migrating back to ant wherever feasible.
Maven2 requires quite a bit of knowledge to get it exactly the way you want, and Maven2 versions seem to handle classpaths differently.
And it is a pain to check all licenses included in the dependencies of the dependencies which may get drawn in.
And may have a slower start-up time, as you need to figure out the dependencies yourself, but at least it's easily readable. No magic going on here :)
If you do use maven, give a thought to an internal repository like Nexus. That way your software is not dead if some libraries decide to go away from the net*.
*We got burned with maven1; the ibiblio maven1 repository redirects and maven1 does not support redirects :(
I would urge you to start with your requirements when considering the right tool. Each project is different, the tool you use should reflect the problem space not the fashion.
That being said, I think for general use ant is still probably the best general tool for building java applications. It is often used effectively with other tools for dependency management but there we go again skirting off into a solution without a problem.
The very good news, is that if your process are good switching build tools is a fairly painless process - lesson - start with a good process scaled to the problem at hand.
You will find already some answers in What are some good java make utilities?.