bamboo

Bamboo /bæmˈbuː/ (Bambuseae) is a tribe of flowering perennial evergreen plants in the grass family Poaceae, subfamily Bambusoideae, tribe Bambuseae. read more at WikiPedia

  • apache_maven

    These things have disturbed us (The developer Team at Innoveo.com) a lot in the past months. We did solve them recently, and I would like to publish them now here to help more people

    Someone create a new maven module, after updating from SVN the module is not visible as a separate project.

    Scenario:

    1. User A checks out a maven project from SVN using "Checkout as Maven Project". All modules are now listed as separate projects in Eclipse
    2. User B creates a new module in the project, and checks it into SVN
    3. User A updates project
    4. New module does not show up as a separate project.

    Solution:

    1. Work around found by selecting the parent project
    2. Do Import -> Maven.
    3. Select then the same name template and most modules should be grayed out because of name conflicts. But you should see the missing module in the list
    4. Tick the one (new) module and import it.

    In SVN perspective, when I choose "Checkout as Maven Project" on maven projectA, I get an exception saying that maven.123457896 can not be renamed

    Scenario:

    This error occur sometime, especially if you ever kill eclipse during a previous maven checkout (as sometimes it seems to hang forever). In fact the error message can be misleading,as M2Eclipse can not renamed maven.1234567896 to projectA as it may partially exist on disk.

    Solution:

    1. Stop eclipse
    2. Go to the workspace location {workpsace_loc} 
    3. Delete the directory maven.1234567896 or any directory starting with maven.xxxxxxxx
    4. Delete also the temporary created Maven project  {workpsace_loc}\projectA directory you were trying to checkout if it exist.
    5. Restart eclipse, and in SVN perspective, on maven project A, retry and  select "Checkout as maven project"

    .classpath or .project are not committed in SVN, how to add them?

    Scenario:

    You may have add a svn:ignore on some directories, or some someone may have committed a recursive svn:ignore properties on some module in the hierarchy. While we should never commit any .classpath to SVN, there is some rare case where it is still needed. For example if you ever add special runtime server libraries that may not be coming from Maven Dependencies.

    Solution:

    Even if there is a svn:ignore on a maven module, or if a module has applied svn:ignore properties to all its child, you can always put a file under version control by doing the following

    1. Go in SVN perspective
    2. Drill down to the Maven module location or directory in which you would like to add a file
    3. Right click New... then choose File,
    4. A pop up will open letting you choose a file on disk
    5. Don’t forget to Enter a commit comment

     

    Maven Surefire runs multiple times our test case when using goal site

    This is neither a bug or an issue of Maven, it look like even to be a feature!

    Some reporting plugin are modifying (instrumentation) the java byte code of test cases like with Cobertura (goal: cobertura:cobertura).

    The Cobertura tool is a free and easy to use source code test coverage analyses. It helps you to discover where your source-code lacks in test coverage.

    In some rare case scenario (multi threaded test cases for example), it may be worth to run the code twice as instrumentation may modify behaviors and outcome of tests. So to resume, maven Surefire run them once, then Cobertura one more time but instrumented. One solution among other to escape this is to use Maven profiles, and to rely on another build that do not use reporting to run tests without instrumentation.

    More to come ..

  •  apache_maven

    'Integration testing' (sometimes called Integration and Testing, abbreviated I&T) is the activityof software testing in which individual software modules are combined and tested as a group. It occurs after unit testing and before system testing. Integration testing takes as its input modules that have been unit tested, groups them in larger aggregates, applies tests defined in an integration test plan to those aggregates, and delivers as its output the integrated system ready for system testing. [WikiPedia]

     

    I will put Selenium to that JOB. Selenium will allow me to run a set of unit test against a running instance of my application and get a feedback on the quality before delivering the software to a testing team.

    Making any Maven module Selenium enable is really easy, all you have to do is to add to the dependencies section the following

    <dependency>
        <groupId>org.openqa.selenium.client-drivers</groupId>
        <artifactId>selenium-java-client-driver</artifactId>
        <version>0.9.2</version>
        <scope>test</scope>
    </dependency>

    Now you should be able to cut and paste any test cases developed with Selenium IDE into /src/test/java/

    Selenium IDE is a Firefox add-on that records clicks, typing, and other actions to make a test, which you can play back in the browser or export to may different languages: Ruby, Python, Java, PHP, Perl, .Net, JavaScript to name a few. [Learn more]

    The java code is in no way different than regular JUNIT test cases, except that it does not use the latest JUNIT 4.x annotations. You’ll be able to run tests like before (right click Run As Junit)

    package com.waltercedric.maven;
    
    import com.thoughtworks.selenium.SeleneseTestCase; 
    
    public class TestHello extends SeleneseTestCase {
    
      public void setUp() throws Exception {
        setUp(http://localhost/helloworld, "*iexplore");
      }
    
      public void testNew() throws Exception {
        selenium.open("/helloworld/index.xhtml");
        selenium.waitForPageToLoad("30000");
    verifyTrue(selenium.isTextPresent("Are you an existing Customer")); } }

    Some explanations are needed:

    •  
      •  
    • http://localhost/helloworld is the URL of my tomcat container where my web applications will be deployed (port 80)
    • I choose internet explorer as browser as it is nearly always available on any windows pc, Firefox is not far away, use “*firefox” and  firefox.exe has to be in the environment PATH.
    • The Code above assume that a selenium RC server is running at localhost on port 4444, I will show you how to start one later in this post.

    Some remarks about the code above

    You will have to somehow make your own Selenium framework out of the generated code, for obvious reasons,

    • You’ll have soon to support many browser "*iexplore", "*firefox", "*opera" and as such use environment variables or configuration files. I recommend you in that case to use Selenium Grid instead of Selenium RC.
    • You can not let the URL and port of the container fix coded http://localhost/helloworld, this URL may change if you target different runtime. 
    • You may want to reuse some part of the generated code multiple times, in different unit test, (like login/logout stuff), java inheritance, interface, and patterns may arrive sooner or later, even if this is unit test code.

    Selenium test cases or integration tests are meant to be run in phase “integration-test” against a running instance of your application. That is why don’t forget to deploy your application with Maven cargo or run it inside Jetty in Maven phase “pre-integration-test”

    How to use Surefire to run JUnit test in phase “test” and integration tests in phase “integration-test”

    The response is by carefully configuring Surefire and naming your Java packages. The pom.xml below show this trick

    In phase test, test cases with a word integration or selenium are omitted, while in phase “integration-test” they are run.

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.4.2</version>
        <configuration>
            <argLine> -Xmx512m -DuseSystemClassLoader=true</argLine>
            <skip>false</skip>
            <testFailureIgnore>true</testFailureIgnore>
            <excludes>
                <exclude>**/integration/*</exclude>
                <exclude>**/selenium/*</exclude>
            </excludes>
        </configuration>
        <executions>
            <execution>
                <id>integration-tests</id>
                <phase>integration-test</phase>
                <goals>
                    <goal>test</goal>
                </goals>
                <configuration>
                    <skip>false</skip>
                    <excludes>
                        <exclude>none</exclude>
                    </excludes>
                    <includes>
                        <include>**/integration/*</include>
                        <include>**/selenium/*</include>
                    </includes>
                </configuration>
            </execution>
        </executions>
    </plugin>

    Now it is time to start a selenium server locally or remotely so we can start our newly defined test cases.

    Selenium Remote control

    Selenium Remote Control (RC) is a test tool that allows you to write automated web application UI tests in any programming language against any HTTP website using any mainstream JavaScript-enabled browser.

     

    You can either start a selenium RC server

    • Outside Eclipse, like any java process,
    • Inside Eclipse with a java launcher,
    • Inside Eclipse with Maven and a java launcher.
    • Inside any Maven Phase thank to a plugin XXXXXXXXXXXXX

    I recommend you to install Selenium RC in a dedicated VM (VMWare, Virtual desktop, XEN) and to make it team or enterprise wide. I would always recommend to put Linux at work for such a task, unfortunately Internet Explorer is not running at all on Mac nor Linux.. I recommend you this way to run a shared Selenium server in your infrastructure that can be later access by many continuous build agents.

    Selenium RC is a Java process requiring only 2 jar to properly start, Download and unpack to c:\selenium-server-1.0-beta-2

     

     

     

    Create following in a batch file start.bat, normally all you have to do is to change the first 3 lines

    set JAVA_HOME=c:\jdk1.6
    set FIREFOX_HOME=C:\tools\Firefox3
    set SELENIUM_RC_HOME=c:/selenium-server-1.0-beta-2
    
    set PATH=%PATH%;%FIREFOX_HOME%
    set CLASSPATH=%CLASSPATH%;%SELENIUM_RC_HOME%/selenium-server.jar;%SELENIUM_RC_HOME%/selenium-server-coreless.jar 
    %JAVA_HOME%/bin/java -jar %SELENIUM_RC_HOME%/selenium-server.jar

    If everything run properly, you should see an ugly DOS windows like the one below

     starting.selenium.rc.outside.eclipse

    Pointing the browser to http://localhost:4444 will return an error 403, which is no sign of malfunction, currently Selenium RC has no web GUI.

    seleniumRCtestInBrowser

     

    Start Selenium RC server inside Eclipse

    If you decide to run selenium RC inside Eclipse, you’ll be mainly benefit from:

    • Project sharing and versioning in CVS/SVN,
    • Command line parameters that will start Selenium RC can also be shared,

    Selenium Server in a Maven project/module

    Create a new Maven Project named “SeleniumServer” and copy into its pom.xml the following

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <groupId>com.waltercedric.maven</groupId>
        <artifactId>SeleniumServer</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <dependencies>
            <dependency>
                <groupId>org.seleniumhq.selenium.server</groupId>
                <artifactId>selenium-server-coreless</artifactId>
                <version>1.0-beta-2</version>
            </dependency>
            <dependency>
                <groupId>org.seleniumhq.selenium.core</groupId>
                <artifactId>selenium-core</artifactId>
                <version>1.0-beta-2</version>
            </dependency>
        </dependencies>
    </project>

    Create a Java launcher and use org.openqa.selenium.server.SeleniumServer as main class. If you start the launcher, you will see the following in eclipse console

    seleniumRC.started.in.eclipse

     

    Selenium RC is now waiting on port 4444 for Selenium Test case orders.

    You can now run your test case in eclipse like any other test case using Eclipse build in Junit runner.

  • apache_maven

    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

    depgraph

     

    Install in all TeamCity Agent Graphwiz

    Graphviz is an open source graph visualization software. It has several main graph layout programs. See the gallery for some sample layouts. It also has web and interactive graphical interfaces, and auxiliary tools, libraries, and language bindings.

    Chance is that you are using Linux, so install is very easy and just a few click away for OpenSuse

    # zypper in graphwiz   

    or for Debian

    # apt-get install graphwiz

    In windows use the binary installer and put the graphwiz/bin in your PATH environment variable!

    Configure your POM

    Ideally put this in your parent pom inside the <build> </build> tag

    <plugin>
            <groupId>ch.elca.el4j.maven.plugins</groupId>
            <artifactId>maven-depgraph-plugin</artifactId>
            <version>1.7</version>
    </plugin>

    More configuration settings can be found HERE, now add either a new plugin repository location in your pom.xml (see below) or better in your artifactory proxy

      <pluginRepository>
        <id>elca-services</id>
        <url>http://el4.elca-services.ch/el4j/maven2repository</url>
        <releases>
         <enabled>true</enabled>
        </releases>
      </pluginRepository>

     

    Configure Teamcity build

    Add in the Maven runner of every TeamCity Build

    addDependenciesGraphGoalsInBuild

     

    Maven goals

    • 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 submodules, it draws a graph of all dependencies (including transitive ones) below it. For a POM with submodules, goes into each leaf POM and generates a separate graph for it.
    • depgraph:fullgraph  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 graph for all the modules as they are interconnected. Same as depgraph for a simple POM, but for a POM with submodules, generates a combined dependency graph incorporating all modules.

    You may also want to let developer look at modules dependencies graph in TeamCity, so you may want to add to artifact path **/site/images/*.png => dependenciesGraph

    Artifacts are files produced by a build. After finishing a build, TeamCity searches for artifacts in the build's checkout directory according to the specified artifact patterns. Matching files are then uploaded to the server, where they become available for download. More ..

    artifactPath

     

    Configure Eclipse

    Install Graphviz and don’t forget to have it in PATH.

    You can share an eclipse Maven launcher in your parent project, right click on your pom.xml and select run as Maven configuration, specify either depgraph:fullgraph  or depgraph:depgraph   as goals

  • apache_maven

    What can you do to avoid that when you use one Maven dependency, to also inherit some other undesirable older
    dependency (which is to say from an older transitive dependency).

    The fix to this is to add an exclusion to the dependency in question.
    For example, if we start with a dependency upon version 1.2 of the jxpath library:

    <dependency>
       <groupId>common-jxpath</groupId>
       <artifactId>common-jxpath</artifactId>
       <version>1.2</version>
       <scope>compile</scope> <!-- default scope for sake of example-->
    </dependency>

    This dependency to jxpath 1.2 will bring in an old version of log4j 3.8. In order to ensure that I am using the latest
    versions of log4j (4.4),

    I need to put in an exclusion for these transitive dependencies of common-jxpath, which I do as follows:

    <dependency>
       <groupId>common-jxpath</groupId>
       <artifactId>common-jxpath</artifactId>
       <version>1.2</version>
       <scope>compile</scope> 
       <exclusions>
          <exclusion>
             <artifactId>junit</artifactId>
             <groupId>junit</groupId>
          </exclusion>
          <!-- I can put many of these here -->
    </exclusions> </dependency>

    Having excluded them, they will be any longer in the build.

    Now, there is still too many thing that can occur in the background

    • Another 3rd party artifact may include log4j by using a transitive dependencies, and then you will have to rely/trust transitive
      dependency mediation
    • You can explicitly include the versions that you want in all pom.xml or better in your parent pom.xml

    Transitive dependency mediation

    Dependency mediation - this determines what version of a dependency will be used when multiple versions of an artifact are
    encountered. Currently, Maven 2.0 only supports using the "nearest definition" which means that it will use the version of
    the closest dependency to your project in the tree of dependencies. You can always guarantee a version by declaring it
    explicitly in your project's POM. Note that if two dependency versions are at the same depth in the dependency tree, until
    Maven 2.0.4 it was not defined which one would win, but since Maven 2.0.5 it's the order in the declaration that counts: the
    first declaration wins.
    "nearest definition" means that the version used will be the closest one to your project in the tree of dependencies, eg. if
    dependencies for A, B, and C are defined as A -> B -> C -> D 2.0 and A -> E -> D 1.0, then D 1.0 will be used when building A
    because the path from A to D through E is shorter. You could explicitly add a dependency to D 2.0 in A to force the use of D 2.0

    find out what the transitive dependencies are?

    You can't control what you do not know!

    One that can be use during build stage or explicitly use on command line, is the maven plugin maven-dependency-plugin

       <build>
          <plugins>
             <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
             </plugin>
          </plugins>
       </build>

    and then use the goal dependency:tree, so a typical build strategy could look like 

    mvn clean install dependency:tree
    or
    mvn clean install dependency:list   (easier to tokenize in excel sheet)
    So it look like
    With no exclusions

    [INFO] [dependency:tree]
    [INFO] com.test:test:jar:0.0.1-SNAPSHOT
    [INFO] \- commons-jxpath:commons-jxpath:jar:1.2:compile
    [INFO]    +- xerces:xerces:jar:1.2.3:compile
    [INFO]    +- javax.servlet:servlet-api:jar:2.2:compile
    [INFO]    +- junit:junit:jar:3.8:compile
    [INFO]    +- ant:ant-optional:jar:1.5.1:compile
    [INFO]    +- xml-apis:xml-apis:jar:1.0.b2:compile
    [INFO]    +- jdom:jdom:jar:b9:compile
    [INFO]    +- commons-beanutils:commons-beanutils:jar:1.4:compile
    [INFO]    +- commons-logging:commons-logging:jar:1.0:compile
    [INFO]    \- commons-collections:commons-collections:jar:2.0:compile
    [INFO] [dependency:list]
    [INFO]
    [INFO] The following files have been resolved:
    [INFO]    ant:ant-optional:jar:1.5.1:compile
    [INFO]    commons-beanutils:commons-beanutils:jar:1.4:compile
    [INFO]    commons-collections:commons-collections:jar:2.0:compile
    [INFO]    commons-jxpath:commons-jxpath:jar:1.2:compile
    [INFO]    commons-logging:commons-logging:jar:1.0:compile
    [INFO]    javax.servlet:servlet-api:jar:2.2:compile
    [INFO]    jdom:jdom:jar:b9:compile
    [INFO]    junit:junit:jar:3.8:compile
    [INFO]    xerces:xerces:jar:1.2.3:compile
    [INFO]    xml-apis:xml-apis:jar:1.0.b2:compile

     

    With exclusions

    [dependency:tree]
    [INFO] com.test:test:jar:0.0.1-SNAPSHOT
    [INFO] \- commons-jxpath:commons-jxpath:jar:1.2:compile
    [INFO]    +- xerces:xerces:jar:1.2.3:compile
    [INFO]    +- javax.servlet:servlet-api:jar:2.2:compile
    [INFO]    +- ant:ant-optional:jar:1.5.1:compile
    [INFO]    +- xml-apis:xml-apis:jar:1.0.b2:compile
    [INFO]    +- jdom:jdom:jar:b9:compile
    [INFO]    +- commons-beanutils:commons-beanutils:jar:1.4:compile
    [INFO]    +- commons-logging:commons-logging:jar:1.0:compile
    [INFO]    \- commons-collections:commons-collections:jar:2.0:compile
    [INFO] [dependency:list]
    [INFO]
    [INFO] The following files have been resolved:
    [INFO]    ant:ant-optional:jar:1.5.1:compile
    [INFO]    commons-beanutils:commons-beanutils:jar:1.4:compile
    [INFO]    commons-collections:commons-collections:jar:2.0:compile
    [INFO]    commons-jxpath:commons-jxpath:jar:1.2:compile
    [INFO]    commons-logging:commons-logging:jar:1.0:compile
    [INFO]    javax.servlet:servlet-api:jar:2.2:compile
    [INFO]    jdom:jdom:jar:b9:compile
    [INFO]    xerces:xerces:jar:1.2.3:compile
    [INFO]    xml-apis:xml-apis:jar:1.0.b2:compile

     
    see Maven Dependency Plugin
  • apache_maven

    What you will learn in this Maven How To

    • How to generate JAXWS proxies stub against a local WSDL, remote WSDL
    • How to compile your maven project or module against a specific version of Java (here 1.6) using Maven Compiler Plugin
    • How to attach source code of your project with the binary artifact using Maven Sources Plugin
    • How to deploy artifact binary and artifact source artifact using Maven Deploy Plugin to a remote enterprise Artifactory Maven repository.

    Now if you run “mvn deploy” on the pom.xml, the following will be executed:

    • JAXWS will create proxy stubs in src/main/java
    • Maven will compile all proxy stubs in /target/classes
    • Maven will create in phase “install” two jar artifact jaxws-0.0.1-SNAPSHOT-sources.jar and jaxws-0.0.1-SNAPSHOT.jar in /target/
    • Maven will deploy these jars to artifactory so they can be used by all your developers.

    How to generate JAXWS proxies stub against a local WSDL, remote WSDL

    Add this to your pom.xml

        <dependencies>
            <dependency>
                <groupId>com.sun.xml.ws</groupId>
                <artifactId>jaxws-rt</artifactId>
                <version>2.1.3</version>
            </dependency>
        </dependencies>

    Add this to your settings.xml or pom.xml or better artifactory list of repositories

        <pluginRepositories>
            <pluginRepository>
                <id>java.net2</id>
                <url>http://download.java.net/maven/2/</url>
            </pluginRepository>
        </pluginRepositories>

    And configure the Maven JAXWS plugin, you can either use remote WSDL or local WSDL saved on disk

    <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>jaxws-maven-plugin</artifactId>
        <executions>
            <execution>
                <goals>
                    <goal>wsimport</goal>
                </goals>
            </execution>
        </executions>
        <configuration>
            <verbose>true</verbose>
            <!--
                <bindingFiles>
                <bindingFile>${basedir}/src/main/resources/binding.xml</bindingFile>
                </bindingFiles>
            -->
            <sourceDestDir>${basedir}/src/main/java</sourceDestDir>
            <!--
                <wsdlDirectory>c:\</wsdlDirectory> <wsdlFiles>
                <wsdlFile>stockquote.wsdl</wsdlFile> </wsdlFiles>
            -->
            <wsdlUrls>
                <wsdlUrl>http://www.webservicex.net/stockquote.asmx?WSDL</wsdlUrl>
            </wsdlUrls>
        </configuration>
    </plugin>

    If you now run mvn jaxws:wsimport or mvn install, the maven plugin will get the WSDL and create proxies stubs in src/main/java

    How to compile your maven project or module against a specific version of Java

    Just put inside the <plugins> section of  <build>, use at least java 1.5. Obviously I choose 1.6 in the example below

    <plugin>
        <inherited>true</inherited>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.0.2</version>
        <configuration>
            <meminitial>128m</meminitial>
            <source>1.6</source>
            <target>1.6</target>
            <!--
                <executable>${JAVA_HOME}/bin/javac</executable> <fork>true</fork>
                <verbose>true</verbose> <showDeprecation>true</showDeprecation>
                <showWarnings>true</showWarnings>
            -->
        </configuration>
    </plugin>

    How to attach source code of your project with the binary artifact using Maven Sources Plugin

    This small plugin will create a new jar file in /target with a classifier “sources” for you. Note that with <finalName/> you can deviate from standard naming scheme, which is of course not recommended.

    “A Maven 2 plugin that creates a project-version-sources.jar right along side the project-version.jar in the target directory. We are using the verify phase here because it is the phase that comes before the install phase, thus making sure that the sources jar has been created before the install takes place.”

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.1</version>
        <configuration>
            <!--<finalName></finalName>
            -->
        </configuration>
        <executions>
            <execution>
                <id>attach-sources</id>
                <phase>verify</phase>
                <goals>
                    <goal>jar-no-fork</goal>
                </goals>
            </execution>
        </executions>
    </plugin>

    How to deploy artifact binary and artifact source artifact using Maven Deploy Plugin to a remote Artifactory

     

    Add to your pom.xml the following

    <distributionManagement>
        <repository>
            <id>internal.repo</id>
            <name>MyCo Internal Repository</name>
            <url>http://maven.waltercedric.com:8080/artifactory/libs-releases</url>
        </repository>
        <snapshotRepository>
            <id>internal.repo.snapshot</id>
            <name>MyCo Internal Repository</name>
            <url>http://maven.waltercedric.com:8080/artifactory/libs-snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    And to your settings.xml your administrator credentials (note don’t try admin/password against my artifactory repository, I use way more complex passwords). Note that the maven deploy plugin is able to detect if your artifact contains the word SNAPSHOT, if yes it will use the <snapshotRepository></snapshotRepository> and internal.repo.snapshot credentials

    <servers>
        <server>
            <id>internal.repo</id>
            <username>admin</username>
            <password>password</password>
        </server>
        <server>
            <id>internal.repo.snapshot</id>
            <username>admin</username>
            <password>password</password>
        </server>
    </servers>

    Now if you run “mvn deploy” on the pom.xml, the following will be executed:

    • JAXWS will create proxy stubs in src/main/java
    • Maven will compile all proxy stubs in /target/classes
    • Maven will create in phase “install” two jar artifact jaxws-0.0.1-SNAPSHOT-sources.jar and jaxws-0.0.1-SNAPSHOT.jar
    • Maven will deploy these jars to artifactory

    Download

    I did create a new Download section Maven for all future resources download. You’ll find there ready to use Maven/Eclipse projects.

    References

     

  • apache_maven

    Maven projects are created using the New "Maven projects" from M2Eclipse, see here for more details
    http://docs.codehaus.org/display/M2ECLIPSE/Creating+Maven+projects

    Maven Modules are different beast, as they are suppose to have a parent in their hierarchy, if you use Maven
    you are already understanding what the differences are.

    You can get in troubles if you try to make a lot of maven projects in eclipse, although it may seems natural to do so. A lot
    of people have gone that path, and this may work if you use the relativePath trick

    • parent (contains the super pom)
    • common-api, reference the parent using the <relativePath>../parent/pom.xml</relativePath>
    • common-core reference the parent using the <relativePath>../parent/pom.xml</relativePath>
    • common-spring reference the parent using the <relativePath>../parent/pom.xml</relativePath>
    • services-api  ...you get the idea
    • services-core
    • services-spring

    Here is an example for common-spring:

    <project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.waltercedric</groupId>
    <artifactId>common-spring</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <parent>
      <groupId>com.waltercedric</groupId>
        <artifactId>parent</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <relativePath>../parent/pom.xml</relativePath>
     </parent>
    </project>

    maven.all.projects. Do not make everything a Maven project!

    With such a mapping you'll get in troubles! not all plug ins seems to support this kind of trick (relativePath)
    In the maven reactor (maven-deploy, maven-release for example). It is a lot wiser to represent
    your product or project also in eclipse in a tree manner. This will break the complexity, introduce
    more flexibility, so why not just using maven modules??
    Maven2 recommend to represent modules in a tree manner

    |--- parent                                (packaging : pom)
    |        | common                       (packaging : pom)
    |                   |common-api       (packaging : any)
    |                   |common-core     (packaging : any)
    |                   |common-spring   (packaging : any)
    |        | services                        (packaging : pom)
    |                   |services-api        (packaging : any)
    |                   |services-core      (packaging : any)
    |                   |services-spring    (packaging : any)

    To achieve that Goal, M2Eclipse use a trick and put all modules (common-xxx and services-xxx) in the
    same maven project (parent) while displaying a workspace that look like "project flat"...

    First create your product or project using a Maven Project

    one.maven.project

    focus on that project, and right click New... Others... Maven Module

    maven.module.helper new.maven.module

    click Next, in the next page, choose a POM packaging, as this module will contains module
    definition (aggregation of sub modules common-api, common-core,...)
    finish.module.creation

    The results is what maven expect: a parent directory with a set of modules and pom's

    result.maven.modules

    The workspace fake the view and show maven modules as what I call "ghost projects"

    Any changes in these "ghost projects" open in fact the Maven project (remember in fact
    the code is there), so any change in common-api force you to sync and version the Maven project.

    on the file system, it is even more visible, there is only one maven project (parent) and all its modules
    are interlinked into it!

    maven.interlinked.modules

    you can create an unlimited number of modules interlinked in the maven project...
    Some open source framework, prefers to name their first module level component-xxx, then all other modules-xxx

    |--- myProduct                                      (packaging : pom)
    |        | component-common                 (packaging : pom)
    |                   |module-common-api       (packaging : any)
    |                   |module-common-core     (packaging : any)
    |                   |module-common-spring   (packaging : any)
    |        | component-services                  (packaging : pom)
    |                   |module-services-api        (packaging : any)
    |                   |module-services-core      (packaging : any)
    |                   |module-services-spring    (packaging : any)
  • apache_maven

    Depending on your project requirements/number of customers, you may have to support different target environment. This article will help you to make your Maven build a bit more portable in that sense. Maven can help you avoiding having stage dependent data across all your Maven projects/ modules very easily thanks to resources filtering.

    Let’s imagine you want to build your software against many different runtime stack:

    • One is against your developer environment: eclipse, Tomcat, Mysql
    • One is running in a server with Tomcat, Mysql.
    • One is running in JBOSS 

    And that your software is somehow configurable, can be through properties files, xml files, environment variables. Some of your configurations files are containing data that are depending on runtime (paths, password, login, connection settings to database, profiling/tuning settings)

    Some guidelines about resources filtering

    Rules 1  you can’t filter pom.xml use profile keys

    if you have stage specific values pair key (login/password/paths) in pom.xml, you have to

    • use key/value pair properties in pom.xml (between <properties></properties>) or
    • use key/value pair properties that you override in pom.xml/settings.xml profiles or
    • use environment variables (not very efficient by the way and messy if you have too many)

    Rules 2 you can filter resources

    If you have stage specific values pair key (login/password/paths) in resources located at

    • src/main/ressources
    • src/test/resources
    • src/main/webapps
    • Anywhere else depending on your module archetype (an archetype is an helper to create a standardized Maven module)

    Then Maven filtering is the solution for your issues.

    Rules 3 profiles at rescue for new runtime

    Profiles can be defined in settings.xml or pom.xml. Maven has a very good documentation online HERE. Never forget that many profiles can be active at a time, either because you want it (start build with –P profilename1, profilename2) or based on external conditions (can be OS, path, existence/absence of files, etc..)

    Rules 4 Learn the hard way

    ATTENTION: resources  in module with packaging pom are not filtered nor copied to target directories. Don’t use src/main/resources in modules with packaging pom as it wont be copied and filtered to /target

    Tell Maven what to filter

    In order to use filters you must specify a resource directory and set filtering to true. The remaining elements are not required. Activate filtering for all files found in /src/main/resources. All files which contains the denotation ${some.property.name} will be replaced by the building property value defined in <properties></properties>

    Warning: Do not filter files with binary content like images, PDF, ZIP, GIF, JPG:  This will most likely result in corrupt output. If you have both text files and binary files as resources, you need to declare two mutually exclusive resource sets.

    Notes

    • Resources filtering definition has to be place between <build> and </build> , If you have a Maven project and a parent pom, it may belong to that particular pom.xml in order to avoid redundant definitions in all child pom.
    • if you want to filter all *.xxx files at any level in directory hierarchy you need both *.xxx (current level) and **/*.xxx (any level deeper)
    • The first resource set defines the files to be filtered and the other resource set defines the files to copy unaltered as illustrated below:

     

           <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                      <include>*.properties</include>
                      <include>*.xml</include>
                      <include>**/*.xml</include>
                      <include>**/*.properties</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <excludes>
                    <exclude>*.properties</exclude>
                      <exclude>*.xml</exclude>
                      <exclude>**/*.xml</exclude>
                      <exclude>**/*.properties</exclude>
                </excludes>
            </resource>    
            
            <resource>
                <directory>src/main/webapp/WEB-INF</directory>
                <filtering>true</filtering>
                <includes>
                    <include>*.properties</include>
                      <include>*.xml</include>
                      <include>**/*.xml</include>
                      <include>**/*.properties</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/webapp/WEB-INF</directory>
                <filtering>false</filtering>
                <excludes>
                    <exclude>*.properties</exclude>
                      <exclude>*.xml</exclude>
                      <exclude>**/*.xml</exclude>
                      <exclude>**/*.properties</exclude>
                </excludes>
            </resource>
        </resources>
        
        <testResources>
                <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>*.properties</include>
                      <include>*.xml</include>
                      <include>**/*.xml</include>
                      <include>**/*.properties</include>
                </includes>
            </testResource>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>false</filtering>
                <excludes>
                    <exclude>*.properties</exclude>
                      <exclude>*.xml</exclude>
                      <exclude>**/*.xml</exclude>
                      <exclude>**/*.properties</exclude>
                </excludes>
            </testResource>
        </testResources>

     

    With the above configuration, we tell Maven that any files .xml, .properties files has to be processed and filtered.

    Give filter definitions to Maven

    Maven let you define N filters per modules as default: you can have different filters for every pom.xml. This may create some management issues. You can still decide to use one file (per runtime stack, or per profile) but you’ll have to use an absolute path to it.

    You can add a filters in your parent pom.xml by adding, I name these filter static, as they exist or not. You can also define dynamic filer in profile: the profile is active, the filter is added.

    <filters>
            <filter>${filter1}</filter>
            <filter>${filter2}</filter>
            <filter>${filter3}</filter>
        </filters>

    <filter> should be a file, usually a properties file that contains key/values pair that will be replaced at runtime.

    Note here that in order to be able to build against different target runtime, I do use a profile key/value pair properties

    Using Maven profiles to target multiple runtime environment

    Definition and motivation of using profiles

    Maven 2.0 goes to great lengths to ensure that builds are portable. Among other things, this means allowing build configuration inside the POM, avoiding all file system references (in inheritance, dependencies, and other places), and leaning much more heavily on the local repository to store the metadata needed to make this possible.

    However, sometimes portability is not entirely possible. Under certain conditions, plugin may need to be configured with local file system paths. Under other circumstances, a slightly different dependency set will be required, and the project's artifact name may need to be adjusted slightly. And at still other times, you may even need to include a whole plugin in the build lifecycle depending on the detected build environment.

    To address these circumstances, Maven 2.0 introduces the concept of a build profile. Profiles are specified using a subset of the elements available in the POM itself (plus one extra section), and are triggered in any of a variety of ways. They modify the POM at build time, and are meant to be used in complementary sets to give equivalent-but-different parameters for a set of target environments (providing, for example, the path of the app server root in the development, testing, and production environments). As such, profiles can easily lead to differing build results from different members of your team. However, used properly, profiles can be used while still preserving project portability. This will also minimize the use of -f option of maven which allows user to create another POM with different parameters or configuration to build which makes it more maintainable since it is running with one POM only. [from http://maven.apache.org/guides/introduction/introduction-to-profiles.html]

    In eclipse, you may want also to run your application against a simplified stack, for example by using Tomcat/Mysql. I propose you a strategy that should be able to target many runtime.

    First I replace all specific values through my application with keys ${aaaa.bbb.ccc} you determine the value of aaaa and bbb an ccc if you want to categorize them, but nothing stop you to just use ${aaa}

    examples:

    • ${database.mysql.url}
    • ${log4j.default.level} but it can be also only
    • ${log4jdefaultlevel}

    I create

    • a file in my Maven project at /etc/filter/eclipse.properties, I populate this file with keys/values that I use across all my configurations files in my application.
    • another file at /etc/filter/common.properties, I populate this file with keys/values that are independent of the runtime: can be logging information, timeout, etc..
    • another file at /etc/filter/jboss.properties, it contains all specific keys/values pair for that stage.

    You will have to put keys and their values to have the following valid configurations

    • common.properties + jboss.properties –> replace all keys and make your application work in Jboss
    • common.properties + eclipse.properties –> replace all keys and make your application work in eclipse

    I now define in settings.xml  the following profiles

    • id “Common” that will be always active, it make sense to have a common filter for all runtime or stack as long as you only put common key/values pair. The key ${filter1} has the value /etc/filter/common.properties
    • id “Eclipse” that will be active only If I detect an  eclipse environment,  the key ${filter2} has the value /etc/filter/eclipse.properties
    • id “Jboss” that will be not active as default, it will contains a properties key ${filter2} has the value /etc/filter/jboss.properties

    Lets look at the profile “common” in your globals settings.xml (you can also add it to your pom.xml)

    <profile>
        <id>common</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <properties>
            <filter1>${basedir}/etc/filter/common.properties</filter1>
        </properties>
    </profile>

    It define the filter1 and is always active

    The “eclipse” profile, only active when eclipse.exe is detected activate another filter

    <profile>
        <id>eclipse</id>
        <activation>
            <file>
                <exists>c:\eclipse\eclipse.exe</exists>
            </file>    
        </activation>
        <properties>
            <filter2>${basedir}/etc/filter/eclipse.properties</filter2>
        </properties>
    </profile>

     

    Note that the above filters are using ${basedir} reserved property, this is replaced by maven by the current artificatid (or module), so with the example above, you will have to create an etc/filter in all your modules (if you have a multi module setup). If you want to avoid this, you will have to use an absolute path instead of ${basedir}

    The Jboss profile use the same principle as the “eclipse” profile, detect a file or a hostname (jbossbuildagent)

    Make this run in Teamcity/Hudson/Bamboo

    If you activate your profile based on activation settings, you will have nothing to do. If some of your profiles are not activated as default, don’t forget to add a –P profilename1, profilename2, .. in your maven goals list.

     

    References

  • apache_maven

    On larger projects, additional dependencies often tend to creep into a POM as the number of dependencies grow. As dependencies change, you are often left with dependencies that are not being used, and just as often, you may forget to declare explicit dependencies for libraries you require. Because Maven 2.x includes transitive dependencies in the compile scope, your project may compile properly but fail to run in production. Consider a case where a project uses classes from a widely used project such as Jakarta Commons BeanUtils. Instead of declaring an explicit dependency on BeanUtils, your project simply relies on a project like Hibernate that references BeanUtils as a transitive dependency. Your project may compile successfully and run just fine, but if you upgrade to a new version of Hibernate that doesn’t depend on BeanUtils, you’ll start to get compile and runtime errors, and it won’t be immediately obvious why your project stopped compiling.

    Read mote at Sonatype Blog

  •  apache_maven

    The last year, I was at Jazoon 08, and I forget to tell you how good some of their presentation about Maven were

    Let the Continuous Build Embrace Your Database

    "JUnit tests should not depend on database state." - "Set up your test data before you run your test." - We figure this just does not always scale. Mocking test data for hundreds of tables may not be suitable and database schemes evolve as the application does.
    These are common challenges when developing large J2EE systems. This presentation shows practical approaches for project setups and (functional) tests that decided to depend on a database. Developers and build servers may or may not share the database and support for this should be as simple as possible. We give an overview of what proved to be a good setup for an Eclipse / Maven 2 based development and build environment that relies on an evolving relational schema.

    Read More Here 

    The PDF cannot be downloaded, fortunately  I‘ve made a backup just in case 2 years ago. I did upload the presentation at SlideShare

    Here is the mind map I’ve done during the presentation

    • Continuous build for DB
      • db changes
        • SQL script patches
        • changes in chema
        • different db state for  each trunk tag branches?
        • = hell of synchronization issues
        • they put script in SVN
        • only run modified scripts between each or last build
        • run SQL script against references db before pushing the same changes to prod
        • ex: developer commit, build server poll SVNand launch build, then propagate
        • they use continuum
      • they have made a framework that has some tables more to keep which files .SQL has run
      • and what .sql revision svn it was
      • so they can only run delta scripts
      • ex: version 1.0 in prod, but bug appear
        • -> open a branch
        • -> automatic run of branch sql scripts also to trunk
      • Idempotent
        • but the same script apply twice on different database status do not gibe the same result
          • so they have to make script idempotent by checking/handling all previous versions
        • views ad trigger can be Idempotent easily
      • they have DB quality checks
        • primary keys constraints
        • foreign keys
        • etc..
    • fightning bugs
      • not breaking sql scripts
      • no regressions
    • rerunnable junit functional tests
      • auto rollback junit class
        • their own impl of datasource
          • and connection
      • don’t expect developer to properly rollback called in teardown
      • extends autorollbackjunittestcase.class
      • autorollbacktestcase also existing in spring see spring-test.jar
    • eclipse maven setup
      • for junit tests
      • read junit.properties
      • if any junit-fritz.properties  exist it will use the user config file
        • good idea
        • the file will e committed but wont break continuum build server
      • multi modules
        • different classpath (test and main) between eclipse and maven
        • they use propertes in pom.xml and  variable in properties
          • -> filter
    • done by teslekurs
      • they have 70 modules
      • netcetera.ch
    • make a try
      • go to workspace in dos
        • run in pk common "mvn clean test" it should build common like in teamcity
      • Use spring test framework of spring 2.5
    • outlook
      • only oracle
      • they search good test data among their 1TB data
      • want to use maven in also in eclipse, they use the command line right now
    • ideas
      • they store the script they have run to create the database and their SVN revision in db

        someone in room has propose to keep the data in build and add a column to know if data was created by Junit or by the main code

     

    Database with junit

  • apache_maven

    In a multi modules project where you have write API or common code for unit tests in one project and want to reuse these in the tests for another project. Maven will crash during the compile phase if you do not make the following.

    Maven rules of the game:

    • The main code in src/main/java is visible across modules if you did specify project
      dependencies in pom.xml.
    • Test code reside in src/test/java and is not shared across modules, moreover
    • Test code can use any code from src/main/java but not the other way around, which
      make sense as we want to clearly separate test code (junit testcases) from code shipped.

    The solution is to create additional test jar for each module, this is done by putting in the
    parent pom (lets call it parent-pom.xml)

    inside the <build></build> tags the following:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
    </plugin>

This will create for each modules an additional jar named {artifactId}-{version}-tests.jar
during the goal test-jar

Now for every modules where you want to reuse test classes, all you have to do in to put in every
modules pom.xml a dependency to that test jar by adding the tests classifier

 <dependency>
     <groupId>yourGroup</groupId>
     <artifactId>yourReusableModuleArtifact</artifactId>
     <version>0.1-SNAPSHOT</version>
     <classifier>tests</classifier>
     <scope>test</scope>
 </dependency>

 

This has work for me with Maven 2.0.8

  • HowTo transform your xBox
    into a Media Center
    with XBMC

    XboxMediaCenter is a free open source (GPL) multimedia player for the Xbox™ from Microsoft. Currently XboxMediaCenter can be used to play/view most popular video/audio/picture formats such as MPEG-1/2/4, DivX, XviD, MP3, AAC, JPG, GIF plus many more less known formats directly from a CD/DVD in Xbox DVD-ROM drive or of the Xbox harddrive, XBMC can also play files from a PC over a local network and even stream media streams directly from the internet. XBMC has playlist and slideshow functions, a weather forecast and many audio visualizations. All these features enable the Xbox™ running XboxMediaCenter to fully function as a multimedia jukebox. XBMC is easy to use, it's convenient, flexible and offers great price/performance ratio. (This, The XboxMediaCenter Project is also known as "Xbox Media Center" or simply "XBMC"). Note! XBMC is a hobby project that is only developed by volunteers in their spare-time for free. (Remember that XboxMediaCenter does require a modded Xbox to run on or it will not function). fromwww.xboxmediacenter.com

    {mosgoogle center}

    xboxIconLegal Issues

    It is strictly forbidden to modify your xBox, sell or install mods chip in france. Even opening the XBOX is forbidden.
    Remember pirating is a crime, support the developers and film companies.

    xboxIconWhat does XBMC do?

    http://www.xboxmediacenter.com/info_project.htm 

    xboxIconProcess

    What you will have to do: (green mandatory,blue optional)

    1. Buy a Xbox 
    2. open the Xbox (void garanty) 
    3. Install a modchip 
    4. flash a BIOS on modchip 
    5. Install a new dasboard with FTP support 
    6. backup original data found on C: with FTP to your PC 
    7. install and configure Xbox media center (XBMC) with FTP 
    8. Adapt scripts (XML files) for your network or shares drives 
    9. Install a streaming server on some PC or use Samba to access remote data (video, pictures and music) 
    10. Add a 3rd party 5:1 cable with digital output, RGB... 
    11. Install a bigger harddisk if you want to host more video, musicon the Xbox 
    12. Install a harddrive led 
    13. Configure internet 

    • Install Linux.... 


    {mosgoogle center}


    xboxIcon1. Buy a Xbox, required


    With chance, you can still find this pack from
    christmas 2004. Cost me 199euro

    No Games, but a video DVD is in the pack.
    Remote Controller pack, a lot more user
    friendly than the pad for this application..


    A xBox

    Optionnal

    xbox wireless option
    Network cable, if you want to use your PC as a storage server. M$... sell also a wireless card.
    I was trying this streaming solution 10 minutes, then a strong headache forced me to stop it.

    {mosgoogle center}


    xboxIcon2. Open the Xbox (void the garanty)
    1.70€
    This is the cheaper version I've found. This is a
    Torx screwdriver

    time: 5 minutes

    Overall view, return the xBoxLocate the screws, 4 are under the
    gromets, 2 are under stickers.
    Use the allen #20
    All screws have the same length. 2 additionnal
    screws are under the sticker
    Remove the harddisk, only 1 screw.
    Use the allen #10
    Remove
    Remove the DVD rom, only 2 screws
    Use the allen #10
    Ready to install the mods chip.
      
      

    {mosgoogle center}


    xboxIcon 3. Install a mods chip

    All mods-chips are more or less equal! I mean that some special restriction, like DVD region, macrovision, disk eject, run signed code (from M$ or 3rd party game company) or unsigned code (Linux, softwares and emulators) etc... are not controlled by the mod-chip itself but only by the BIOS (Basic Input Output System, this small program is responsibe for initializing devices, starting a kernel, and low level operations)...So what?
    Differences are:

    • Ease of installation (soldering may be required or not), 1st generation of chips (2000) use to have more than 50 cables, 2rd generation less than 15 cables and 3rd most of the time no soldering.
    • Onboard memory size (up to 2Mb for the latest generation) and number of BIOS you can store (up to 6 with different memory mapping : 6 bios of 256kb or 2 bios of 512kb and 4 of 256kb....)
    • The way you can flash a new BIOS (printer LPT port or USB or through the dashboard with a CD).
    • Possibility of extension: like adding a LCD panel (Xenium).

    Price range is from $20 (soldering required and only one bios like the Aladin) to $60 (2Mb, USB, 6 bios, LCD) for the most expensive.

    I choose theXbit because:
    • Xbit is Solderless (for all XBOX versions from 1.0 to 1.5): All You have to do is to position the chip correctly, and use 1 screw...In fact the double row of pogo pins (pins wih springs) are postionning the chip nearly alone.
    • Xbit accept BIOS up to 2Mb, you can have many bios in the onboard memory (6 memory mapping) and chose the one you prefer with dip-switches (6 configurations)
    • Has a USB interface while other has LPT or none (Some of them even sold the LPT bios loader separatly)

    Xecuter 3.0 was my first choice but it was not available at that time

    All manufacturer have great HowTo sections, for Xbit just follow instructions here:
    http://www.dms3.com/xmanuals.htm
    http://www.dms3.com/xbit_pogopin_install.htm


    {mosgoogle center}


    xboxIcon4. Flash a Bios on the modchip

    Which BIOS?Nearly all mod-chip are shipped without a BIOS installed, in best case you get a cromwell BIOS (open source BIOS develop to boot linux), this is because of legal issues: a lot of BIOS are based on M$... hacked version.

    http://www.xbox-scene.com/bios_retail.html Here you can find a comparaison table of all functionnalities with a glossary of technicals terms

    Executer is a famous modchips builder and they provide their own BIOS free of charge, You can install it on all mods chips since they provide both binary image of 256kb and 512kb.


    {mosgoogle center}


    xboxIcon 5. Installing a new dashboard

    The M$... dashboard do not have: FTP (File Transfert Protocol) support, game backup, file explorer, linux loader, skins support etc... and can only run signed code.
    This is why You must install a new one:


    I have only tried EvolutionX and I am happy with it

    For installing EvolutionX, all you have to do is to locate on internet the file: SlaYer's EvoX Auto-Installer v2.5FINAL.iso (215Mb) and burn it on a DVD-RW or CD-RW.

    Boot your XBOX with this CD inside, and follow the onscreen menu. In 2 minutes, You can have EvolutionX, Linux, XBMP installed. You can even prepare a new and bigger harddisk with no efforts.
    Reboot

    You have now:
    C:As before, partition where the XBOX operating system is
    D:DVD drive
    E:Game save, original dashboard music and all third party applications: dvd reader, ftp, many players, some emulators (5Gb)
    F:If you have a disk bigger than 4Gb you will have some space to store Linux for example
    G:Available if you have a disk bigger than 120Gb
    X:Internal cache (768Mb)
    Y:Internal cache (768Mb)
    Z:Internal cache (768Mb)

    If You want that Avalaunch display your BIOS version in the first page,
    You need to open the file c:evox.ini . For the Executer 4981 BIOS add these 2 lines:
    Rom = "x2 4981.06",0xca25c9b3721da8c96c4770515dbcda07
    Rom = "x2 4981.67",0xb6eb9fb7b79795c962b7f998ee4a8694


    {mosgoogle center}


    xboxIcon6. Backup original data found on c: with FTP to your PC

    Connect your Xbox to the network!Using the remote controller or gamepad, you can go in evox "system preferences", this is the place where you can set the FTP server adress, password, DNS, gateway.

    • Use a fix IP, it should be something like 192.168.0.XXX with XXX from 2 to 255, use for example 192.168.0.10
    • Do not set the 2 DNS (Domain Name Server which is normally your router 192.168.0.1) if you do not want to let your XBox have an access to internet.
    • You can not change te FTP login name ("xbox"), only the default password ("xbox") this is because the login "xbox" is encrypted in MD5, a page onwww.xboxmediacenter.com (FAQ) section let you change it in file fileserver.xml

    Save all changes (save changes is located at the end of the menu), and reboot your Xbox

    Attention: I use to have some instabilities with 2 different crossed Ethernet cable, in fact the FTP was instable and unusable (disconnect and time out problems), I am using a router-switch in the middle now and everything is working perfectly. This is probably due to a mass problem.

    Use your favorite FTP client (LeechFTP, CuteFTP,....) to connect to the XBOX, it is good idea to backup all files found under C: (default dashboard and RSA key pair for your machine)

    If you want to play withEvolutionX: add or translate for example some new entries in the main menu, edit the filec:evox.ini


    {mosgoogle center}


    xboxIcon7. Install and configure Xbox media center (XBMC) with FTP

    XBMP is now discontinued, a XBMB team decide to rewrite it and create XMBC

    XBMC review at Tomshardware

    "Xbox Media Center (XBMC) for Microsoft's Xbox game console turns the Xbox into a very capable
    multimedia jukebox, enabling it to play AVI (divx/xvid), MPEG, MP3, JPG and many other audio/video/picture file
    formats from CD/DVD, HD, a LAN or the internet
    ."

    For legal reasons, you can only download XBMC source code, but not the binary since the SDK of Microsoft do
    not allow You to distribute binary. The open-source community is currently creating an open source SDK: the XDK.

    How to find binaries:

    • Try to find it on P2P network : eMule, eDonkey or
    • www.geux.net make a light distribution (without codecs, scripts and skins) or
    • If you want to have always the latest build (risky it may not be a stable version since it reflect the current state of development) : http://www.azard.firstream.net/ or
    • Compile it yourself with XBOX SDK and Visual C++ if you own a M$ license ;-)

    How to install it:

    • XBMC is ONLY a directory, copy it to e:/apps/XBMC for example and add an entry in c:/evox.ini
      section "Root"
      {
      ..
      Item "Multimedia Station","e:/Apps/XBMCdefault.xbe"
      ...
      }
    • Reboot and you're done.
    • If you have problem with XBMC, please first read the Frequently asked questions first: http://www.xboxmediacenter.com/info_faq.htm

    Links:


    {mosgoogle center}


    xboxIcon8. Adapt scripts (XML files) for your network or shares drives

    XMBC configuration is done through a XML file (a plain text file heavily structured with some special tags),
    this file is in e:/apps/XBMCXboxMediaCenter.xml

    The purpose of this file is to tell the player where to find digital content, because your multimedia files
    can be stored on the XBOX or on the network:

    XboxNetwork
    HardDiskC: or E: or F:
    Digital StorageD: (DVD)
    D: (ISO mode)
    D: (UDF mode)
    streaming protocols
    XNSThe first streaming protocol.
    XBMS"A new network protocol for media streaming named XB Media Streaming Protocol (XBMSP) developed by PuhPuh in discussion with RUNTiME & Pope-X.
    XBMSP is a more simplistic & faster protocol than the XNS protocol currently used by XboxMediaPlayer. Though XBMSP has not replaced XNS it can be used by future XStream Servers to share media files to XboxMediaPlayer. PuhPuh has also developed XSteam test server called "ccXStream" that uses the XBMSP protocol." from
    www.xbox-scene.com 
    SAMBAAn open source implementation of the SMB file sharing protocol that provides file and print services. Samba allows a non-Windows server to communicate with the same networking protocol as the Windows products.
    Samba was originally developed for UNIX but can now run on Linux, FreeBSD and other UNIX variants. It is freely available under the GNU General Public License. XBMC has an integrated SAMBA client and support natively Samba drive

    This file contains a documentation and is quite easy to modify.

    Attentionwhen you copy digital content to the Xbox harddrive with FTP, the filesystem (FAT-X) has a lot
    of limitations! no name up to 43 characters, no special character < > = ? : ; " * + , / | and avoid accents too...


    {mosgoogle center}


    xboxIcon9. Install a streaming server on some PC or use Samba to access remote data

    A list of all available tools can be found on http://www.xbox-scene.com/tools/tools.php?page=streaming

    Personnaly I have only use Relax pre 0.76, I ran into problem with NFS protocol and was not convince
    by its efficiency (speed of access and streaming). I decide to try Samba (smb://) and it works perfectly since!

    1. open e:/appsXBMCXboxMediaCenter.xml
    2. At the end of the file, locate the bookmark section.
    3. Example of bookmark
      smb://xbox:This email address is being protected from spambots. You need JavaScript enabled to view it..0.4/EOLE/
      where

      • xbox is the windows/linux/macintosh user name (this user must exist)
      • k7sEP1zY is the password, do not use ';' as this has a signification in the smb:// url (use to specify a network domain)
      • 192.168.0.4 is the fix IP of the server (nearly all router can assign a fix IP adress to a Ethernet card) Here this adress is one of my PC
      • EOLE: is the name of one of my share drive,  Share drive name are not mandatory!

    {mosgoogle center}


    xboxIcon10. Add a 3rd party 5:1 cable with digital output, RGB...

    XBOX HIFI STATION RGB / SVHS / Optical / Coax / Component


    • RGB SCART output
    • Gold contacts
    • Optical output / coax output for 5.1 Dolby Digital
    • S-Video/SVHS output
    • COMPOSITE output
    • Audio-output
    • COMPONENT Y/Pr/Pb for videoprojector
      less than 20euroHERE !!!

    I bought this one

    Xbox RGB-Pro-Advanced cable
    • RGB-SCART-cable
    • Gold contacts
    • Optical audio output DolbyDigital 5.1/AC2 Receiver
    • Audio/Video Chinch ouput
    • SVHS output
      less than 18euroHERE !!!

    {mosgoogle center}


    xboxIcon11. Install a bigger harddrive

    1. Boot Xbox with the original hard disk,
    2. With FTP save everything from C: and E:: on your local PC, If you want to reuse this old disk (8Gb of free space), do not forget with SlaYer's EvoX Auto-Installer v2.5FINAL.isoto unlock the harddisk before removing it from the XBOX otherwise it is unusable.
    3. Install the new hard disk in the case,
    4. Using the CD which contains with the CD containing SlaYer's EvoX Auto-Installer v2.5FINAL.iso,boot the Xbox and choose "Initialize new disk",
    5. Restart the Xbox without any CD after completion,
    6. Using FTP, copy everything back to C: and E:

    {mosgoogle center}


    xboxIcon12. Install a harddrive LED

    see Add a led to your Xbox to see hard disk activity 


    {mosgoogle center}


    xboxIcon13. Configure Internet

    All You have to do is to specify the gateway and DNS in the dashboard. If XBMC configuration file (e:/appsXBMCXboxMediaCenter.xml) do not contains any gateway or DNS it will use the dashboard settings.

    1. Set the Internet settings  in the dashboard. OR
    2. Set the Internet settings in XBMC
    1: Set the Internet settings  in the dashboard.

    Where
    • A is a FIX IP adress assign by the router to the XBOX
    • B is a constant. aka always the same value: 255.255.255.0
    • C is the IP adress of my router gateway, it should be as default 192.168.1.0 for NetGear and 192.168.1.1 for US robotics. Default Gateway and DNS MUST have  the same adress. The DNS function is explained here [Wikipedia]


    2: Set the Internet settings  in XBMC.
    go into the settings panels of XBMC under internet protocol


    Choose
    A  if you already set the DNS, gateway, IP in the dashboard  (point 1 above)



    Choose
    if you prefer to set the DNS, gateway, IP in XBMC  (same values as in point 1 above)


    ChooseC if you prefer to let the system find DNS, gateway, IP, Your gateway must have DHCP enable!


    If everything is working, You should:

    • See some news (RSS) in the frontpage of XBMC,
    • Be able to query the meteo status.
    I recommend you to set the IPadress here (for example 192.168.0.10) or use you router so your XBOX has always the same adress.

    {mosgoogle center}


    xboxIcon Install Linux

    Installing Linux is not needed to run XBMC, It is just a possibility among other the xbox has.

    1. So you want a cheap linux box, a small webserver to host your internet page, creating a cluster, etc... You may want to install Linux on Your Xbox
    2. You just want to play multimedia content and only have the standard harddisk (8Gb), You will only have enough storage on harddisk to install XBMC
    3. You are already addict to Linux and have a bigger harddisk (like 80Gb or 160Gb) - You can install both! XBMC and Linux!

    Here are some very good tutorials:
    http://www.xbox-linux.sf.net/
    http://www.xbox-linux.org/ Linux Debian on Xbox



    xboxIcon 15. Frequently asked questions

    I've load a bad/corrupt skins and can not change it in the graphical user interface of XBMC!
    Search in E:/TDATA/in all directories for a file settings.xml (on mine Xbox it was in E:/TDATA/0face008) and edit this file


    MayhemWidescreen
    true
    true

    change the skins name to the previous which was working, and then restart XBMC


    {mosgoogle center}


    xboxIcon Not required but...

    You may want to :

    • Change the Fan because it is too noisy in a home cinema setup...
    • Connect USB devices: keyboard and mouse, in order to use linux. Some interface are now available ($15) or you can build it yourself (soldering required)
    • Replace the genuine DVD rom, in order to have a better compatibility with CD-CDRW (the genuine drive Samsung read correctly only closed sessions discs, other do not read CDR)

    {mosgoogle center}


    xboxIcon Helping the community
    There is surely something for you!

    • Help at the code level,
    • Create more skins, logos
    • Write documentations, tutorials.
    • Translations of interface, manuals...,
    • Help newbies in forums,
    • And pay some games instead of copying them!

    {mosgoogle center}


    xboxIcon Thanks

    My thanks goes first to M$... for having created such a device, and think that nobody will ever crack its protections schemes. Then to the community which always do a great job and is creating a lot of good releases in all domains.


    {mosgoogle center}


    xboxIcon Xbox Linux clusters

    A lot of people want to create farms of Xbox to resolve some complex challenges (like Seti at Home, RSA key crack)


    xboxIcon Emulation

    http://xboxemul.gueux.net/
    http://www.lantus-x.com/xSnes9x/ SNES
    http://mameox.sourceforge.net/


    xboxIcon Links

    http://www.xbox.com/ Official XBOX site
    http://www.xbox-scene.com/ The REFERENCE site, if you visit only one, this MUST be the one!
    www.teamxecuter.com the best, oldest, constantly improved mod chip available.
    http://www.techtv.com/screensavers/modtips/story/0,24330,3420568,00.html XBMP Review at techTV, some video can be download.
    http://sourceforge.net/projects/xbplayer Host the source code of the project.

    http://mediaportal.sourceforge.net/ open-sourced Windows(Win32) port of Xbox Media Center, named Media Portal.

    http://www.xboxhacker.net/ All about mods chips in general
    http://www.avalaunch.de/ Avalauch community
    http://www.teamavalaunch.tk/ Team Avalaunch (dashboard)
    http://www.xboxopensource.com/

    http://sourceforge.net/projects/openxdk/ OpenXDK is an Open Source, Free, Legal Xbox Development Kit. OpenXDK is being developed to facilitate hobbyist and "homebrew" coding for the Microsoft XBox.

  • apache_maven

    The JBoss division of Red Hat develops several large open source Java applications. These include the JBoss application server, Hibernate, Seam, and several others. These applications primarily used Ant for builds, tests, releases and other parts of the project life cycle. As the size of these projects increased, several problems were experienced with the build system. The builds became difficult to maintain for current developers and difficult to understand and use for new developers. Managing the various project dependencies also became more difficult as dependency versions were changed, source code was moved, etc. There was also a lack of consistency from one project to the next. Since there were only minimal standards in place, the build scripts of the projects would be very different from each other. These and other issues led to the decision to migrate from Ant to Maven. Read More HERE

  • apache_maven

    The last year, I was at Jazoon 08, and I forget to tell you how good some of their presentation about Maven were

    Module-based development with Spring and Maven 2

    Modularity belongs to the basic architectural best practices. Splitting your application in separate modules can reduce undesired coupling as well as lead to high cohesion, reduce complexity, simplify team development, and decrease execution size by using only the required modules. This talks presents how we combine existing technologies (Spring and Maven 2) to get a seamless module support for the development, test and runtime of Java applications. Maven is concerned with build time aspects, Spring is concerned with run time aspects and there are some shared aspects that concern both. A developer can thus define in his module what the module shall do during development, test and runtime. This leads to better separation of concerns as each module can focus on its aspects and is less bothered by aspects of other modules. We argue that to realize the full potential, only combining plain Maven 2 and Spring is not sufficient and discuss what to add. The module support is implemented and freely available in the open source EL4J project (http://EL4J.sf.net). Read More Here

  • teamcity.joomla

    Status/Done

    • Joomla is also a simple dependency in scope compile (productive code and tests need it)
      <?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>

      Deployed and viewable at http://maven.waltercedric.com/artifactory/webapp/browserepo.html
      joomla.in.artifactory

      So binding your code to a new version or old version is as simple as changing in your component pom.xml

      <dependency>
      &160;&160;&160; <groupId>org.joomla</groupId>
      &160;&160;&160; <artifactId>joomla</artifactId>
      &160;&160;&160; <version>1.5.10</version>&160;
      </dependency>


    &160;

    Delayed Commit (also known as private build). It allows you to run the full build with tests on the server as if you checked in all your changes, but without actually checking in your changes until the build is successful,so you will know if you're about to break the build before you actually break it.

    Open

    • Deploy generated artifacts to a Joomla running stage (runtime farms of Joomla!) in order to run integration testswith Selenium
    • Add selenium test cases for testing the GUI, also running “integration tests
    • Packaging is jar, better would be zip or tar.gz
    • Use Phing (http://docs.joomla.org/Setting_up_your_workstation_for_extension_development) for developer environment, and maybe also deploy to farms
    • Deliver SolarJoomla as soon as PHPDocumentator, PHPUnit, DOxygen are running in XAMPP
    • Publish generated site artifacts' to new sub domains
    • Add reporting plugin.
    • DOCUMENT everything in myWIKI at the same time

    Future

    Must work also in Atlassian Bamboo, Apache Hudson … I need your help for that, that wont be a huge task.

  • It's Christmas today!!!! (Part 2)


    You want to read some reviews on the PT900, the best place is at www.projectorcentral.com in the Panasonic PT900 section. I have watch till now only 2 DVD with it, base of image: 2 meters (I have fixed nothing, I expect something like 3.5 when installed), I've use it in low power mode: astonishing images!!!!!

    • Description: 16:9 LCD Home cinema
    • Technology: 3x LCD
    • Resolution: 1280 x 720
    • Aspect ratio: 16:9, or  4:3
    • Picture brightness: 1100 Ansi Lumen
    • Contrast: 5000:1
    • Cooler sound: 26 (db im Normalmodus)
    • Distance: 1,2 bis 7,4 (m)
    • Features: Lens Shift, Trapezoidal correction, Smooth Screen Technologie, Prog. Cinema Scan
    • Connections: HDMI, YUV, VGA, Scart, S-Video,
    • Video Lamp: 3.000 hours
    • Measures: 33,5x10,4x27 (cm)
    • Weight: 3.6 kg
  • apache_maven

      apache.felix.logo

    The Apache Felix Maven SCR Plugin is a great tool to ease the development of OSGi components and services. Components and services are defined through annotations and the plugin creates the necessary descriptors for the OSGi Declarative Services, Config Admin and Metatype services. Starting with version 1.4.0 of the plugin, OSGi Declarative Services versions 1.0 and 1.1 are supported.

    Introduction

    In OSGi based systems functionality is mainly provided through services. Unlike traditional systems but comparable to Spring, a service is not reqiured to implement a framework defined interface. Instead services implement one or more interfaces, which stipulate the type of service provided. It is the lifetime of the bundle, which defines the lifetime of the service: A service object may be instantiated when the bundle is started and will automatically be removed when the bundle is stopped (and the service has not already been unregistered).


    • 1,920 x 1,080 full-HD panels with perpendicularly aligned liquid crystals
    • Outstanding 11,000:1 contrast ratio - highest in its class *1
    • Lumens brightness rating of 1100.
    • Newly developed lens system with original aspherical lenses
    • Pure Colour Filter adjusted to professional specifications for rich, deep blacks and vivid colours
    • 14-bit gamma processing original LSI
    • HD-optimized Dynamic Iris Lens with new algorithm
    • Waveform monitor function
    • HD-optimized Smooth Screen
    • Cinema Colour Management
    • Progressive Cinema Scan (3/2 pull-down)
    • Scene-adaptive MPEG noise reduction
    • Lens-centred symmetrical design
    • 2x powered optical zoom and powered focus
    • Learning Remote Control
    • Two HDMI Inputs
    Price Tag: $3500
     
  • With 2499$ MRP, 60000:1 contrast ratio - this projector is going to set a new trend in 1080p projector market. For all of you still looking for good reasons to buy it or not, projectorcentral.com has put an interesting review online

    &160;285f581f4dcb4304ac52e9ee275f556a

    My current projector (PT900AE) is still working after 2122 hours... hope it will last till the AE3000 reach Switzerland.

    An interesting thread at AVS forums, and the specifications are available as PDF HERE

  • to be continued



  • The PT-AX100U is the successor of the preceding model PT900AE- this new projector comes with better initial calibration, better benchmark scores and an improved lamp with plenty of lumen output.  (2000 Lumens!). Beside this I have 900 hours usage on my PT900AE in less than 6 months.
    You can find some of the best reviews below:
  • Really funny and interesting way to present the layout of most if not all game controller ever made to date.

    periodicTableOfGameController

    Via http://www.notquitewrong.com/rosscottinc

  • panasonic_PT-AE3000

    it look like that I have found my next projector...except if Sanyo come with a better offering for less than 2000 CHF of course :-) or www.projectorecentral.com do not give a positive review (that I doubt)

    PT-AE900 720p projector is now 3 years old and has more than 1980 hours lamp usage (on a max 3000 hours)...

    PANASONIC LAUNCHES NEW 1080p FULL HIGH-DEFINITION LCD HOME THEATER PROJECTOR


    New PT-AE3000 Provides A Bright and Dynamic Wide screen Home Viewing Experience with Crisp Motion Images Via Frame Creation Technology
    DENVER – CEDIA Expo – Sept. 3, 2008 – Panasonic Projector Systems Company, Unit of Panasonic Corporation of North America, announced today the debut of its newest LCD home theater projector, the PT-AE3000. With full high-definition 1080p (1,920 x 1,080 pixel) native resolution, the PT-AE3000 gives home theater enthusiasts a higher level of picture quality entertainment, producing crisp and clear images through new state-of-the-art projection technology.
    As an evolution of its award winning predecessor, the PT-AE2000, the PT-AE3000 delivers a captivating 1,600 lumen brightness and powerful 60,000:1 contrast ratio. To achieve sharp and detailed reproduction of fast moving motion images, Panasonic has developed and equipped the PT-AE3000 with new Frame Creation Technology optimized for large screen viewing. And for easy adjustment to different widescreen movie formats like 21:9 or 16:9, the projector is also upgraded with a Lens Memory Load feature which is capable of memorizing and restoring zoom/focus positions for multiple aspect ratio flexibility.
    Higher Picture Quality with Brightness Upgrade
    The dramatic increase in the contrast-ratio and dynamic range was made possible by the newly engineered Pure Contrast Plate technology that effectively blocks unwanted light from the path of projection. In addition, the polarization filter system surrounding the Pure Contrast Plates has been redesigned to achieve the PT-AE3000's higher level of brightness.
    Together with a host of carefully engineered Panasonic technologies including the high precision optical lens unit, Dynamic Iris and Smooth Screen technology, the PT-AE3000 truly distinguishes itself against its competition and as a projector solution that home theater enthusiasts will thoroughly enjoy.
    Crisp and Clear Details for In-Motion Images
    The PT-AE3000 now incorporates a Frame Creation technology that interpolates an additional frame by analyzing the characteristics of two adjacent frames, creating sharp and clear images of fast moving scenes in sports and action movies, especially for large screen viewing. For crisp motion images with high resolution, users may set their frame count preference to 120 frames/1 sec from 60 frames/1 sec for 60Hz video signal input, while 24frames/sec (24p) signals are quadrupled to 96frames/1sec by interpolating three additional frames to allow natural frame-to-frame transitions.
    The new and advanced Detail Clarity Processor V2.0 allows the projectors' digital processing engine to extract information of the low, mid, high, and even the super-high frequency components. The ability to apply these different degrees of sharpness permits the PT-AE3000 to reproduce natural, lifelike images with exceptional clarity and three-dimensionality to the smallest details.
    The PT-AE3000 comes equipped with professional-level features that let users personalize the images they see on the screen. First, the projector's Split Adjust mode allows users to split the screen into two halves; one to make picture adjustments and one to see those adjustments as a baseline reference. Second, the PT-AE3000's waveform monitor-seen mostly on professional video and film equipment-measures the level of brightness output from a given video signal source. This feature also automatically verifies that the source device is outputting at full dynamic range, and quickly makes adjustments to optimize it for the home theater setting. Users can easily see a graphical representation of any changes made to the unit's color settings.
    Ease of Set-up and Use
    Many movies come in aspects that are even wider than the projector's 16:9 aspect ratio to match the image size 21:9 seen at movie theaters. More and more projector customers are using the 21:9 wide screens to mirror the movie theater experience. The PT-AE3000 enables users to pre-set three different zoom/focus positions and enables easy recall of those positions with the Lens Memory Load function.
    Initial set-up and installation are quick and simple, as the 2.0x zoom can cast a 120-inch diagonal image from as short as 3.6 meters (about 11 feet) to 7 meters (24 feet) from the screen. The projector's lens shift capability enables 100 percent vertical adjustment and 40 percent horizontal adjustment so that viewers can suspend the projector either close to the ceiling or on wall mounts. The lens-centered design and maintenance features such as the replaceable side filter and top lamp, make the projector easy to install and maintain.
    The projector is also equipped with an abundant selection of connections; including three HDMI 1.3 inputs and two component input terminals. The three HDMI 1.3 inputs are all Deep Color and x.v.Color compliant. The Deep Color supports 10 bit (over 1.07 billion) and 12 bit (over 68.7 billion) color depths for smooth tonal transitions and subtle gradations between colors, while the x.v.Color compliance realizes accurate reproduction of actual, true-to-life images.
    Eco-Friendly Intelligence
    In addition to its outstanding features, the new PT-AE3000 is also an ecologically conscious product. The intelligent power management system within the projector reduces the lamp power to the exact required level of brightness depending on what content is displayed. Other than in scenes where full brightness is required, the lamp intelligently determines the necessary power output by analyzing more than 3 billion different image patterns. This advanced analysis process reduces the main power consumption by as much as 10 percent when the dynamic iris function is in operation, thus saving energy.
    Other ecological considerations include an off-timer that reduces wasteful power consumption, as well as an extremely low standby power consumption of 0.08 W[1], which is the lowest in its class.[2]
    The Panasonic PT-AE3000 LCD home theater projector will be made in Japan, available starting in October 2008 to authorized presentation systems dealers with an MSRP of $3,499.
    To learn more about this projector, please visit
    http://www.panasonic.com/projectors  orhttp://panasonic.net/pavc/projector/

  • 20130219_211947

    Some notes about my experience using the Raspberry Pi model B…and you get it running Linux Debian on it!

    The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.

    […]

    We don’t think that the Raspberry Pi is a fix to all of the world’s computing issues; we do believe that we can be a catalyst. We want to see cheap, accessible, programmable computers everywhere; we actively encourage other companies to clone what we’re doing. We want to break the paradigm where without spending hundreds of pounds on a PC, families can’t use the internet. We want owning a truly personal computer to be normal for children. We think that 2012 is going to be a very exciting year. [About Raspberry PI]

  • Some time ago I was asked if I would like to write a review about one of the new video courses from Packt Publishing. It was "Getting Started with Apache Maven" http://bit.ly/1fycmpP by Russell Gold and since I have been using Maven for some years now (since 2007) and did publish some articles myself, I thought it would be nice to help them promote Apache Maven.

    The course is organized in eight chapters, forty videos with a length between two and five minutes, for a total length of two hours. The aim of the course is to provide the shortest path to use effectively Maven

    You can download the course as a single zip file. After unpacking the file to a local hard disk you find a user guide, support information, a reference to the code examples and the video files. As you may notice I said "reference to the code examples". Even if the name of the file "Code Bundle.zip" it contains only a file with the link to the source code on github.

  • apache_maven

    Acunetix Web Vulnerability Scanner (WVS) is an automated web application security testing tool that audits your web applications by checking for exploitable hacking vulnerabilities. Automated scans may be supplemented and cross-checked with the variety of manual tools to allow for comprehensive web site and web application penetration testing.

    Acunetix  can detect some security vulnerabilities among others, click here for a list

    Until now, Acunetix WVS does not support automated scanning via API's.  However, Acunetix WVS supports command line, which can provide similar functionality and is an easy way to integrate Acunetix WVS with other third party applications.

    The example I am providing is using Maven, and start in phase “integration-test” Acunetix against your web application. Note that running Acunetix is a costly operation, it cost CPU, take a lot of time, stress your network, so I recommend you to run it at night (3 or 4AM) so developer can a receive a feedback the day after. I have also define a Maven profile “WebappSecurityTesting” so I can trigger the check in a new Build in Jetbrains TeamCity/Atlassian Bamboo/Java Hudson with -PWebappSecurityTesting in Maven goals list.

    Trivial but worth mentioning:

    • You need in Maven phase “pre-integration-test” to deploy your web application to a running container: tomcat, jboss, weblogic, iis.. before running acunetix against it
    • You need to adapt values in red below to your runtime environment
    • the Ant task is run only if your OS match the string “Windows XP” so remove this or use the right OS's name  determined by the Java Virtual machine and set in the "os.name" system property.
    <profiles>
        <profile>
            <id>WebappSecurityTesting</id>
            <activation>
                <activeByDefault>false</activeByDefault>
                <!-- automatic activation
                    <file>
                    <exists>C:\acunetix\wvs_console.exe</exists>
                    </file>
                -->
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>integration-test</phase>
                                <configuration>
                                    <tasks name="Run acunetix webscanner">
                                        <exec dir="C:\acunetix" executable="wvs_console.exe"
                                            os="Windows XP"
                                            output="${basedir}/target/acunetix/result.txt">
                                            <arg value="/Scan"/>
                                            <arg value="http://testphp.acunetix.com"/>
                                            <arg value="/Profile"/>
                                            <arg value="default"/>
                                            <arg value="/SaveToDatabase"/>
                                            <arg value="/GenerateReport"/>
                                            <arg value="${basedir}/target/acunetix"/>
                                            <arg value="/ReportFormat"/>
                                            <arg value="PDF"/>
                                            <arg value="/ReportExtraParams"/>
                                            <arg value="/r WVSComplianceReport.rep /k PCI12.xml"/>
                                            <arg value="--ScanningMode=Heuristic"/>
                                            <arg value="--UseAcuSensor=TRUE"/>
                                            <arg value="--EnablePortScanning=TRUE"/>
                                        </exec>
                                    </tasks>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    Explanation

    Acunetix WVS console application can be run by running 'wvs_console.exe' from the Acunetix WVS installation directory.  An example of a typical Acunetix WVS scan command including explanation, can be found below:

    /Scan http://testphp.acunetix.com: Instruct the scanner to launch a single site scan against http://testphp.acunetix.com.

    /Profile default: Use default profile for scanning.

    /SaveToDatabase: This parameter instructs the scanner to save scan results to reporting database.  If this parameter is not enabled, reports cannot be generated.

    /GenerateReport "c:\reports\": Generate scan report in the path 'c:\reports'.

    /ReportFormat PDF: Generate the report in PDF format.

    /ReportExtraParams "/r WVSComplianceReport.rep /k PCI12.xml": Generate a PCI version1.2 compliance report (PCI12.xml) using the Compliance reporting template (WVSComplianceReport.rep).

    --ScanningMode=Heuristic: This option is to instruct the scanner to use heuristic scanning mode against specified target.

    --UseAcuSensor=TRUE: Use AcuSensor Technology during scan. The AcuSensor client files must be installed and configured on the target for AcuSensor Technology to function.

    --EnablePortScanning=TRUE: Instruct the scanner to port scan the target as well, and run network security tests (Network Alerts) against the target.

    References