Showing posts with label Work. Show all posts
Showing posts with label Work. Show all posts

Thursday, January 24, 2008

Sun Academic Initiative | TU-Vienna

In my last two posts, I talked about how you can find the right websites to get a Sun Certificate. On the Prometric Website if you select Sun Mircrosystem you will have two choices: the SUN Academic Initiative (212) and the Sun Microsystems (310, 311) and there will be a big price difference between those two options. You will find the corresponding price list for the regular Sun Microsystem Certifcates in my last post.

As I saw the big price difference (the SAI is only 129 Bucks) I tried to figure out how I'm able to do that kind of exam instead of the regular one and what the preconditions are. So I googled SAI and I found out that my university (TU-Vienna) offers possibilities to get the right information about the SAI for students.

Here you will find a guidance on how to register for SAI over the TU-Vienna. On this website you will find a link to register to the SAI-Portal. If you scroll down you will find all necessary resources for the SAI. So what the TU provides is the possibility to use Sun's online training for free. You just have to pay 2,70 Bucks for the ZID's administrative effort but that's affordable.

So, I think I only have to pay 129 Bucks for the Exam and not the 210 which I've blogged about. Well, that's pretty cool.

Links:

Cheers

Wednesday, January 23, 2008

Java Certificates Prices

In my last post I tried to find out how much Java Certificates do cost in Vienna but I couldn't find the right information on the WIFI-Website. So I called the WIFI's IT-Center on last Monday and they gave me more information about these Certificates. They told me to go to the Prometric-Website and there I was able to find the prices for all Certificates. You just have to select your country and then you have to choose the Client and the corresponding Program. I chose Sun Microsystems / Sun Microsystems and then you will find all possible exams and prices. The following list shows all exams which I'm currently interested in:

Sun Microsystem:

  • 310-019 Sun Certified Associate Java Platform SE Exam Version 1.0 210 Euro
  • 310-027 Sun Certified Developer For J2SE 210 Euro
  • 310-035 Sun Certified Programmer For The Java 2 Platform 1.4 210 Euro
  • 310-051 Sun Certified Enterprise Architect For J2EE Technology 210 Euro
  • 310-055 Sun Certified Programmer For The Java 2 Platform SE 5.0 210 Euro
  • 310-061 Sun Certified Enterprise Architect For J2EE Part 3 210 Euro
  • 310-065 Sun Certified Programmer For The Java 2 Platform SE 6.0 210 Euro
  • 310-081 Sun Certified Web Component Developer For J2EE 1.4 210 Euro
  • 310-091 Sun Certified Business Component Developer Java EE Platform 5 210 Euro
  • 310-220 Sun Certified Developer For Java Web Services 210 Euro

Today I also found out that some of my colleagues at work would also like to get a Java Certificate (310-055) We are now making preparations together at work for the corresponding exam. A Wiki also was created to organize and save all information online so that everyone who joins the learning-group will be always up to date on the latest information.

Links/Telnr:

I'm very excited about learning for this exam and I'm dying to get more exams in the future. So, the next step is to find out the date when the next exam will take place. As soon as I know all possible dates I will let you know in another post.

Cheers

Saturday, January 19, 2008

Java Certificates Overview

In the post about my last IBM course I wrote a bit about the lecture's consulting job. He told me how his life looks if he isn't busy on teaching some courses to other it-people and that's the topic of this post. Certificates, it's all about certificates. In his job he has to constantly learn about new technologies and get the corresponding certificates for those technologies. I mean how cool is that, the fact to always learn something new and then you'll be able to teach about it. So, that's why I tried to figure out how am able to get such certificates in Vienna, how difficult those are and of course how much they cost.

Because I love Java I first got onto the Sun Microsystems website to get an overview about all offered certificates and will always get a good description about the course's preconditions and so on. My problem was, or better my problem is, to figure out how much those certificates are. I mean, Sun only presents the corresponding course-price for the certificate but as I heard it is possible to get those certificates without doing the course by only passing the exam. So, I searched through the WIFI website where I had my last IBM course. In the following link-list you will find a pricelist but this list is provided by a WIFI of another federal state, hence not from Vienna.

