maven

A maven (also mavin) is a trusted expert in a particular field, who seeks to pass knowledge on to others. read more at WikiPedia

  • Update Maven pom version on GIT checkout in TeamCity

    Here is a solution to the following problems

    • Deriving #Maven artifact version from #GIT branch,
    • Update pom version on GIT checkout automatically,
    • Add the ability to use Pull request with Apache #Maven.

    You have a workflow requirement that require you to have the artifact version of a module externally defined from the current branch in GIT.

    For example

    You want to start working on a new feature branch “feature-memory-improvement”, so you branch from master a new branch named feature/feature-memory-improvement

    Having unique snapshot is a something you need to share your code using a #Maven repository, so you may want to have into the branch all pom.xml version changed to

    <version>FEATURE-MEMORY-IMPROVEMENT-SNAPHOTS</version>

    changing all your pom.xml and doing a technical commit  will create merge conflicts when using pull request!

    One solution, while not perfect is to do the following:  You can add a separate execution to run a goal which will change the version of the POM automatically in the #Maven reactor. This small script will do it¨

  • When Joomla! meet Maven for PHP

    apache_maven

    joomla logo vert color

      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)

    Artifactory will generate a default pom.xml. Normally it should contains more meta data and be created by the Joomla team itself. (if they ever support Maven)

    <?xml version="1.0" encoding="UTF-8"?>
    <project>
      <modelVersion>4.0.0</modelVersion>
      <groupId>org.joomla</groupId>
      <artifactId>joomla</artifactId>
      <version>1.5.10</version>
      <description></description>
    </project>

    The artifact is deployed and viewable at http://maven.waltercedric.com/artifactory/webapp/browserepo.html

    joomla.in.artifactory

    With the code below I can bind my component to a new version or old version of Joomla just by modifying the component pom.xml. Note the version number 1.5.10 (the latest version of Joomla! to date)

    <dependency>
        <groupId>org.joomla</groupId>
        <artifactId>joomla</artifactId>
        <version>1.5.10</version> 
    </dependency>

    Test cases classes are directly in the eclipse project under src/test/php (this directory is created by the archetype php5-lib-archetype), In bold, this is how you can import the whole Joomla! framework!

    require_once ('PHPUnit/Framework.php');
    require_once ('Joomla/index.php');

    //I load the PHP class that I would like to test
    require_once ('admin/class/logUtils.php');

    class LogUtilsTest extends PHPUnit_Framework_TestCase {

    //a poor PHPUNit testcase
    function testisAnEmail() {

            $LogUtils = new LogUtils();
            $this->assertEquals(true, $LogUtils->isAnEmail("This email address is being protected from spambots. You need JavaScript enabled to view it."));
            $this->assertEquals(false, $LogUtils->isAnEmail("cedric.walterwaltercedric.com"));
            $this->assertEquals(true, $LogUtils->isAnEmail("This email address is being protected from spambots. You need JavaScript enabled to view it."));

        }
    }

    More to come soon.

  • When using Maven jetty:run, CSS and JavaScript files are never updated

    apache_maven

     jetty-logo-80x22

    I was getting mad because jetty was refusing to redeploy my static files (xhtml, css) in Eclipse until I find the reason

    The Jetty Web Server provides a HTTP server and Servlet container capable of serving static and dynamic contend either from a standalone or embedded instantiations.

    Jetty buffers static content for webapps such as html files, css files, images etc and uses memory mapped files to do this if the NIO connectors are being used. The problem is that on Windows, memory mapping a file causes the file to be locked, so that the file cannot be updated or replaced. This means that effectively you have to stop Jetty in order to update a file.

    To fix this, add a line with to your maven-jetty-plugin configuration:

    org.mortbay.jetty 
    maven-jetty-plugin 
    6.1.5
       
     ... 
      src/main/resources/webdefault.xml 
     
    

    The default webdefault.xml file is found in the lib/jetty.jar at org/mortbay/jetty/webapp/webdefault.xml. Extract it to a convenient disk location and edit it to change useFileMappedBuffer to false:

     
        useFileMappedBuffer 
         false 
      

    Copy the changed file into src/main/resources/ of your project.

    The problem is explained more in Jetty's documentation.

  • XBMC 2.0.1

    "Team-XBMC and The XBMC Project is proud to announce the release of XboxMediaCenter 2.0.1. XBox Media Center (XBMC) is an award winning, free and open source media player for the Xbox game-console. XboxMediaCenter 2.0.1 point-release source code has now been set in our CVS, and all XBMC users are highly encouraged to upgrade to this version. Know that this point-release version marks the end of the 2.0 era of XBMC, there will be no more 2.0.x bug-fix point-releases. The next point-release of XBMC will be 2.1 (or maybe even 3.0), and it will probably be quite a while before that 2.1 (or 3.0) version sees the light of day with all new major features/functions we have planned for the future, (those who can not wait can always use the latest daily CVS of XBMC). 
    This XboxMediaCenter 2.0.1 point-release is a stable bug-fix version of the XboxMediaCenter 2.0.0 point-r elease, no major new features has been implemented, for a full list of fixed bugs and tweaks please read the changelog. (For a full list of all features/functions and codecs/formats supported by XBMC please visit the "XBMC Features and Supported Formats/Codecs" page in our online manual). Remember, Team-XBMC only maintain the XBMC source code, Team-XBMC does not release or distribute Xbox executable (XDK binaries), but the XBMC source code needs to be compiled with the XDK before it can be used on an Xbox, also note that XBMC requires a modded Xbox to run. Our thanks goes out to everyone who has tested, reported bugs, and helped fix them in order to make this release possible."

    The biggest problem is to obtain the binaries of XBMC, a famous Team T3CH is building binaries (althrough it is illegal to distribute binaries build by M$ development kit XDK). You'll have to search quite a lot and be an advance Google user to find them. Anyway here is a direct link to a download page:

    http://downloads.xbox360-tribe.org/index.php?act=view&id=1024
    Enjoy :-)

    XBMC v2.0.1 Pointrelease by T3ch

    ----- 2.0.1 -----
    - 11-11-2006 fixed: file listings over samba would not display proper dates.
    - 07-11-2006 fixed: in folders wich only contain a video_ts folder, the folder wouldn't stack to a single item.
    - 07-11-2006 fixed: remote number keys must be mapped to buttons in the dvd when in dvd menu, some dvd's make use of that.
    - 07-11-2006 changed: better logging of failed mplayer attempts
    - 03-11-2006 updated: Dutch language file (Thnx to MrNice).
    - 03-11-2006 changed: XBMC.ResetSkinSettings() now resets the settings instead of removing them.
    - 02-11-2006 changed: .flv files default to the dvdplayer
    - 01-11-2006 fixed: [1586248] http api would not show errors for GetSystemInfo and GetSystemInfoByName
    - 01-11-2006 fixed: random slideshow screensaver wouldnt always be random
    - 01-11-2006 fixed: increased the speed of archive extraction a notch.
    - 01-11-2006 changed: additional logging for replay-tv filesystem to hopefully figure out why it doesn't work anymore for mplayer.
    - 30-10-2006 changed: memory allocation for dll loader, saves around 100k
    - 30-10-2006 changed: httpapi GuiSetting to accept String type by EQ2K
    - 29-10-2006 changed: now disables navsounds during playback. behaviour can be reverted using advancedsettings.xml
    - 26-10-2006 fixed: [ 1584930 ] useAvpackSettings broken. thanks to markeen.
    - 25-10-2006 fixed: added some thread saneness to the hddsmart query.
    - 25-10-2006 fixed: [ 1580744 ] Can't Get PC DVD-ROM to Work Properly with Xbox Media Centre
    - 25-10-2006 fixed: cosmetic bug in filemanager handling of rar files.
    - 24-10-2006 fixed: .tbn file support for hard drive foldernames containing periods
    - 23-10-2006 fixed: users with bad luck could end up with errors on initial opening dvd images or dvd's (use of uninted variable). likely the start at 90 min in the movie syndrom
    - 23-10-2006 fixed: potential segfault in libdvdnav.dll if a read returned 0 data.
    - 23-10-2006 fixed: segfault in libsmbclient on invalid dates returned in a directory query (lan drives especially)
    - 22-10-2006 added: httpapi QueryMusicDatabase command
    - 22-10-2006 changed: httpapi SetResponseFormat to take multiple format pairs
    - 21-10-2006 fixed: sets Media Source Name if blank for protocols instead of just being blank
    - 20-10-2006 fixed: fixed the python threading exception when exiting a script
    - 18-10-2006 fixed: resume video didn't work if fps adjustment was used for ntsc video's on pal systems
    - 17-10-2006 fixed: [ 1577855 ] can't handle some rar files correctly
    - 17-10-2006 updated: norwegian language file.
    - 17-10-2006 fixed: forgot to sort images in root of cbr/cbz files.
    - 15-10-2006 fixed: httpapi TakeScreenShot download parameter now works
    - 15-10-2006 fixed: httpapi GetCurrentSlide now returns "[None]" rather than an empty string if no slide is showing
    - 15-10-2006 changed: httpapi Help command text has been updated and now includes a link to http://www.xboxmediacenter.com/wiki/index.php?title=WebServerHTTP-API
    - 14-10-2006 fixed: scanning of multipath bookmarks would not prompt for "scan new" or "scan all"
    - 13-10-2006 changed: keymap.xml: reintroduced 'B' as STOP while in videomenu since we didn't have any way to exit out from dvdmenu with controller.
    - 13-10-2006 fixed: http client wouldn't report failure to open on 404 errors from server
    - 11-10-2006 changed: better solution for multichar ftp listings, wich also fixes issues introduced in last attempt
    - 11-10-2006 added: [ 1574092 ] New Infolabel Musicplayer.DiscNumber, thanks to buttergemuese.
    - 11-10-2006 changed: Added building of Textures.xpr to build.bat, and removed Textures.xpr from CVS.
    - 11-10-2006 fixed: Partymode would repeat tracks if the next song was unavailable (server offline etc.)
    - 10-10-2006 fixed: ftp listings didn't do the string charset -> utf8 conversion. ftp listings are not normally utf8 unless requested (and only a few servers support it)
    - 10-10-2006 changed: Increased the seek timeout in RAR to 30 seconds to fix seeking over CCX with slow connection
    - 10-10-2006 updated: Swedish language file finetuned by Blittan & Pike
    - 09-10-2006 changed: Thumbnail loading in the playlists folder of library view is now background threaded.
    - 09-10-2006 fixed: filenames on fat memory units wich where very long (required >6 vfat entries) would chop of last part in some cases.
    - 09-10-2006 fixed: fat memory units with a sector size different from 512 would not load, now 512, 1024, 2048 and 4096 should be supported.
    - 07-10-2006 updated: Russian language file (Thnx to que_)
    - 07-10-2006 updated: Portuguese (Brazil) language file (Thnx to mvbm)
    - 07-10-2006 updated: Hungarian language file (Thnx to sigismund)
    - 07-10-2006 updated: Hebrew language file (Thnx to ookladek)
    - 07-10-2006 updated: Dutch language file (Thnx to MrNice)
    - 06-10-2006 fixed: Setting of viewport (for cropping scrolling text etc.) was not rotated correctly. We now use the rectangle that contains all the rotated coordinates.
    - 06-10-2006 fixed: http urls pointing to nonexisting files would lockup on some servers due to them not returning an error
    - 06-10-2006 fixed: ftp browsing with files/directory with non valid html url names, would fail.
    - 05-10-2006 fixed: Changed RSS speed to a multiple of 0.5 pixels/frame for improved smoothness.
    - 05-10-2006 fixed: [ 1571200 ] Arial.ttf subtitles not using subtitle position.
    - 05-10-2006 fixed: Potential RSS control crash when removing the control while it's updating.
    - 04-10-2006 changed: Z: is erased on boot, due to many issues if it was full.
    - 04-10-2006 fixed: Seekbar, Volume bar etc. would be unloaded when exiting from fullscreen video, causing them to vanish.
    - 04-10-2006 fixed: Reloading skin while in My Music Songs would cause the progress dialog to show endlessly.
    - 04-10-2006 fixed: memory stick shares were chooseable in the Add Source browser, even though they're plug n play.
    - 04-10-2006 fixed: special:// protocols (eg musicplaylists, cdrip etc.) always showed network overlays, even if they were local.
    - 03-10-2006 fixed: Huge playlists would cause major GUI slowdowns whenever track was changed from the Now Playing window.
    - 03-10-2006 fixed: Toggle button showed the incorrect label when using <usealttexture>
    - 03-10-2006 fixed: the feh and the userdata wiping didn't quite work as expected (i.e. it didnt work at all).
    - 03-10-2006 fixed: if you canceled the 'scan all / scan new' dialog in the music window, it would still scan.
    - 03-10-2006 fixed: ftp playback in mplayer where broken due to yet another url parsing mistake
    - 03-10-2006 changed: Scrollspeed of RSS feeds the same in all resolutions.
    - 03-10-2006 fixed: [ 1568300 ] Add/Edit Source Dialogue Remove all Paths bug.
    - 02-10-2006 added: [ 1568369 ] Fix for strange characters in web interface. thx to benmat!
    - 02-10-2006 fixed: [ 1568845 ] Unable to access Delete from context menu
    - 02-10-2006 fixed: don't allow preset locking if the visualisation has no presets.
    - 02-10-2006 fixed: [ 1561317 ] Browse and load RAR:ed subtitles don't work. also added zip support.
    - 02-10-2006 fixed: browse for artist thumb was a pita.
    - 01-10-2006 fixed: [ 1568291 ] Saving large playlist fails
    - 01-10-2006 fixed: [ 1568607 ] XBMC 2.0.0 Web Control bookmarks
    - 01-10-2006 fixed: [ 1568158 ] "Leave as Is" LED setting broken
    - 30-09-2006 fixed: shoutcast genres with characters that isn't allowed by http urls, would fail du to a huge result. ex R&b.

  • XBMC for XBOX: huge success

    This page Media Center with XBMC first publish on 2004-08-26 seems to have been a great success since more than 109237 visitors have read it.

    I have many prestigious referer pointing to it like xboxmediacenter.com itself ;-)

    I make U a promiss; if the XBOX360 is ever moddable (teamxecuter is on it. a release may happen in weeks or months). I will publish a step by step tutorial here

    In beetween. You can still send me suggestions on how to improve the article. It is currently not uptodate but still useful for many

    {mosgoogle}

  • XBMC: maybe the best media center

    XBMC is a cross-platform software available for Linux, Mac OS X, Microsoft Windows operating-system, as well as the original Xbox game-console. I am using it since 2003 on my XBOX

     

    XBMC is currently available for Ubuntu Linux, Mac OS X (Intel-based Leopard and Tiger), Microsoft Windows, and the original (first-generation) Xbox. We are currently at Beta 1 for our upcoming release code named Atlantis. It should be noted that XBMC requires OpenGL 1.4 support, at a minimum, to function. We do however recommend OpenGL 2.0 to fully experience XBMC. Check your graphics drivers to see what version of OpenGL your GPU (graphics processing unit) supports.

  • XBOX 360 hacking has start and XBOX 1 hack flashback


    The free60 wiki which aim to document ways to have a linux booting on XBOX360 is since 2 weeks online, and has already some interesting info. (some guys are really a lot crazier than me ;-) )

    I came one more time to XBOX-linux.org which has a page for describing how the first XBOX was hacked. Very technical but a mus to read for all security geek.

    The Hidden Boot Code of the Xbox From Xbox-Linux or "How to fit three bugs in 512 bytes of security code"

    ...
    Microsoft's engineers first seem to have thought that the secret key would never be revealed: security by obscurity. This explains why the decrypted code did not get hashed. Once the secret key was known, anyone could decrypt, patch and reencrypt the flash contents.
    ...
    And how the chain of trust was breaked
    ...
    The design of the first MCPX was very wrong, and the implementation was catastrophic. The design of the second version was a lot better, but the implementation was not. Without the various security holes (Visor and MIST bugs as well as possibly more) and with a working hash function, the system would have been pretty secure. Encrypting the ROM contents with a secret key, i.e. security by obscurity, simply does not work if the key travels over a bus that can be sniffed.

    {mosgoogle}

  • XBOX, XBMC troubleshootings...

    I was hoping you could help me connect my xbox to my Apple computer. I have tried every FTP program I could get my hands on, including the built in FTP in the operating system. My Xbox has an Xecuter MOD running Evolution X. I cannot get the Xbox to network with my iMac no matter what I do. Any suggestions?

    XBOX, XBMC troubleshootings...

    {mosgoogle center}

    XBOX, XBMC troubleshootings
    Try:Type in a Command DOS windowsWhat if prooveif not working
    If you have a router...
    and all computer including XBOX are connected to it
    Use a web browser:
    Connect to the admin console of Your router http://192.168.1.1 for US robotics and http://192.168.0.1 for Netgear, If none of them work look in the router's manual.
    Go to the panel where You can see all devices attached (attached devices):
    You must see one device more (ex: AAA.BBB.CCC.DDD as IPadress)
    If router has given an IPAdres, then it is OK1. Check network cable and/or
    2. Modchip install and/or
    3. Setting in evolutionX (checkbox FTP active)
    If you have no router... Verify that PC and XBOX are connected using a cross network cable 
    Verify carefully settings in EvolutionX 1. Verify that FTP active is checked
    2. Verify that if Use static IP is set to false and reboot the XBOX, the router will give it a new IP, if the XBOX dd not receive an IP: check router manual because DHCP must be active
     
    See if the XBOX is aliveping AAA.BBB.CCC.DDDThe XBOX is responding and there is no IPadress conflict1. Look at cable
    2. Look if modchip correctly installed
    3. Look if FTP active in setting
    4. Assign a different IP (a Fix IP in Settings)
    See if FTP port is reachabletelnet AAA.BBB.CCC.DDD 21The XBOX port is open,
    You network let FTP through,
    No firewall blocck the outgoing port FTP (21)
    Look at firewall settings if any is installed
        

     

    Glossary of barbarians terms:

    DHCPShort for Dynamic Host Configuration Protocol, a protocol for assigning dynamic IP addresses to devices on a network. With dynamic addressing, a device can have a different IP address every time it connects to the network. In some systems, the device's IP address can even change while it is still connected. DHCP also supports a mix of static and dynamic IP addresses. Dynamic addressing simplifies network administration because the software keeps track of IP addresses rather than requiring an administrator to manage the task. This means that a new computer can be added to a network without the hassle of changing configuration.
    IPadressInternet Protocol, the most basic protocol to communicate on the Internet. An IP number is a numerical address consisting of four numbers seperated by periods. Each IP address uniquely identifies a certain computer on the Internet. The domain name is used to make using them easier.
    FTPFile Transfer Protocol. A standard method for sending files from one computer to another on TCP/IP networks such as the Internet. FTP is also the name of the command used to initiate transfer of files. Anonymous FTP is a common practice which permits users to access some parts of an FTP site without needing an account and password for the site. The login must be XBOX, the password is defined in evox.ini or XBMC.xml
    TelnetTelnet is a user command using TCP/IP protocols to access a computer remotely. To have access to that computer, you must have permission, meaning you must authenticate to the system with a valid username and password. When you are connected to the network using telnet, you can enter commands and they will be executed as if the were being entered directly onto the server console.
    PingPing is a basic Internet program that lets you verify that a particular Internet address exists and can accept requests. The verb ping means the act of using the ping utility or command. Ping is used diagnostically to ensure that a host computer you are trying to reach is actually operating.
    FirewallA system designed to prevent unauthorized access to or from a private network. Firewalls can be implemented in both hardware and software, or a combination of both. Firewalls are frequently used to prevent unauthorized Internet users from accessing private networks connected to the Internet, especially intranets. All messages entering or leaving the Intranet pass through the firewall, which examines each message and blocks those (Ex: htttp, ftp, tcp and udp port) that do not meet the specified security criteria.