TeamCity is a Java-based build management and continuous integration server from JetBrains. [http://en.wikipedia.org/wiki/TeamCity]
I will quickly describe in this post how you can code your component/plugins/modules against a specific version of Joomla! with no effort using Maven for PHP.
The trick I made is to package the whole Joomla distribution in a jar file, and add a Maven dependency to the project. As Joomla, PHPUnit, or any other 3rd party is not a set of class packaged in a jar, the brilliant idea of Maven for PHP is to unpack all these dependencies in the target/phpinc directory automatically AND concatenating this directory to the php setting include_path during compile and test phase. You can do the same using the command line by running:
php -d include_path=
That’s also why, It is very important to not put anything from this directory under version control (add a cvs.ignore or svn properties svn:ignore) as it contains dependencies that have no reason to be put under version control in Maven paradigm (they have to reside in a Maven repository)
So I create a new zip file joomla-1.5.10.jar with a directory inside named ‘Joomla’ that contains a standard binary distribution…this jar is published in artifactory with a groupid org.joomla (arbitrary chosen by me)
Read more: When Joomla! meet Maven for PHP
Today JetBrains announces the public availability of TeamCity 4.5, it's award-winning distributed build management and continuous integration tool.
With TeamCity, you can set up a build server for your projects within minutes and enjoy out of the box continuous unit testing, code quality analysis, and early reporting on build problems - even without leaving your favorite IDE.
TeamCity offers a gentle learning curve, so you can quickly improve your release management practices by gradually adopting its advanced features and capabilities.
I did upgrade my version of TeamCity at teamcity.waltercedric.com to the latest version, aka 4.5
Read more: TeamCity 4.5 up and running
After fighting many days.. with their container versions (many webapps in the same tomcat with mod_proxy, mod_proxy_ajp), I did install JetBrains TeamCity, Atlassian Jira and Bamboo as standalone on my server.
TeamCity is a Java-based build management and continuous integration server from JetBrains, creators of IntelliJ IDEA and ReSharper.
What will happen next?
Read more: Installing TeamCity standalone on OpenSuse 11.x/ Plesk 9
In this small post i will present you how to
To solve the problem number 1, we will use Manifest files
On the Java platform, a
manifest fileis a specific file contained within a JAR archive. It is used to define extension and package related data. It is a metadata file that contains name-value pairs organized in different sections. If a JAR file is intended to be used as an executable file, the manifest file specifies the main class of the application. The manifest file is namedMANIFEST.MF. [Wikipedia]
If you do nothing special in Maven., you will see across your jar files the following in all META-INF/MANIFEST.MF
Manifest-Version: 1.0 Archiver-Version: Plexus Archiver Created-By: Apache Maven
The solution I propose here will write all these META-INF/MANIFEST.MF the following content:
Manifest-Version: 1.0 Archiver-Version: Plexus Archiver Created-By: Apache Maven Built-By: agent1 Build-Jdk: 1.6.0_20 Specification-Title: Unnamed - com.waltercedric:web:war:1.0.0-SNAPSHOT Specification-Version: 1.0.0-SNAPSHOT Specification-Vendor: waltercedric Implementation-Title: Unnamed - com.waltercedric:web:war:1.0.0-SNAPSHOT Implementation-Version: 1.0.0-SNAPSHOT Implementation-Vendor-Id: com.waltercedric Implementation-Vendor: waltercedric buildDate: 2010.09.22-14:12 svnrevision: 18625 Class-Path: spring-ws-core-1.5.6.jar spring-aop-2.5.6.jar spring- web-2.5.6.jar spring-webmvc-2.5.6.jar spring-context-support-2.5.6.jar
.. .. ..
Read more: Apache Maven manifest and enabling agile testing
Teamcity is a distributed build management and Continuous Integration system that allows your team to run and monitor your software building process while improving team communication, productivity and the integration of changes.
This extension displays the status of your TeamCity continuous integration builds. TeamCity REST API is extremely rich, and I did made some choice concerning the ouput. Feel free to provide and send me ideas how I can improve the layout or by adding new functionalities!
The right picture also show how build status is represented with different colors (can be changed in CSS file):
I did upgrade from TeamCity 5.0.1 to TeamCity 5.1.1 In no time, just drop the war in my Tomcat container :-)
At this address you will always find the latest snaphosts of some (I would need 44 builds to display them all!) of my PHP projects for Joomla!
I will also upgrade tomorrow early morning our TeamCity Licensed server at www.Innoveo.com .
By the way I have still to deliver (HERE and HERE) what i promised on the Joomla! development group, aka a full solution for developing Joomla! using Maven for PHP and Teamcity/Bamboo/Husdon. You can see the documentation I made in my WIKI (work in progress)
At the same time, Joomla! users that are using TeamCity, search no more, I will be providing you the first GPL module for Joomla! that let you display in your site the status of all your builds/projects! The code is heavily using the REST API with PHP CURL and a bit of XML parsing. If you have any requirements, it is still time to drop me an email ;-)
How to add dependencies graph to multi module projects. With this Maven plugin, you’ll be able to visualize Maven modules interdependencies and dependencies in any scope (compile, text, provided, system, runtime)
depgraph:depgraph Can be used to draw a dependency graph from the project, the mojo is executed in. It traverses all dependencies and creates a graph using Graphviz. It draws a dependency graph just for your project. For a simple POM with no sub modules, it draws a graph of all dependencies (including transitive ones) below it. For a POM with sub modules, goes into each leaf POM and generates a separate graph for it.
Here is an example of output on the plugin itself
Read more: Maven dependencies graph plugin in TeamCity and Eclipse
Starting from now on, I will deliver all my latest (unstable) extensions versions through my continuous build server. All request or bugs discovery that are requested in my forums and solved will lead to a new build that you will be able to download a lot faster than before.
Thanks to Maven for PHP, I can now commit, 60 seconds later, unit test run and the result is a direct download for my extensions snapshots.
Here is an example with the module mod_related_thumb_items
Head to http://teamcity.waltercedric.com/teamcity/guestLogin.html?guest=1
Locate the module or component you are interested in:
Click on the latest build, must be
Success
If this build is a direct answer to a support request in my forums, or solve an issue, You should be able to see in changes the commit description, and even which file have been changed after and before the commit.
But Hey! you want to download this latest build now, go to artifact
You can monitor any build by using the RSS icon in your browser toolbar, or example with this module, it would be
http://teamcity.waltercedric.com/guestAuth/feed.html?buildTypeId=bt20&itemsType=builds&userKey=guest
This way of downloading the latest extensions do not replace the page http://www.waltercedric.com/joomla-releases-mainmenu-269.html where there is there only stable versions.
The next step is to make the maven phase “site” work (I have issue with phpdocumentor not found), this will create automatically a internet site in one of my sub-domains ad hide this complexity.
Change the Team city project configuration by adding a -Dmaven.surefire.debug to Maven runner in Additional "Maven command line parameters"
Now when test cases will be executed by maven surefire plugin, the build will wait for a remote debugging application to pick it up on port 5005 and this for EVERY MODULES
meaning: If you have 5 Maven modules (= java projects) with test cases maven surefire will request 5 times you to connect with remote debugging to your build server.
Create a Remote Java Application launcher you'll also share in one eclipse project:
Don't forget to remove the -D variable or your daily build may wait for a remote debug connection! or create a special build configuration of your project targeted for debugging purpose.
put into "JVM command line parameters:" these settings:
-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5006
Create a Remote Java Application launcher you'll also share in one eclipse project that will connect to the port 5006.
Privacy Statement | Copyright Notice | Licenses
© 1999-2012 Waltercedric.com. Designed by Cédric Walter. Sitemap
Reproduction without explicit permission is prohibited. All Rights Reserved. All photos remain copyright © their rightful owners. No copyright infringement is intended.
Disclaimer: The editor(s) reserve the right to edit any comments that are found to be abusive, offensive, contain profanity, serves as spam, is largely self-promotional, or displaying attempts to harbour irrelevant text links for any purpose.