Because today is Saturday I won't be able to call the WIFI's Information Center but on Monday I'll try to get more information about the certificates. In the pricelist the Java Certificates are all about 51 bucks so that's pretty affordable. I will let you know if I have found more information on getting a Java Certificate in Vienna. Of course you are welcome to post your experiences in this section.

Sun Java Certificates: Total Overview

WIFI:

Sun Certified Java Associate

  • Total Overview: SCJA
  • Online Test-Questions: SCJA Sun Certified Java Associate Mock Exams

This link-list will be extended as soon I have more information.

Cheers and good night.

Friday, January 18, 2008

IBM WAS v6 Advanced Administration | Course Sum Up

Today I completed my second IBM Websphere Application Server course. The course's topic was the advanced administration of IBM's Application-Server. Regretful I have to say that I didn't learned anything new L. The course's content was almost the same as in the basic course but this time we had only three days instead of four and three days were not enough to include all chapters and units.

The only two big differences were that the lecturer of this course was much better in performing the units. I really believe that he was, or better, he is a professional WAS administrator and also his presentation style was very enjoyable. He didn't read off the slides all the time and he also spoke about things which the lecture-slides didn't cover.

The second thing was the lecture's course environment: we worked remote over Citrix on VMWare images which were provided on workstations in Atlanta, yes in Atlanta ;-). Each student had to work on three workstations (Win XP, 2 Linux (Fedora)). This time IBM really tried to create a real-time-scenario where you have installed different os-versions on different workstations. The fact that we also had two Linux-workstations didn't really help us. We had a lot of troubles creating a cluster because of different user-rights. The Linux-workstations were our two cluster-members and on the dev-workstation (WinXP) our Deployment Manager was installed.

But I don't want to get too detailed here. Maybe if I have more time in my university-holidays to post a few things about the environment and my experiences with Citrix and the remote-workstations. Today I had the chance to ask the lecture about his job and how somebody can become an IBM-"Consultant". He told me a lot about Java- and IBM-Certificates and how difficult it is to get them or better how difficult it is to pass the corresponding exams.

After this talk I really acquired a taste of becoming an IBM-Consultant because I really like the fact to travel around and teach about very cool technologies (not only IBM or Rational products) but also about Java and Open-Source technologies and if you don't have to teach any courses you have to learn to get new certificates and that is really cool but we will see what will happen because right now I'm really, really happy with my current job. In the end my Course-Certificate ;-)


Cheers

Sunday, September 02, 2007

Enterprise Java Beans

  • Wieder verwendbare Software Komponenten
  • EJBs Kapseln Anwendungslogik
  • Verfügen über keine Darstellungskomponente
  • Der Einsatz von EJBs lohnt sich erst ab mittelgroßen Systemen bei der verschieden Applikation auf die gleiche Businesslogik zugreifen.
  • EJB-Container ist notwendig

Aufgaben eines EJB-Containers

  • Überwachung des Lebenszyklus von EJBs
  • Instanzen-Pooling
  • Namens- und Verzeichnisdienst
  • Transaktionsdienst
  • Nachrichtendienst (Message Service)
  • Persistenz

Beans

  • In sich geschlossene Software-Komponente

JavaBeans

  • Eine JavaBean inst eine wiederverwendbare Software-Komponente, die mit einem Builder-Tool visuell manipuliert werden kann.
  • JavaBeans ist nichts anderes, als eine Sammlung von Eigenschaften einer (grafischen) Komponente.
  • Datencontainer mit bestimmten Eigenschaften eines Objekts.
  • Erlaubt diese Eigenschafte auch dynamisch zu erkennen und per Reflection zu manipulieren.
  • Konzentriert sich im Wesentlichen auf die Persistenz dieser Eigenschaften.

