java

Java (Indonesian: Jawa; Javanese: ꦗꦮ) is an island of Indonesia. With a population of 143 million, Java is the world's most populous island, and one of the most densely populated places in the world. [read more at http://en.wikipedia.org/wiki/Java]

  • jazoon08 

    I will be there on wednesday and thursday in Zürich Sihl City and here is the program

     

    And I will attend the following sessions tomorrow:

    Register, read the program just go there: http://jazoon.com/

  • jazoon-logo

    I will one more time this year attend JAZOON 09 in Zürich. So you’ll be able to meet me there

    Jazoon is an international industry conference on Java technology in Zurich. It addresses software developers and architects, IT decision-makers and consultants throughout Europe and around the world. Jazoon gives Java experts a platform in the heart of Europe where they share their ideas and experiences.
    From 22 to 25 June 2009, Zurich will be the meeting place for the international Java community. By presenting a comprehensive conference program and creating a communicative atmosphere, Jazoon helps personal contacts grow and transcend technical, geographical and cultural boundaries. A supplementary program including an exhibition of solutions, tools and continuing education as well as career opportunities and various networking events ensure added benefits for every target group.

    Below you’ll find the conference list i will attend..

    Conference venue

    Arena Filmcity
    Kalanderplatz 8
    8045 Zurich

    Jazoon takes place in the Arena Film City cinema complex offering large presenting screens and very comfortable seats.

    Tuesday 23.06.2009

    Wednesday 24.06.2009

    Thursday

  • I will attend the keynote of Ken Schwaber @JAZOON 2010, before heading to the Office

    Keynote
    Wednesday, 2 June 2010, 9:00-10:00, Arena 5

    alt
    Ken Schwaber
    Scrum.org

    Abstract
    Scrum is the dominant Agile process, used by 84% of all organizations claiming to be agile. However, Martin Fowler calls Scrum “flaccid.” Worse, Jeff Sutherland, the codeveloper of Scrum with Ken Schwaber, measures that less than 50% of all organizations using Scrum are actually using iterative, incremental development. As Scrum spread, its founders expected the developers who had been disabled by waterfall would come back to life as excellent, well-tooled developers. The expectation was naive, given the rot that waterfall caused over the last twenty years.
    To address this problem, Scrum.org partnered with Zuehlke and others to create as “immersion” course to revitalize the developers. The Professional Scrum Developer (PSD) course is a novel five-day course that teaches a cross-functional development team to be able to develop an increment of potentially shippable product within an iteration, or Sprint, on a Scrum Project using Java, .NET and other technology stacks.
    Ken Schwaber from Scrum.org.will discuss this program and how it is constructed during this session. They will also discuss the progress to date in delivering these courses, and the next steps in the rollout.

     

  • v3_jazoon_subt_black_web

    Tomorrow I will be tweeting from the international industry conference on Java technology

    Jazoon is an international industry conference on Java technology in Zurich. It addresses software developers and architects, IT decision-makers and consultants throughout Europe and around the world. Jazoon gives Java experts a platform in the heart of Europe where they share their ideas and experiences.
    From 1 to 3 June 2010, Zurich will be the meeting place for the international Java community. By presenting a comprehensive conference program and creating a communicative atmosphere, Jazoon helps personal contacts grow and transcend technical, geographical and cultural boundaries. A supplementary program including an exhibition of solutions, tools and continuing education as well as career opportunities and various networking events ensure added benefits for every target group.

    I am planning to attend the following conferences:

    Tuesday, 1 June 201

    9:30-10:30
    Java SE and JavaFX: The Road Ahead
    - Danny Coward

    11:00-11:50
    Pattern Driven Security Design, for Web Tier
    - Manish Kumar Maheshwar

    12:00-12:50
    Web Frameworks and how they kill traditional security scanning
    - Christian Hang
    - Lars Andren

    14:00-14:50
    Practical Dynamic Modules (OSGi) Security -- Protecting More Than Just Data
    - David Smith
    - James Gould

    15:00-15:50
    Construction Techniques for Domain Specific Languages
    - Neal Ford

    16:30-17:20
    If You Know JSF, You Know Portals and Portlets
    - Wesley Hales

    17:40-18:30
    97 Things Every Programmer Should Know
    - Kevlin Henney

    Thursday, 3 June 2010

    9:00-10:00
    The Gaia satellite and Data Processing
    - William O'Mullane

    10:30-11:20
    Essentials of Testing: The Tools You Need to Know
    - Bettina Polasek
    - Marco Cicolini

    11:30-12:20
    Spring 3.0 - Themes and Trends
    - Jürgen Höller

    13:30-14:20
    Conversational Web Applications with Spring
    - Micha Kiener
    - Jürgen Höller

    14:30-15:20
    Spring ROO - A New Level of Enterprise Java Productivity
    - Eberhard Wolff

    16:00-16:20
    Real Java EE testing with Arquillian
    - Aslak Knutsen
    - Dan Allen

    16:00-16:50
    Powerful Portals with JSF
    - Andy Bosch

    17:10-18:10
    Software in the service of handicapped people: Research & Development at Otto Bock
    - Hans-Willem van Vliet


  • Java Platform, Standard Edition 6 is a major feature release. Significant features and enhancements in Java SE 6 since the prior major release, J2SE 5.0 are all listed on that page.

    You can download the Release Candidate HERE


  • Keyboard Shortcuts

    Files

    Control-NNew file.
    Control-OOpen file.
    Control-WClose buffer.
    Control-E Control-WClose all buffers.
    Control-SSave buffer.
    Control-E Control-SSave all buffers.
    Control-PPrint buffer.
    Control-Page UpGo to previous buffer.
    Control-Page DownGo to next buffer.
    Control-`Go to recent buffer.
    Control-QExit jEdit.

    Views

    Control-E Control-TTurn gutter (line numbering) on and off.
    Control-2Split view horizontally.
    Control-3Split view vertically.
    Control-1Unsplit.
    Alt-Page UpSend keyboard focus to previous text area.
    Alt-Page DownSend keyboard focus to next text area.
    Control-E Control-Up; Control-Left; Control-Down; Control-RightSend keyboard focus to top; bottom; left; right docking area.
    Control-E Control-`Close currently focused docking area.
    Control-E Control-ESend keyboard focus back to current text area.

    Repeating

    Control-EnternumbercommandRepeat the command (it can be a keystroke, menu item selection or tool bar click) the specified number of times.

    Moving the Caret

    ArrowMove caret one character or line.
    Control-ArrowMove caret one word or paragraph.
    Page Up; Page DownMove caret one screenful.
    HomeFirst non-whitespace character of line, beginning of line, first visible line (repeated presses).
    EndLast non-whitespace character of line, end of line, last visible line (repeated presses).
    Control-HomeBeginning of buffer.
    Control-EndEnd of buffer.
    Control-]Go to matching bracket.
    Control-E Control-[; Control-]Go to previous; next bracket.
    Control-LGo to line.

    Selecting Text

    Shift-ArrowExtend selection by one character or line.
    Control-Shift-ArrowExtend selection by one word or paragraph.
    Shift-Page Up; Shift-Page DownExtend selection by one screenful.
    Shift-HomeExtend selection to first non-whitespace character of line, beginning of line, first visible line (repeated presses).
    Shift-EndExtend selection to last non-whitespace character of line, end of line, last visible line (repeated presses).
    Control-Shift-HomeExtend selection to beginning of buffer.
    Control-Shift-EndExtend selection to end of buffer.
    Control-[Select code block.
    Control-E W; L; PSelect word; line; paragraph.
    Control-E Control-LSelect line range.
    Control-\Switch between single and multiple selection mode.

    Scrolling

    Control-E Control-JCenter current line on screen.
    Control-E Control-ICenter caret on screen.
    Control-'; Control-/Scroll up; down one line.
    Alt-'; Alt-/Scroll up; down one page.

    Text Editing

    Control-ZUndo.
    Control-E Control-ZRedo.
    Backspace; DeleteDelete character before; after caret.
    Control-Backspace; Control-DeleteDelete word before; after caret.
    Control-D; Control-E DDelete line; paragraph.
    Control-Shift-Backspace; Control-Shift-DeleteDelete from caret to beginning; end of line.
    Control-E RRemove trailing whitespace from the current line (or all selected lines).
    Control-JJoin lines.
    Control-BComplete word.
    Control-E FFormat paragraph (or selection).

    Clipboard and Registers

    Control-X or Shift-DeleteCut selected text to clipboard.
    Control-C or Control-InsertCopy selected text to clipboard.
    Control-E Control-UAppend selected text to clipboard, removing it from the buffer.
    Control-E Control-AAppend selected text to clipboard, leaving it in the buffer.
    Control-V or Shift-InsertPaste clipboard contents.
    Control-E Control-PVertical paste clipboard contents.
    Control-R Control-X keyCut selected text to register key.
    Control-R Control-C keyCopy selected text to register key.
    Control-R Control-U keyAppend selected text to register key, removing it from the buffer.
    Control-R Control-A keyAppend selected text to register key, leaving it in the buffer.
    Control-R Control-V keyPaste contents of register key.
    Control-R Control-P keyVertically paste contents of register key.
    Control-E Control-VPaste previous.

    Markers

    Control-E Control-MIf current line doesn't contain a marker, one will be added. Otherwise, the existing marker will be removed. Use the Markers menu to return to markers added in this manner.
    Control-T keyAdd marker with shortcut key.
    Control-Y keyGo to marker with shortcut key.
    Control-U keySelect to marker with shortcut key.
    Control-K keyGo to marker with shortcut key, and move the marker to the previous caret position.
    Control-E Control-,; Control-.Move caret to previous; next marker.

    Search and Replace

    Control-FOpen search and replace dialog box.
    Control-GFind next.
    Control-HFind previous.
    Control-E Control-BSearch in open buffers.
    Control-E Control-DSearch in directory.
    Control-E Control-RReplace in selection.
    Control-E Control-GReplace in selection and find next.
    Control-,Incremental search.
    Control-.Quick HyperSearch.
    Alt-,Incremental search for word under the caret.
    Alt-.Quick HyperSearch for word under the caret.

    Source Code Editing

    Control-;Expand abbreviation.
    Alt-Left; Alt-RightShift current line (or all selected lines) left; right.
    Shift-Tab; TabShift selected lines left; right. Note that pressing Tab with no selection active will insert a tab character at the caret position.
    Control-IIndent current line (or all selected lines).
    Control-E Control-CWing comment selection.
    Control-E Control-BBox comment selection.

    Folding and Narrowing

    Alt-BackspaceCollapse fold containing caret.
    Alt-EnterExpand fold containing caret one level only.
    Alt-Shift-EnterExpand fold containing caret fully.
    Control-E XExpand all folds.
    Control-E AAdd explicit fold.
    Control-E SSelect fold.
    Control-E Enter keyExpand folds with level less than key, collapse all others.
    Control-E N NNarrow to fold.
    Control-E N SNarrow to selection.
    Alt-Up Alt-DownMoves caret to previous; next fold.
    Control-E UMoves caret to the fold containing the one at the caret position.

    Macros

    Control-M Control-RRecord macro.
    Control-M Control-MRecord temporary macro.
    Control-M Control-SStop recording.
    Control-M Control-PRun temporary macro.
    Control-M Control-LRun most recently played or recorded macro.

    Alternative Shortcuts

    A few frequently-used commands have alternative shortcuts intended to help you keep your hands from moving all over the keyboard.

    Alt-J; Alt-LMove caret to previous, next character.
    Alt-I; Alt-KMove caret up, down one line.
    Alt-Q; Alt-AMove caret up, down one screenful.
    Alt-ZFirst non-whitespace character of line, beginning of line, first visible line (repeated presses).
    Alt-XLast non-whitespace character of line, end of line, last visible line (repeated presses).

    Glob Patterns

    jEdit uses glob patterns similar to those in the various Unix shells to implement file name filters in the file system browser. Glob patterns resemble regular expressions somewhat, but have a much simpler syntax. The following character sequences have special meaning within a glob pattern:

    • ? matches any one character
    • * matches any number of characters
    • {!glob} Matches anything that does not match glob
    • {a,b,c} matches any one of a, b or c
    • [abc] matches any character in the set a, b or c
    • [^abc] matches any character not in the set a, b or c
    • [a-z] matches any character in the range a to z, inclusive. A leading or trailing dash will be interpreted literally

    In addition to the above, a number of "character class expressions" may be used as well:

    • [[:alnum:]] matches any alphanumeric character
    • [[:alpha:]] matches any alphabetical character
    • [[:blank:]] matches a space or horizontal tab
    • [[:cntrl:]] matches a control character
    • [[:digit:]] matches a decimal digit
    • [[:graph:]] matches a non-space, non-control character
    • [[:lower:]] matches a lowercase letter
    • [[:print:]] same as [:graph:], but also space and tab
    • [[:punct:]] matches a punctuation character
    • [[:space:]] matches any whitespace character, including newlines
    • [[:upper:]] matches an uppercase letter
    • [[:xdigit:]] matches a valid hexadecimal digit

    Here are some examples of glob patterns:

    • * - all files
    • *.java - all files whose names end with ".java"
    • *.{c,h} - all files whose names end with either ".c" or ".h"
    • *[^~] - all files whose names do not end with "~"

     Regular Expressions

    jEdit uses regular expressions to implement inexact search and replace. A regular expression consists of a string where some characters are given special meaning with regard to pattern matching.

    Within a regular expression, the following characters have special meaning:

    Positional Operators

    • ^ matches at the beginning of a line
    • $ matches at the end of a line
    • \b matches at a word break
    • \B matches at a non-word break
    • \< matches at the start of a word
    • \> matches at the end of a word

    One-Character Operators

    • . matches any single character
    • \d matches any decimal digit
    • \D matches any non-digit
    • \n matches the newline character
    • \s matches any whitespace character
    • \S matches any non-whitespace character
    • \t matches a horizontal tab character
    • \w matches any word (alphanumeric) character
    • \W matches any non-word (alphanumeric) character
    • \\ matches the backslash ("\") character

    Character Class Operator

    • [abc] matches any character in the set a, b or c
    • [^abc] matches any character not in the set a, b or c
    • [a-z] matches any character in the range a to z, inclusive. A leading or trailing dash will be interpreted literally
    • [[:alnum:]] matches any alphanumeric character
    • [[:alpha:]] matches any alphabetical character
    • [[:blank:]] matches a space or horizontal tab
    • [[:cntrl:]] matches a control character
    • [[:digit:]] matches a decimal digit
    • [[:graph:]] matches a non-space, non-control character
    • [[:lower:]] matches a lowercase letter
    • [[:print:]] same as [:graph:], but also space and tab
    • [[:punct:]] matches a punctuation character
    • [[:space:]] matches any whitespace character, including newlines
    • [[:upper:]] matches an uppercase letter
    • [[:xdigit:]] matches a valid hexadecimal digit

    Subexpressions and Backreferences

    • (abc) matches whatever the expression abc would match, and saves it as a subexpression. Also used for grouping
    • (?:...) pure grouping operator, does not save contents
    • (?#...) embedded comment, ignored by engine
    • (?=...) positive lookahead; the regular expression will match if the text in the brackets matches, but that text will not be considered part of the match
    • (?!...) negative lookahead; the regular expression will match if the text in the brackets does not match, and that text will not be considered part of the match
    • \n where 0 < n < 10, matches the same thing the nth subexpression matched. Can only be used in the search string
    • $n where 0 < n < 10, substituted with the text matched by the nth subexpression. Can only be used in the replacement string

    Branching (Alternation) Operator

    • a|b matches whatever the expression a would match, or whatever the expression b would match.

    Repeating Operators

    These symbols operate on the previous atomic expression.

    • ? matches the preceding expression or the null string
    • * matches the null string or any number of repetitions of the preceding expression
    • + matches one or more repetitions of the preceding expression
    • {m} matches exactly m repetitions of the one-character expression
    • {m,n} matches between m and n repetitions of the preceding expression, inclusive
    • {m,} matches m or more repetitions of the preceding expression

    Stingy (Minimal) Matching

    If a repeating operator (above) is immediately followed by a ?, the repeating operator will stop at the smallest number of repetitions that can complete the rest of the match.

  • Maybe You do not know or have ever heard that there can be an alternative to notepad, wordpad, textedit, ultraedit, textpad...and the list of text editor can be very long. I am using JEDIT since 4 years now and will never give it back. It is one of these Java application which demonstrate the portability and quality of Java software. (Mac OS X, OS/2, Unix/Linux, VMS and Windows)
    Open source, GNU General Public License, 7 years of development: jEdit is a mature and well-designed multi purpose text editor.  Feature list here

  • jira.waltercedric.comI did update my bug tracker to the latest release of JIRA

    Press release

    “ The Atlassian JIRA team is delighted to present a brand new version of one of the world's favourite issue-trackers.

    We have improved the UI to provide contextual awareness, improving the navigation and usability with features like activity streams and issue history. We have also added the most powerful searching capabilities ever seen in a bug tracker, called JIRA Query Language (JQL). The simple auto-complete entry system makes it incredibly easy for any user to create sophisticated queries.

    We have completely overhauled the JIRA dashboards to make it quick and easy for anyone to create and add gadgets, move them around using drag & drop, and share dashboards with other team members. Using the new Plugins 2.0 architecture, we built new dashboards using OpenSocial. This means each JIRA dashboard is an OpenSocial container allowing you to consume any OpenSocial compliant gadgets from either Atlassian tools or other external sources. Conversely, JIRA gadgets can be exposed in any OpenSocial container (like iGoogle, and soon, Confluence).”

    &160;

    JIRA 4.0 - Standalone (TAR.GZ Archive)
    55.8 MB • Released 06-Oct-2009 (Release notes | Upgrade notes)&160;

    A small update how to is following

    Small JIRA update How to

    I’ve made a small script to automate JIRA update as it required most of the time repetitive steps

    Update Script

    Usage

    ./update.sh 3.13.3 4.0 /home/jira jiradb

    Code

    update.sh script

    #!/bin/sh

    old=$1
    new=$2
    jirahome=$3
    db_name=$4

    cd $jirahome

    echo Stopping old instance
    ./atlassian-jira-enterprise-$old-standalone/bin/shutdown.sh

    echo dumping old database version
    mysqldump --opt $db_name > $db_name.sql

    echo Retrieving latest version
    wget
    http://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-enterprise-$new-standalone.tar.gz

    echo Copy old customization. db, port and ajp from server.xml
    cp $jirahome/atlassian-jira-enterprise-$new-standalone/conf/server.xml $jirahome/atlassian-jira-enterprise-$new-standalone/conf/server.xml.ori
    cp $jirahome/atlassian-jira-enterprise-$old-standalone/conf/server.xml $jirahome/atlassian-jira-enterprise-$new-standalone/conf/server.xml

    echo Copy database settings
    cp $jirahome/atlassian-jira-enterprise-$old-standalone/atlassian-jira/WEB-INF/classes/entityengine.xml $jirahome/atlassian-jira-enterprise-$new-standalone/atlassian-jira/WEB-INF/classes/entityengine.xml

    echo Copy mysql library
    cp $jirahome/atlassian-jira-enterprise-$old-standalone/common/lib/mysql-*.jar $jirahome/atlassian-jira-enterprise-$new-standalone/common/lib/mysql-*.jar

    echo edit manually and set jira.home
    echo edit ./atlassian-jira-enterprise-$new-standalone/atlassian-jira/WEB-INF/classes/jira-application.properties

    Note that you will have to update the DB schema manually

  • joomla_cms

    logo_virtuemart

    As some users have encounter issues with VirtueMart 1.1.3 as no captcha is displayed as default, here is a small how to. The features is a bit hidden, but it works as expected.


    Go to yoursite/administrator/index.php?pshop_mode=admin&page=admin.user_field_list&option=com_virtuemart

     

     virtuemart.securityimages

    Add a new field! (Add / Edit User Fields)

     virtuemart.securityimages.2
    Result, layout can be optimized a bit I agree

     virtuemart.securityimages.3

    Read more in the Official Documentation of SecurityImages

  • As always updating to the latest version of all your developement components is never without any issues, here is what  you need to take into consideration when upgrading Joomla 3.8.7 and WinNMP 18.03

    Install WinNMp 18.03 from https://winnmp.wtriple.com/ in any directory, default is C:\WinNMP\

    Unpack Joomla 3.8.7 to C:\WinNMP\WWW\dev for example

    When starting WinNMP, you can click reload, to see the site appearing

     

     Now edit Nginx virtual server

     

     And cut and paste the following config (you can get it from Joomla-Nginx-configuration">http://winnmp.wtriple.com/nginx.phpJoomla-Nginx-configuration)

     

    You can now install Joomla like you are used to, by opening a browser and pointing to http://dev.test

    After the installation you'll notice that the administrator area is broken, some CSS/Javascript can not be located (Http 404). To solve this, open with your favorite text editor joomla! configuration.php and set the live site property (was in Joomla 1.5, then removed then it appear again)

     

     Now the administrator area should work again... but you can not install any Joomla! extensions, because open_basedir = "c:/winnmp" and do not contains the temporary directory, you can safely deactivate it for development, but NOT on ANY production server.

    ;open_basedir = "c:/winnmp"

     Last but not least, php_uname is used by Joomla, activate it in php.ini to remove some warnings

     

     

     

     

  • In this series of post I will outline some common techniques to help Joomla extensions development.

    As you know Joomla is shipped with Mootools library which assign $ also to Ajax. Here is 2 tips that will allow you to use jQuery scripts without any modifications (most of the time you will find tips to assign jQuery to something else than $ and rewrite your scripts)

    First it is recommended to include always mootools first to avoid jQuery conflict issues

    JHTML::_('behavior.mootools');
    $document = JFactory::getDocument();
    $document->addScript(JURI::root() . "media/com_cedtag/js/jquery.1.7.2.min.js");

    then to run jQuery in noConflict mode. Note that here I do not assign jQuery to any alias.

    $document->addScriptDeclaration("jQuery.noConflict();");

    Till here, this is what you will find on all Joomla forums, posts over the internet. The last tips is what make the difference!

    Instead of using a different alias for the jQuery object (when using noConflict), you can write your jQuery code by wrapping it all in a closure. This can be done in the document.ready function

    $script = "jQuery(function($) { $();

    });"; $document->addScriptDeclaration($script);

    This way you are not force to rewrite your scripts to use another alias (replacing $ with jquery alias for example in all your scripts). This make inclusion of jQuery really easy!

    Happy Coding!

  • joomla_cms

    jocomment I did install yesterday evening the latest version of !JoomlaComment

    !JoomlaComment is one of the first extensions for Joomla,that let you comment under articles.

    The !JoomlaComment system can be installed on any joomla website within seconds! Make
    your website more interactive!

    Main Features:

    • ajax-based
    • captcha protection
    • akismet support
    • ubb code support
    • threathed/nested comments
    • multilanguage support
    • mail, website input
    • See more features here

    Joomla support templates, depending on which templates you use

    • MTdefault-emotop, these templates MTxxxx use mootols 1.11
    • JQdefaut-emotop, these templates JQxxxx use Jquery
    • ..

    You may behind the scene include another additional AJAX library in Joomla!® frontend, this lead to performance issues:

    If !JoomlaComment use JQuery 1.1.4 and not the AJAX library of Joomla!, aka Mootools 1.11. Another huge JavaScript files that make my server busier!

    Since any static files can be offloaded to another server to gain more speed. For example, any static images, JavaScript or CSS files can be moved to a different server for more speed.

    In order to be able to offload this JavaScript library to Google code, you’ll have to do the following:

    In the template you are using, for example in components/com_comment/joscomment/templates/JQdefault-emotop/index.html

    Search for

    {library}
    <script type="text/javascript" src="components/com_comment/joscomment/jscripts/jquery-1.1.4.pack.js"></script>
    <script>jQuery.noConflict();</script>
    {/library}

    and replace with

    {library}
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> 
    <script>jQuery.noConflict();</script>
    {/library}

    Note that I use here the latest JQuery version (1.3.2) and not the default version of !joomlaComment (1.1.4), here is why

    • This version 1.1.4 is not available at jquery">http://code.google.com/apis/ajaxlibs/documentation/jquery :-)
    • I did test the frontend of !JoomlaComment 4.0 with JQuery 1.3.2 and it work great
  • apache_maven

    It is not unusual in a project to have a huge number of third party artifacts and Plug-in. Apache Maven help you keep track of them, along with their transitive dependencies.

    But how do you know when a new version of an artifact is available?  This is where the Maven Versions plug-in come hand in.

    The Versions Plug-in is used when you want to manage the versions of artifacts in a project's POM.

    By running

    mvn versions:display-dependency-updates

    in any Apache Maven project or modules, you’ll get for example (we have a lot of 25 Maven modules, here is only one presented as an example, the list being too long)

    [INFO] --------------------------------------------------------------------------------------------------
    [INFO] Building Unnamed - com.innoveo:skye-services-api:jar:2.2.0-M-06
    [INFO] --------------------------------------------------------------------------------------------------
    [INFO]
    [INFO] The following dependencies in Dependency Management have newer versions:
    [INFO]   junit:junit............................................. 4.4 -> 4.8.1
    [INFO]   log4j:log4j......................................... 1.2.15 -> 1.2.16
    [INFO]   org.springframework:spring...................... 2.5.6 -> 2.5.6.SEC02
    [INFO]   org.springframework:spring-test............... 2.5.6 -> 3.0.4.RELEASE

    Attention:

    It is not always an easy task to update some core components or 3rd party libraries in a complex software, as it may introduce some regressions, incompatibilities..

    At least thanks to this Versions plug in, you are aware that they may be something newer to try. What this plug in do not report is why you may want to update some artifacts libraries:

    • Do I have to use the latest version x.y.z because of  security issues?
    • Will i get more performances by updating to x.y.z?
    • New Version x.y.z resolve bug xxxx, will I have other annoying issues?

    In all the above case, you are on your own, but this is not the scope of this plug in. You’ll have anyway to

    1. Carefully decide which library can be updated,
    2. Match it to your software roadmap,
    3. Have enough confidence in your test suite (unit test, BDD, integration tests) and testing team,
    4. Communicate with your customer (for security issues in 3rd party library)
    5. .. and the list goes on

    The Versions Plug-in has a lot of interesting goals.

    Some are also updating values across all pom.xml for you.

    • versions:update-parent updates the parent section of a project so that it references the newest available version. For example, if you use a corporate root POM, this goal can be helpful if you need to ensure you are using the latest version of the corporate root POM.
    • versions:update-properties updates properties defined in a project so that they correspond to the latest available version of specific dependencies. This can be useful if a suite of dependencies must all be locked to one version.
    • versions:update-child-modules updates the parent section of the child modules of a project so the version matches the version of the current project. For example, if you have an aggregator pom that is also the parent for the projects that it aggregates and the children and parent versions get out of sync, this mojo can help fix the versions of the child modules. (Note you may need to invoke Maven with the -N option in order to run this goal if your project is broken so badly that it cannot build because of the version mis-match).
    • versions:lock-snapshots searches the pom for all -SNAPSHOT versions and replaces them with the current timestamp version of that -SNAPSHOT, e.g. -20090327.172306-4
    • versions:unlock-snapshots searches the pom for all timestamp locked snapshot versions and replaces them with -SNAPSHOT.
    • versions:resolve-ranges finds dependencies using version ranges and resolves the range to the specific version being used.
    • versions:set can be used to set the project version from the command line.
    • versions:use-releases searches the pom for all -SNAPSHOT versions which have been released and replaces them with the corresponding release version.
    • versions:use-next-releases searches the pom for all non-SNAPSHOT versions which have been a newer release and replaces them with the next release version.
    • versions:use-latest-releases searches the pom for all non-SNAPSHOT versions which have been a newer release and replaces them with the latest release version.
    • versions:use-next-snapshots searches the pom for all non-SNAPSHOT versions which have been a newer -SNAPSHOT version and replaces them with the next -SNAPSHOT version.
    • versions:use-latest-snapshots searches the pom for all non-SNAPSHOT versions which have been a newer -SNAPSHOT version and replaces them with the latest -SNAPSHOT version.
    • versions:use-next-versions searches the pom for all versions which have been a newer version and replaces them with the next version.
    • versions:use-latest-versions searches the pom for all versions which have been a newer version and replaces them with the latest version.
    • versions:commit removes the pom.xml.versionsBackup files. Forms one half of the built-in "Poor Man's SCM".
    • versions:revert restores the pom.xml files from the pom.xml.versionsBackup files. Forms one half of the built-in "Poor Man's SCM".

    The easiest way to live dangerously is to try to update all 3rd parties in one shot by issuing

    mvn versions:use-latest-versions

    but that’s another story :-)

  • sony_playstation_ps3

    How do I know if this is the right laser? I get this question a lot of time in my tutorial: Change your PS3 optical lens

    You could see how the disc goes in the drive. this method offer no guarantees, and may lead to false results

    • If the disc goes in straight then its a kes-400a . 
    • If the disc spins and you insert it then its the kes-410aca.

    Before ordering your new lens, the best is always to open your console! and see it yourself


    KES-410ACA / KEM-410ACA

    KES-410ACA or KEM-410ACA 

    KES-400a

    sony.ps3.optical.lens.kes-400a

    Here is also a table (no guarantees, opening is always better)

    Hard Drive Capacity 80GB 60GB 40GB 20GB
    Model Number CECHE01 CECHA01 CECHG01 CECHB01
    USB Ports 4 4 2 4
    Release Date August 2007 November 2006 November 2007 November 2006

    Kes-400A/ AAA

    Yes Yes Yes Yes
  • http://www.securitypatterns.org/index.html
  • checklist

    An exploited or hacked server is one that is no longer fully under your control and someone else is now partially using your server for their own purposes.

    You’ll find in this mind map

    What bad guys can do and remedies

    Why a mind map?

    A mind map is a diagram used to visually outline information. mind map help you take notes, brainstorm complex problems, and think creatively.

    • Information are summarized efficiently to be usable and accessible,
    • Inter-relationships are clear between the different concepts,
    • It is the most flexible for organizing associative, divergent and convergent thinking (Convergent thinking involves aiming for a single, correct solution to a problem, whereas divergent thinking involves creative generation of multiple answers to a set problem),

    You can find the latest version at

    http://linux-compromised-server-checks.waltercedric.com/

  • I did create this mind map a while ago, and found it while going through my dropbox folders. Linux server Monitoring “You can't correct something you can't measure” is in version v 1.0.0

    You’ll find in this mind map

    What to monitor, how and the most useful commands to detect what happening on your Linux server.

    Why a mind map?

    A mind map is a diagram used to visually outline information. mind map help you take notes, brainstorm complex problems, and think creatively.

    • Information are summarized efficiently to be usable and accessible,
    • Inter-relationships are clear between the different concepts,
    • It is the most flexible for organizing associative, divergent and convergent thinking (Convergent thinking involves aiming for a single, correct solution to a problem, whereas divergent thinking involves creative generation of multiple answers to a set problem),

    &160;

    map

    Latest version at

    You may also like my now 4 years old&160; Joomla “Secure, Safe, Fast Linux Hosting” mind map at http://joomla-security.waltercedric.com/

    All mind map were created with http://freemind.sourceforge.net

  • I use to make mind map to organize my ideas, or to organize huge amount of data in a tree manner. Maintaining your own root server is time consuming, to say the least,  but it will also force you to put your energy in areas where there is a lot of new things to learn. Here I present you a mind map  that contains most of the tools and ideas of what you should monitor on a Linux server.

     

    This mind map is an ongoing work, that is why it has also a version number in it (v1.0.0). As soon as I will learn new tricks, the mind map will be updated. Your feedback is always welcomed!

    LinuxWhatToMonitor

    By clicking read more, You'll be able to go through the checklist as text, or download the mind map as a PDF (600kB)

    • Why
      • its critical to know what is going on
      • take preventive action
      • perform maintenance upfront
    • What to monitor
      • CPU utilization
      • Server RAM
      • Bandwidth usage
      • Disk space usage
      • Physical temperature
      • Logs files
    • Useful Bash Commands
      • top
        • Top will show you memory usage, number of users logged in, load averages, CPU consumption, total uptime, virtual memory, and how long each process has been running.

          htop - htop is an enhanced version of top, the interactive process viewer, which can display the list of processes in a tree form.

      • ps aux
        • list of every process running, the user running it, and even what action it is taking
      • vmstat
        • vmstat - System Activity, Hardware and System Information
        • vmstat 3
          • return information about processes, memory, paging, block IO, traps, and cpu activity.
        • vmstat -m
          • Display Memory Utilization
      • w
        • who is logged in  and what they are doing
      • uptime
        • return how long the system is running
      • ps
        • Display all processes running
        • ps axjf
        • ps -p pid  -o comm=
          • display the process name with pid = pid
        • ps -auxf | sort -nr -k 4 | head -10
          • return the 10 most consuming memory processes
        • ps -auxf | sort -nr -k 3 | head -10
          • return the 10 most consuming cpu processes
      • free
        • displays the total amount of free and used physical and swap memory
      • iostat
        • display Central Processing Unit (CPU) statistics and input/output statistics for devices, partitions and network filesystems (NFS)

      • mpstat
        • Displays activities for each available processor, processor 0 being the first one
        • mpstat -P ALL
      • proc
        • cat /proc/cpuinfo

          cat /proc/meminfo

          cat /proc/zoneinfo

          cat /proc/mounts

      • lsof
        • list open files, network connections and much more
    • Bandwidth usage
      • Webalizer
    • Tools
      • Nagios
        • Nagios is a popular open source computer system and network monitoring application software. You can easily monitor all your hosts, network equipment and services.

      • delayed
        • Munin
          • Easy monitoring your Linux server from web browser
            Munin creates graphs for just about everything going on in your system

            run every 5 minutes

        • online services
    • Login
      • check for empty user password

        • awk -F: '($2 == "") {print}' /etc/shadow

        Lock an account

        • passwd -l accountName

        Only root have uid = 0

        check account that may act like root

        • awk -F: '($3 == "0") {print}' /etc/passwd
    • Services
      • List all services that

        are autostarted at boot time

        • apt-get install chkconfig

          chkconfig --list | grep '3:on'

        Stop unwanted services

        • service serviceName stop
    • Network
      • list all open ports and associated programs
        • netstat -tulpn
        • nmap -sT -O localhost
    • Files system
      • Find world writable files
        • find / -xdev -type d \( -perm -0002 -a ! -perm -1000 \) -print
      • find files with no owner
        • find / -xdev \( -nouser -o -nogroup \) -print
    • Log Files
      • Login attempts
        • /var/log/auth

          fail or success

          If too much failed attempts in log file

          -> may be hacker brute forcing login

          • block with IPTable

            block with fail2ban

            apt-get install fail2ban

      • Interesting log files
          • /var/log/kern.log: Kernel logs
          • /var/log/message: General message
          • /var/log/auth.log: Authentification logs
          • /var/log/mysqld.log: MySQL database server log file
          • /var/log/cron.log: Cronjob logs
          • /var/log/qmail/ : Qmail log directory
          • /var/log/maillog: Mail server logs
          • /var/log/httpd/ or  /var/log/apache2/:   Apache
          • /var/log/boot.log : System boot log
          • /var/log/secure: Authentication log
  • apache_maven

    The Maven Dependency Plugin among other things include a dependency:analyze-duplicate

    The dependency plugin provides the capability to manipulate artifacts. It can copy and/or unpack artifacts from local or remote repositories to a specified location.

    This Apache Maven plugin is really feature rich and provide a lot of interesting goals:

  • I am using Mambo now since august 2003 together with a mysql database (the most popular open source database). Right now I am doing backup on a weekly basis manually using the plesk panel of my provider. I found this article interesting even if it does not resolve my problem of backup.  As soon as I find something interesting, I will publish it (plesk script, CGI tool...). Back to the article, it is in fact more an example of database replication for an enterprise:

    One of the difficulties with a large and active MySQL database is making clean backups without having to bring the server down. Otherwise, a backup may slow down the system and there may be inconsistency with data, since related tables may be changed while another is being backed up. Taking the server down will ensure consistency of data, but it means interruption of service to users. Sometimes this is necessary and unavoidable, but daily server outages for backing up data may be unacceptable. A simple alternative method to ensure reliable backups without having to shut down the server daily is to set up replication for MySQL. Read more HERE at onLamp.com the open source web plattform of O'Reilly

  • logo_virtualized_vmware_s

    My idea is to be able to run my production server (STRATO- OpenSuse) hosting www.waltercedric.com&160; in a VMWARE instance. So I can test and make change to the operating first there before bringing down my host for several hours ;-)

    I would like to duplicate the whole LINUX system (lets call it PROD for now), including data and make 2 VMWARE instance.. why two instances you may ask?

    1. One will be called DEV, and be very instable by definition, it is always a copy of the TEST instance, and will be use to try dirty system changes, that may never be deployed to TEST or PROD
    2. The instance named TEST will be by definition identical to the main server (or PROD). All changes made there has to be documented in small release notes so they can be applied to PROD.

    I am in the process of documenting everything, and I will&160; provide You the set of scripts to make the whole things works. (mainly a bash file that use RSYNC to keep your new server TEST up to date with the PROD), First step is to copy the server on the fly and luckily this is the purpose of this article!

    Solution 1: cloning with VMware vCenter Converter (if no raid, easiest)

    You’ll see later why but VMWARE vCenter Converter is not able to copy software raid /boot devices (what a shame)

    Install VMware vCenter Converter Standalone

    This software is free, all you have to do is register and download the software HERE

    You can install it like any other windows software, just follow the steps

    &160;vmware.vcenter.converter

    &160;vmware.vcenter.converter.1

    Note the default port or change them if you already have another services running on your PC (XAMPP, TeamCity, Bamboo etc…)

    Https Service port: 443
    Remote Converter clients connect to this port on the server and submit conversion tasks.

    HTTP Service port: 80
    Remote machines connect to the server through this port to download the converter client.

    Agent service Port: 9089
    Remote converter agents connect to this port to convert this machine.

    &160;vmware.vcenter.converter.2

    Authorize root access through SSH

    Even if this is considered highly unsecure, VMware vCenter Converter will require it. But temporary having a ssh root access open to the outside world is ok for the time taken to replicate through SSH all disks.

    # vi /etc/ssh/sshd_config

    and set

    PermitRootLogin yes

    Restart the SSH daemon by issuing the following command

    # /etc/init.d/sshd restart

    &160;

    Tell the converter to start replication of remote server

    vmware.vcenter.converter.3

    bang!

    checking that /boot is mounted on my server

    # mount –l
    ..
    /dev/md0 on /boot type ext2 (rw,acl,user_xattr) [/boot]
    ..

    The device /boot is mounted, I did Google for it and found that:

    Converter Standalone 4.0 does not recognize source volumes that reside on Linux Software RAID configurations

    During cloning of powered-on Linux machines, Converter Standalone does not recognize source volumes that are part of a Software RAID configuration (also referred to as multiple disk, or md, configurations).
    (If your question has been resolved please mark the answers as "Helpful" or "Correct".)

    That's because the /boot is on Software RAID which is not supported by Linux P2V: 58">http://www.vmware.com/support/converter/doc/releasenotes_conv40.html58

    I have a RAID1 array

    RAID 1 (mirrored settings/disks) duplicates data across every disk in the array, providing full redundancy. Two (or more) disks each store exactly the same data, at the same time, and at all times. Data is not lost as long as one disk survives. Total capacity of the array equals the capacity of the smallest disk in the array. At any given instant, the contents of each disk in the array are identical to that of every other disk in the array.

    Solution 2: cloning with VMware vCenter Converter (workaround for raid)

    If you still want to clone your server with VMware vCenter Converter and&160;

    • if /boot is the only important file system on Software RAID (/dev/md*), which is not my case :-()
    • You can plug an external non RAID USB disk into the server

    you could workaround this by:

    1. Back up the /boot files to /tmp (or some place with space),
    2. unmount /boot,
    3. Create a new volume (partition or LVM logical volume) on some available storage (might need to plug in a USB drive),
    4. Formatting it with ext3/ext4
    5. Mount it at /boot
    6. Copy all the /boot files over to there,
    7. Make backups of /etc/fstab and /boot/grub/menu.lst
    8. Change fstab and menu.lst to point to the new /boot file system.

    That should allow Converter to work. And you can revert this all very easily by restoring the backups of fstab and menu.lst, unmounting /boot, remounting the original /boot (/dev/md0).

    Solution 3: cloning with VMware vCenter Converter (awful workaround raid)

    Another solution would be to break the Software RAID mirroring, just temporary to make a snapshot, but that would also require me to boot the server –> not acceptable for me!

    Solution 4 cloning with clonesys

    clonesys is a Shell script that can be used to get an image of running Linux boxes.
    The image can then be burned on CD/DVD. This CD/DVD is bootable and can be used to restore the system as well as to install new similar boxes.
    clonesys *IS NOT* a backup tool: it should not be used to backup users data, it is more similar to other tools such as MkCdRec, Mondo Rescue, Timo's Rescue CD, etc...

    1. Get the latest version (wget) and unpack
    2. Configure config.ini and backup.ini
    3. Start ./clonesys.sh and wait
    4. ISO disc will be available in /tmp/clonesys/iso

    Create a new VMWARE machine and boot on the CD to create your new machine.

    Solution 5 cloning live system with Mondo

    Mondo is reliable. It backs up your GNU/Linux server or workstation to tape, CD-R, CD-RW, DVD-R[W], DVD+R[W], NFS or hard disk partition. In the event of catastrophic data loss, you will be able to restore all of your data [or as much as you want], from bare metal if necessary. Mondo is in use by Lockheed-Martin, Nortel Networks, Siemens, HP, IBM, NASA's JPL, the US Dept of Agriculture, dozens of smaller companies, and tens of thousands of users.

    Mondo&160;is comprehensive. Mondosupports LVM 1/2, RAID, ext2, ext3, ext4, JFS, XFS, ReiserFS, VFAT, and can support additional filesystems easily: just e-mail the mailing list with your request. It supports software raid as well as most hardware raid controllers. It supports adjustments in disk geometry, including migration from non-RAID to RAID. Mondoruns on all major Linux distributions (RedHat, RHEL, SuSE, SLES, Mandriva, Debian, Gentoo) and is getting better all the time. You may even use it to backup non-Linux partitions, such as NTFS.

    Mondois free! It has been published under the GPL v2 (GNU Public License), partly to expose it to thousands of potential beta-testers but mostly as a contribution to the Linux community.

    Its main advantages are in my case

    • It wont require any reboot,
    • It can create CD (.ISO with ISOLINUX) that can be later booted in VMWARE.

    If you want to come from a RAID 0,1,5 to a non RAID host setup, this article may help you.

    Solution 6: manual RSYNC or the “you’re on your own”

    Fallback to manual RSYNC of the server…quite tricky. This is what what VMware vCenter is doing in background when it works :-(

    1. Boot with Knoppix in mode 2 (terminal&160; only)
    2. Create partitions with fdisk (or the utility of your choice).
    3. Make file systems, run mkswap, etc.
    4. Mount partitions appropriately.
    5. Run something like: rsync -zav -e ssh oldhost:/ /mnt (FYI, I almost always botch the syntax the first try)
    6. Make changes as appropriate for new system (/etc/fstab, /etc/sysconfig/network and /etc/sysconfig/network-scripts/ifcfg-*, /etc/hosts, and so on).
    7. Run grub to install the boot loader
    8. Reboot. If it boots, do a quick check to make sure all the partitions are started, swap has been turned on, etc.

    I’ve made it once but was blocked at step 9 (because of grub 1 / OpenSuSE 9.3)

    &160;

    If you know any other method that dont require the server to be rebooted (no solutions with dd please as it make corrupted disk on running server)

  • First let's refresh some definitions...
    set user ID (SUID)

    The SUID permission causes a script to run as the user who is the owner of the script, rather than the user who started it. It is normally considered extremely bad practice to run a program in this way as it can pose many security problems.

    set group ID (SGID)

    The SGID permission causes a script to run with its group set to the group of the script, rather than the group of the user who started it. It is normally considered extremely bad practice to run a program in this way as it can pose many security problems.

    Latest versions of the Linux kernel will even prohibit the running of shell scripts that have SGID/SUID attribute set.

    Use of the SUID bit on binaries (to run with root privileges, aka &8221;setuid bit&8221;) MUST be limited to those shown in
    the following list:

    /bin/ping
    /bin/su
    /usr/bin/at
    /usr/bin/chage
    /usr/bin/chfn
    /usr/bin/chsh
    /usr/bin/crontab
    /usr/bin/gpasswd
    /usr/bin/newgrp
    /usr/bin/passwd


    The other binaries that were installed with the SUID bit set MUST have this bit removed. Administrators can still run
    these binaries normally, but they are not available for ordinary users. There are also a number of SGID files on the system that are needed, it may depending on the number of tools, or your distribution. Use Google and query the web for the right list ;-)

    Similarly, the SGID bit MUST NOT be used to give group &8221;root&8221; privileges to any binary.
    To generate a list of all SUID/SGID programs on the system simply run the following command:

    # find / -not -fstype ext3 -prune -o \ -type f \( -perm -4000 -o -perm -2000 \) \ -print


    Then, for each file in this list that is not one of the permitted SUID or SGID programs, run the command
    # chmod -s FILE

    to remove the SUID and SGID bits. When done, re-run the find command to verify that the list matches the
    permitted programs.

    I recommend you installing also FAF (File Anomaly Finder) on your server to check periodically for file with too much rights or privileges

  • 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 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)