Enterprise JavaBeans (EJB)

  • Die EJB-Spezifikation beschreibt nun ein Framework, dass die verteilte Verarbeitung von transaktionsorientierter Geschäftslogik ermöglicht.
  • Bleiben für den Benutzer stehts verborgen.
  • Werden im Wesentlichen durch die APIs und Services definiert.
  • Kern der EJB-Technologie ist der Methoden-Fernaufruf (RMI).
  • Stub, Skeleton, Broker
  • Restriktionen siehe J2EE Codebook Seite 604

Entity Beans

  • Schnittstelle zur Datenbank oder anderen persistenten Speichermedien.
  • Repräsentieren ein Objekt der Business Logic.
  • Bean Managed Persistence vs Container Managed Persistence
  • Muss immer einen Primary Key besitzen.
  • Lebenszyklus siehe J2EE Codebook Seite 605

Session-Beans

  • Implementieren Geschäftsprozesse (e.g. Überweisung zwischen Konten)
  • Session-Beans operieren auf Entity-Beans
  • Stateful-/Stateless Session-Beans
  • Stateful Session-Bean: Für die gesamte Dauer des Session dem Client zugeordnet
  • Stateless Session-Bean: können auch unbemerkt innerhalb einer Session ausgetausht werden (vom Client unbemerkt).

Stateless Session-Beans

  • Diese vergessen, nachdem eine Operation abgeschlossen ist, den Client augenblicklich und können zu keinem Zeitpunkt entscheiden, ob sie mit dem aktuellen Client schon einmal verbunden waren.
  • Werden vom Container über einen Pool verwaltet.
  • Es ist nicht möglich Werte in einer Instanzvariable zu speichern.
  • Von ihnen bereitgestellten Methoden ähneln damit statischen Klassenmethoden.

Stateful Session-Beans

  • Können ihren Zustand in Instanzvariablen speichern. => Koversationsgedächtnis.
  • Client arbeitet stets mit der gleichen Instanz.
  • Verfügen über einen inneren Zustand, der häufig den Zustand und Fortschritt eines bestimmten Geschäftsprozesses darstellt.

Message Driven Beans

  • Ermöglichen ansynchrone Kommunikation von EJB-Komponenten über den Java Message Service (JMS).
  • Sind im Grunde erweiterte Stateless Session-Beans bei denen die Partner nicht mehr aufeinander warten müssen und parallel weiterarbeiten können.
  • Hinterlassen eine Nachricht (mit gewünschter Operation) im MessageQueue des Empfängers und schauen von Zeit zu Zeit in Ihrem Eingang, ob eine Antwort vorliegt.
  • Client kommuniziert nur über eine MessageQueue mit MDB.
  • Besitzen keinen inneren Zustand.

Bestandteile einer EJB

  • In der Regel besteht eine EJB aus mehreren Java-Klassen.
  • Home-Interface dient dazu, die Bean zu erzeugen.
  • Home-Interface muss von EJBHome abgeleitet werden.
  • Über das Remote-Interface kommuniziert der Client mit der entfernten EJB.
  • Dieses deklariert alle Methoden die der Client auf dem Objekt aufrufen kann.
  • EJB-Implementierung bildet den Kern der EJB-Anwendung und nimmt die gewünschte Geschäftslogik auf, implementiert die Methoden des Remote- und des Home-Interface, die erforderliche interne Repräsentation der Daten sowie Methoden, über die der EJB-Container die Bean verwaltet.

Eine Session-Bean erstellen

  • TODO

JNDI

  • Es handelt sich bei JNDI um eine Schnittstelle.
  • Die konkrete Implementierung wird auch Service Provider Interface genannt.
  • Naming Service = Name assoziiert mit einem Objekt
  • Directory Service = Zusätzlich können auch noch Attribute (read/write) gesetzt werden.
  • Beim Naming Service müssen die Objekte aller Kontexte von ein und demselben Typ sein.
  • Kontext = Suche, Auflistung von Objekten sowie die Erstellung und das Löschen von Einträgen.
  • Ermöglicht es, flexible Verbindung zwischen unseren Komponenten zu verwenden und diese damit zu entkoppeln.

Naming Services

  • Verbindet eine Menge von Namen mit Objekten eines bestimmten Typs.
  • Diese können in einem Kontext abgelegt werden.
  • Syntaxregel = Naming Conventions
  • Atomic Name (e.g sun), Compound Name (e.g. java.sun.com), Composite Name (e.g. java.sun.com/home/index.jsp)
  • Namenskonventionen Buch Seite 182

Directory Services

  • Ein Directory ist eine Menge von Verzeichnisobjekten, Directory Entries, welche bestimmten Objekten oder Referenzen auf Objekten zugeordnet sind. Im Gegensatz zu den Naming Services sind Attribute möglich.
  • Klassisches Beispiel => Telefonbuch
  • RDBMS vs DS Buch Seite 184
  • DS => über das Netzwerk verteilte, hierarchische Datenbank, die auf einem Client/Server-Prinzip basiert.

LDAP

  • Unterstützt im wesentlichen den Zugriff auf Verzeichnisse und emuliert andere Funktionen lediglich.

How To

  • File System Service Provider speichert gebundene Objekte in versteckter Datei (.bindings), die sich unter Windows im Root-Verzeichnis des aktuellen Laufwerks befindet.

Thursday, June 28, 2007

Debugging Custom Maven Plugins

What you need:

How to:

Code Snippets and Todos for debbuging:

  1. Write a custom Maven Plugin! (@see code snippet 1)
  2. Write a Maven Project which uses your maven-plugin (@see code snippet 2)
  3. Install everything in your local maven repository (mvn clean install)
  4. Set a breakpoint in your custom maven plugin. (@see code snippet 3)
  5. Open the debug-view in Eclipse (@see pic 1)
  6. Invoke your plugin's sayhi-goal in your maven project via m2eclipse-plugin by configuring it over the external tools settings in Eclipse. (@see pic 2)
  7. Eclipse then will automatically stop where you have set your breakpoint! (@see pic 3)

Code Snippet 1:

Code Snippet 2:

Code Snippet 3:

Pic 1:



Pic 2:

Pic 3:



How cool is this!! Finally, you don't have to System.out.println everything to check your custom maven-plugins' variables. Very, very helpful !!!

Cheers

Tuesday, June 26, 2007

Maven | Resources

Because at work I had to prepare myself for a presentation about the fascinating build-tool Maven I'd like to summarize all resources which I've used to get prepared.

Official Sites


Online Articles and Books

Magazines

  • Eclipse Magazin (Vol. 7 Ausgabe 3 06) - m2
  • Java Magazin (09. 06) - Maven 2

Maven Proxies

IDE Plugins

Blogs

Of course this list will be extended and if you have any good resources on maven which is not my list, you are welcome to leave me a comment with a link to this resource.

Cheers

Friday, June 22, 2007

Maven 2.0.7 | Out now

Here you will find the release notes. In this post I'd like to check the new version of Maven and I'd like to describe all changes in my mother tongue (german) because you'll find the english version of the release notes on the official maven-website. So, lets switch to german:

Release Notes Maven 2.0.7

Verbesserungen

  • TODO

Wednesday, May 09, 2007

Artifactory Dependency Viewer

Here are some nice digrams of my bookstore dependencies. Your able to see all direct and all transetive dependencies. You just need to use Artifactory as your Maven-Proxy and then you can get the Dependency Viewer which generates those cind of diagrams. Very nice!

From Misc

And now with all test-dependencies turned on (only junit ;o):


From Misc

You're also able to customize the diagram by dragging the dependencies where you want to have them. You just have to pass the pom-file of the project of which you want the dep-viewer to generate the diagram.

Try it out!

Cheers

Friday, April 27, 2007

Artifactory 1.2.1-rc1 released

Today I changed my Artifactory maven-prox version from 1.2.1-rc0 tp 1.2.1-rc1. Just copy the bin, lib, webapp and artifactory.jar to your existing artifactory application and overwrite it. Then restart your proxy and everything just should work right. To get the actual release-notes please check out the following link.

From Maven


From Maven

Take care

Continuum vs. Derby and how to...

... stop an invoked build on the build-server (Continuum) which seems to run in an endless loop. Yesterday, it was the first time we had a problem with one of our projects on the build-server. After a three hour build one of our core-developer came over to my place and told me to stop the project on Continuum because some of our India-colleagues checked in some bad code which caused an endless loop on the database-side of the application.

So how am I able to stop a running project on Continuum? After a ten minutes search on the web-interface of the build-server my second thought was to restart Continuum but despite of the restart the project still kept building so Continuum some how remebers the state of the project's build. *confused* The next thing I did was to find some threads on Nabble.com of developers who maybe already had the same problem as we had and finally I did.

So, after I have finished reading those threads it was clear that I had to handle this problem by manipulating Continuum's database (Derby). So how am I able to do this when the build-server is on a different machine and I'm not allowed to install any oder software on this machine.

I rememberd the fact that NetBeans had it's cool integrated database-ui, by the way this IDE has also integrated support for Derby-databases, so I tried to connect to my Continuum-database by using NetBeans. First I had to stop Continuum or NetBeans would not allow me to connect to the database. After I had stopped the build-server it finally was possible to connect to the Derby-database over NetBeans. So it was possible to connect with the following connection-string: jdbc:derby :\\server\D$\path\to\derby


But then I had the problem that I didn't know which schema I should use to connect to so I tried out every of it. Another problem was that I couldn't see the tables of the database schema so I had to guess the name of the table. In one of the threads there was a sample select-statement but this was only to change the role of an user.

From Maven

So after a while of studiing those threads I found a log-file and saw that Continuum creates all tables on start up and in this log-output I found some tables and one of it was the PROJECT-table and after a 'select * from SA.PROJECT' I saw all installed projects. A second table was the BUILDRESULT-table. The last entry in this table was the project which caused the problem. So I decided to delete this entry.

From Maven

After restarting Continuum the project wasn't building anymore and then I invoked a 'Build All' and today everything was fine. There is one thing I'd like to mention, in one of a thread that I didn't post was a suggestions to invoke a 'Build All' as solution to stop a project but an answer to this post was that this doesn't work so I'm not sure if my decision to delete the entry from the table was the right solution or the that I invoked the 'Build All'-command over the web-interface of Continuum.

But everything works fine now and maybe this may help you or will give you some ideas if you also run in such kind of problems with the Continuum build-server.

Cheers

Wednesday, April 25, 2007

Maven & Co

Today, I decided to set up myself a reference-environtment with the following technologies and how you have to configure this tools that they work properly together. The following list shows all technologies and their versions I've used to set up this environment:

Reference-Project Bookstore

My plan is to develop an online bookstore just to show how maven works with a small web-app which consists of some submodules. In this first post I'd like to show only the build-configuration settings for this web-app. First I created a file structure where to store all my tools, projects and their settings. I created the following folders:

  • Continuum (my Build-Server)
  • Locals (my local maven-repository)
  • Projects (all my projects)
  • Proxies (all maven-proxies => e.g. Artifactory)
  • SVN (my Suversion-Repository)

The following picture shows the file-structure. I haven't collapse all folders because those are just some configuration-specific folders of the tools.

From Maven

All folders marked green are ander Subversion source-control. After I created this structure I had to create a subversion-repository. You just have to invoke the command 'svnadmin create path/to/your/custom/folder' and then import your structure with 'svn import /path/to/repo/ -m "some message"'. Then you have to checkout the project for the first time with 'svn checkout /path/to/repo'.


If everything works fine you can now set up you Continuum build-server to interact with your subversion-repo. This server will execute a specific maven commands (which you will be able to configure) to a certain time (cron job syntax) so you always will haven an overview of the checked in sources and if the application is clean.


There is one custom configuration you have to do if you would like to use the file-protocoll when you would like to set the path to your project's pom-file. By default the file-protocoll is turned off but you can turn it on by setting the 'allowedScheme'file'allowedScheme' in the application.xml of continuum which you will find in the CONTINUUM_HOME\apps\continuum\conf folder.

From Maven


After changing this property everything should work fine. Now you will be able to set up a maven-proxy which enables you to share your application and other artefacts with more developer.

From Maven

Artifactory is really easy to configure but I'm still a bit confused about some settings. I'm going to write about it in upcoming posts. There is only one thing, if you are behind a proxy you have to configure it in the artifactory.config.xml which you can find in the etc-folder of your Artifactory-installation. The following screenshots show some interesting maven-settings about the scm-Tag (Subversion) and the distributionManagement-Tag which configures the path to the snapshot-repository where you can deploy your snapshot-releases to the Artifactory repositories.



From Maven


From Maven

The last thing is to install a webserver where you can deploy your project-site. I have installed Xampp for this kind of purpose. You just have to confiugre your site-tag within your distributionManagement-Tag and then after invoking the mvn site:site site:deploy command your complete project-site will be generated and transfered to your configured path.

So now you have set up a good infrastructure to develop your application and can concentrate on your application logic. In upoming posts I will begin to design my bookstore-application and try to solve the remaining build-configuration-issues
.

Of course you're welcome to descripe your best-practices with this kind of technologies and I also would like to mention the fact that this is not a complete description but should give you an idea on how to set up a possible way for a building-environment for a Java-based web-application.

Cheers

Tuesday, April 24, 2007

Archivia doesn't work either

In my last post I tried to find a solution to learn maven to skip external, public repositories e.g. Ibiblio/repo1 if I invoke any maven-commands and only check the local and the internal maven-proxy. First I thought Archiva was the solution for my problem but I was wrong. Archiva will also behave like Mave-Proxy if I configure any remote repositories over Archivia's web-interface.

So, I kept researching and after a while I found another maven-proxy called Artifactory. As I read the description I recognized the fact that Artifactory is a complete rewrite of the old Maven-Proxy with many new features. For a detailed overview please check out Artifactory's official website.

So, filled with new hope I installed Artifactory and after a few configuration-troubles maven and this new proxy worked fine, but to my regret the feature I would like have also didn't work so I decided to write a mail to Artifactory's lead-developer and hope he will have a solution for my problem.

In spite of everything I would like to mention the cool Ajax-based feature of Artifactory's repository-browser and pom-preview. The following picutres shows the login, the browser, a right click on a pom-file and the preview.


From Maven


From Maven


From Maven


From Maven


I also found a thread on Nabble where two workarounds are described but both of them didn't work with my environment. So please, if you have any ideas let me know! *help*


Cheers

Friday, April 20, 2007

Maven 2 featuring Archiva

The last days I spent some time on finding a solution to help the developers at my office, to get their build process faster. All the developers (still) use Maven 2.0.4 as their build-tool and Maven-Proxy as their internal office repository. But what is the concrete problem now. So far everything sounds pretty easy to understand and you might aks yourself why there are any problems. If you have already some experience on how to use Maven in combination with an internal Maven-poxy for your build process then you know of course how maven's build lifecycle works. If not please check out the description on the maven's main homepage.

But what is the problem? Everytime a developer invokes some maven commands, maven checks if there are any new versions of the used artefacts. First maven checks the local, then the internal proxy and then all of the configured external repositories. But how can you configure maven only to check the local and internal maven-proxy and to skip all the external check? So I decided to configure a local configuration of the same environment we use at work with a little difference: I use maven 2.0.6 and the Archivia proxy.

I configured my old local ./m2 repository which I used with maven 2.0.4 at work as my internal (but don't muddle up the local repository with the internal one) repository and created a new local repository on my C drive which i called "M2_Local". So if you are a bit confused now have a look at the following drawing.

From Maven


By the way you can configure all these changes in the settings.xml of your Maven installation. I will explain this changes more in detail later in this post. If you set up your Archivia-proxy successfully then you will be able to add some repositories which should be monitored by the server.


From Maven

Now, back to the actual problem. So, if a developer invokes e.g. a mvn install then Maven checks every artefact if there is a new version somewhere on the web. But what if the developer knows that there aren't any updates and just would like Maven only to use the internal office-proxy. Of course I know the -o (offline-mode) option for Maven but this also will skip the internal proxy. Why should a developer want to skip the external repositories anyway?

If you have a very huge business module which is devided in many, many submodules and e.g. the Maven core-developer do some restructering work on the public repositories at same time as you work, then it's possible that even a simple mvn clean command can take very, very long (~20 min) because the online-checks of Maven are extremly slow. So what can we do something to stop Maven doing this online-update-checks?

My first idea was to configure the maven-proxy (in my case Archivia) also as external repository in the settings.xml. You just have to set the id of one repository to 'central'. Now Maven won't check other external repositories except the configured one.


From Maven


So if your project needs some artefacts which aren't already in your local or internal proxy repository, the build will fail because Maven doesn't check the public repositories e.g. repo1 or Ibiblio. Here you can see the BUILD FAILURE and the configured remote repositories.

From Maven

If you would like to receive updates again, just uncomment the 'central' configuration or rename the id to any other name than 'central'. In fact this is the bahaviour I'd like to have. The problem is, that the maven-proxy (Maven-Proxy not Archivia) will still check the remote repositories for updates. I think that's because you can set this configuration in some property file of the Proxy. The following code-snipped is from the Maven 2.0.4 which we use at work:

From Maven

As you can see, the id 'central' has also been set but Maven still checks the public repositories. *confused* The following picture shows that indeed Maven checks the internal maven-proxy but stills receives data from repo1 or Ibiblio.

From Maven

I also checked if there isn't the artifact I'd like to receive on any public server by changing the version number of the artefact to an ivalid one. Maven prints out the following set up remote repositories:


From Maven

So it must be a Mave-Proxy specifig configuration. I don't have a better explanation but I'll keep on researching that problem. Maybe also Archivia will behave like this if I set up remote repositories over the Archivia's web-interface.

But I will write more about my experiences and if I have found a solution in later posts. Maybe there is a simple Maven-setting for this problem which I haven't found yet. You are welcome to post some better solution for this problem.

Cheers

Tuesday, October 03, 2006

CPB Software AG | FORMAT

Yeah .... It's time to show off a little! In the current Austrian Magazine FORMAT there is a very interesting article about the company (CPB Software AG) that I work for. The article is about the cooperation with the developer-team WIPRO in Pune (India) and the CPB's Austrian developer team and how global team-work becomes more and more popular.



You can download the article under the following: CPB Software AG @ FORMAT

cheers

Thursday, August 17, 2006

Maven 2.0 - Transitive Dependency Problem

Although i really love the automated dependecy handling of maven 2.0 i think it's still buggy. At work we have a submodule of a business module (testroot) which has a lot of dependencies and as i executed the mvn site command to look at the generated dependency.html i found something weird.

In the transitive dependency section of the dependency.html, dom4j with the version 1.6 was defined. However i had a look at the dependency tree, dom4j was defined as a transitive dependecy of commons-collection.jar(version 1.2) but it had a different version namely 1.4.

After i executed the mvn -X compile and piped the output into a tmp.txt-File i found out that hibernate had also a transitive dependency of dom4j and that was the version which was shown in the transitive dependecy section of the dependency.html (1.6).

Because of this problem i had a look at the 'Better builds with Maven' online-book and i found the following:
With the introduction of transitive dependencies in Maven 2, it became possible to simplify your own POM by only including the dependencies you need directly, and to allow Maven to calculate the full dependency graph. However, as the graph grows, it is inevitable that two or more artifacts will require different versions of a particular dependency. In this case, Maven must choose which version to provide.

In Maven 2.0, the version selected is the one declared “nearest” to the top of the tree - that is, the least number of dependencies that were traversed to get this version. A dependency in the POM being built will be used over anything else.

That's why the transitive dependecy of hibernate is being used. But as you can see in the following screenshot of the dependecy tree, under hibernate there isn't a dom4j transitive dependency. So the mvn site command alternatively only the dependency-site is buggy.

If you have any suggestions how to prevent this problem please post them. Maybe with the next release of maven this problem will be solved.

cheers