This document summarizes the Woden decision making and development processes. It is expected that this document will be useful to
Apache Woden is an Open Source project and the development of Woden is therefore being conducted in an open fashion. This theme should be evident as you read through this guide of the Woden decision making and development processes. At a high level what Open development means is that the entire development process of Woden is open to the community. Nothing is kept behind closed doors and information is readily available via the Woden Web site, mailing list, and wiki. The key here is transparency. If you (that's right, YOU) think the Woden development team is not being transparent it is your right to identify in what way we are not being transparent and hold us accountable to The Apache Way.
Woden's status is currently available from a number of sources:
All project wide communication is done in the open. This is not to suggest that one-on-one conversations amoung Woden committers and contributors is not allowed. This type of conversation is extremely valuable to the project's development and is encouraged. However, when anything other than a trivial decision is to be made it must be done in the presence of the Woden community.
There are 3 methods of communicating openly with the Woden development team and community:
Woden follows a milestone develoment process. The key to milestone development is that there are a number of milestone defining criteria specified at the beginning of the milestone process. The milestone can only be declared once those milestone defining criteria are met. For example, in Woden M8 the priority 1 defining criteria are that Woden must pass all 'good' and 'bad' test cases in the WSDL 2.0 test suite.
Woden milestone plans are communicated through the woden-dev mailing list and posted to the Woden Web site. In addition, all plan items are recorded in Jira, Woden's bug tracking system.
The Woden milestone planning process is an Open process. Woden takes into account the needs of adopter, like Apache Axis2, when planning. Please communicate requirements via Jira and the woden-dev list.
All bugs and work items are stored in Jira. It is a Woden best practice to associate a Jira entry with every code change.
Woden uses Subversion (SVN) for source control and all Woden code is stored in the Woden SVN repository. See the "SVN Client Configuration" section at this link for action required to handle EOL characters in a platform-neutral way.
All code developed as part of Woden is licensed under the Apache Software License v2.0 (ASL v2.0). All Woden source files must include the Apache boilerplate at the top of the file:
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Woden Java coding conventions
Woden uses common Java coding conventions. The main reason Woden needs an agreed set of coding conventions is to avoid different auto-formatting results when using IDEs like Eclipse and IDEA. If different code formatting rules are applied to a file via auto-formatting, then reformatting changes may be made along with any functional changes. If both types of code change are committed to the repository at the same time, it can be difficult to identify the functional changes from a 'diff' of the file.
To avoid this problem, the Woden project has 2 rules about coding conventions:
Eclipse code formatter default settings
Use the default code formatting provided with Eclipse 3.3, with one exception - the max line length should be 100 instead of 80. A subset of the most notable conventions (i.e. the ones that have caused us the most auto-reformatting problems) are described below. (TODO - check if there's a way to export these settings).
To access these settings in Eclipse 3.3 navigate to menu Window->Preferences->Java->Code Style->Formatter.
Indentation
Tab Policy - 4 spaces (not Tab character).
Indentation - 4 spaces for each indent.
What to indent;
Braces
Opening brace '{' on the same line and closing brace '}' with same indentation as the statement the block applies to.
Example:
while(loop_condition) { if(some_condition) { ... } else if(other_condition) { ... } else { break; } ... }
New Lines
Keep 'else if' on one line.
Example:
} else if(other_condition) {
Line Wrapping
Max line length (wrap after) 100 chars.
Indentation for wrapped lines is 2 indents (e.g. 8 spaces).
Accessor method names
Use 'get' / 'set' prefix for public accessor methods (e.g. getNamespace(),
setNamepsace(URI)).
Use 'is' prefix for getters that return booleans (e.g. isValid()).
Comments
Do not auto-reformat existing comments, but note the max line convention above (100 chars).
Use Javadoc comments for all public/protected API class, method and field declarations. For example;
Use Javadoc comments for all public/protected implementation class, method and field declarations. For example;
When implementing or overriding API methods, use the @see tag to specify the relevant method. For example, for the implementation method org.apache.woden.internal.wsdl20.BindingImpl.getInterface() use:
For all private/package private declarations, where comments are required use non-Javadoc comments.
Woden defines an API and provides 2 implementations of it. One is based on the Document Object Model (DOM) and the other on the Axiom Object Model (OM).
The Woden build produces 3 binary jar files:
These jar files are packaged into 2 binary distributions (as zip and tar archives):
The Woden build also produces a source code distribution (zip and tar):
Woden has Ant and Maven build processes. The Ant build was created originally to produce the jar files and distribution archives. The Maven build was introduced later to integrate the Woden build process with other Apache projects that depend on Woden, like Axis2. We maintain both build processes so that developers can use the one they prefer. Note however, that the Maven build just produces the 3 jar files (it does not produce the distribution archives).
Ant uses a concept of targets to figure out what work to do when you want a certain task done, they are defined inside a build.xml which is in the root of our source directory. There are two main ways in which we run a target, from the command line or inside eclipse. If you want to use the command line you need to download and install Ant from their download site above, then you just use the command ant [targetname] to run a target called targetname. If you want to use Eclipse you need to make sure you have the Ant plug-in, which should come by default depending which package you downloaded, then to run a target you can use the "Run As" context menu on a build.xml file to run it as a "Ant Build" which will run the default ant task or as a "Ant Build..." to specify which target(s) you wish to run.
The top level ant targets we have and their uses are :-
These targets all use a common build directory to store their results in, its structure is :-
Maven uses a set of conventions to simplify the build and deployment process and uses a concept of goals to figure out what needs to be done. The layout of the project is defined in pom.xml files, each of which specifies one distribution. In Woden we have three main distributors so have four pom.xml files, one in the root source directory and one in each of the woden-api, woden-dom and woden-om sub directories. To use Maven you need to download it, then run one of the maven goals with mvn [goal]. If you run these from the Woden root directory the goal will be applied all three distributions.
The main goals you will use are :-
Woden's Maven build uses the following directory structure :-
There are 2 test suites for Woden. The Woden JUnit Test Suite provided with Woden tests the Woden API and functionality of the Woden framework (configuration, factory, reader, error handling, etc). The W3C WSDL 2.0 Test Suite tests Woden's compliance with the WSDL 2.0 Recommendation (i.e. its WSDL 2.0 spec compliance).
Both of these test suites should be run to test Woden thoroughly. It's not enough just to run the Woden JUnit tests, because while this suite will test some of the Woden framework implementation and that Woden implements all of its API, it will not perform a complete WSDL 2.0 functional test. That's the job of the W3C WSDL 2.0 Test suite. Both test suites must be run before committing code to the repository. Code contributions submitted by non-committers as JIRA patches should also be tested against both test suites.
The Woden JUnit test suite should test the entire Woden API. It should invoke every API method at least once. So for any additions or changes to the API, the Woden JUnit test suite must be updated accordingly. For any non-WSDL functionality added or changed in the Woden implementation(s), appropriate test cases should also be included in the JUnit test suite where appropriate.
(TODO - maybe split the JUnit test suite so that an API-only suite exists for use by projects that want to create their own implementation of the Woden API).
The Woden JUnit test cases must be written using the Woden API (i.e. the correct Woden programming model), unless it's absolutely necessary to exercise the implementation class methods directly for a given test case. This will ensure that the Woden development team can change the implementation at any point without major impact on the test suite. On several occassions in the past, we have had to do significant, time-consuming rework on the test suite to fix compile breaks introduced when the implementation changed, because Woden developers had used the implementation classes directly when writing test cases. Our initial reasons for this were "we know the code, so it's okay", but as we've learnt, getting Woden client code to work is not the same as keeping it working. We expect Woden users to use the API only, so our test suite should set the right example.
The W3C WSDL 2.0 Test Suite is complete for the 'good' WSDL test cases. It should now have WSDL test cases that provide full coverage of what is allowed by the WSDL 2.0 specification. The test suite does not yet fully cover the 'bad' WSDL test cases. That is, it does not yet have WSDL test cases for every assertion specified by the WSDL 2.0 specification. All of Woden's WSDL 2.0 functionality (i.e. handling good WSDL and detecting bad WSDL) must be tested against the W3C WSDL 2.0 Test Suite. If a new WSDL 2.0 test case is needed to test some WSLD 2.0 functionality in Woden, Woden developers should create the required test case and then contribute it as a patch to the W3C WSDL 2.0 CVS repository. The patch can be submitted via the W3C Bugzilla system (select the 'WSDL' category when creating a new bug report).
Woden JUnit Tests are located in the test/ directory which is structured to mirror the src/ directory for the parts of code tests are written for. There are two ways these can be run; either inside Eclipse or directly from Ant.
Inside Eclipse the JUnit test(s) can be run by selecting "JUnit Test" in the "Run As" context menu for one test, whole packages, or the entire test folder. Then the tests results with any error messages and stack traces will be displayed in the JUnit panel. You can also debug JUnit tests from inside Eclipse by selecting the "JUnit Test" from the "Debug As" context menu.
You can also run the JUnit tests using Ant from the command line or inside Eclipse as described in the building section above. The Ant script is the build.xml file in the Woden project's root directory. This script has three test targets which each run a particular subset of the Woden JUnit tests.
These Ant targets produce an HTML report of the tests results in the file build/test-results/(24 hour)_(minute)_(second)/junit-noframes.html.
W3C WSDL 2.0 Test Suite is a collection of WSDL 2.0 documents used to test that a WSDL 2.0 processor complies with the W3C WSDL 2.0 Recommendation. The processor must successfully process all of the documents in the test suite to demonstrate its compliance. Each WSDL document represents a test case for some aspect of the WSDL 2.0 spec. These include good test cases, containing valid WSDL which collectively demonstrate all of the types of WSDL 2.0 syntax permitted by the spec. They also include bad test cases, containing invalid WSDL which violates one of the WSDL 2.0 assertions defined in the spec. There should be at least one bad test case for each assertion, but the bad test suite is not yet complete. The Woden project will contribute further assertion test cases to the W3C as development of Woden's WSDL validation continues.
To demonstrate its spec-compliance, a WSDL 2.0 processor should correctly parse all good WSDL documents and should detect the correct assertion violation for all bad WSDL documents. The W3C WSDL 2.0 test framework can check that the processor complies in this way. The WSDL 2.0 processor simply needs to capture its results from processing the test suite in some XML formats that the W3C WSDL 2.0 test framework will evaluate against baseline XML results. It will then generate a compliance report based on this comparison.
The Woden code tree is setup to facilate using the W3C WSDL 2.0 test suite in this way. It uses ANT scripts to download the W3C WSDL 2.0 test suite (the good and bad WSDL documents), run Woden against this test suite and generate the Woden result files, then copy the result files to your local copy of the W3C project that contains the WSDL 2.0 test framework. This W3C project is a CVS project called 'desc', short for Description - more on this later. The last step is then to run an ANT script in the 'desc' project to evaluate Woden's results and generate the HTML reports which compare Woden's results to the W3C baseline.
The official versions of these compliance reports are published on the WSDL 2.0 Interop Dashboard, where the Component Model Test Results show the results for the good WSDL test suite and the Validation Test Results show the results for the bad WSDL test suite.
Here are the steps to run Woden against the W3C WSDL 2.0 Test suite:
Periodically the W3C WSDL 2.0 Interop Dashboard is republished, using the Woden result files in the ant-test/ directory in the Woden repository. Therefore, these files should be committed periodically to reflect the up-to-date Woden results. (these ant-test/ files include the test-suite-results.zip and validation-results.xml files mentioned above).
The Woden release process involves many steps and checks. To keep compliant with Apache process requirements of WS and incubator projects it is important that it is followed.
Some example mailing list posts for reference:
Apache Woden was started to answer the W3C WSDL working group's call for implementations. As such, Woden has been in close communication with the WSDL working group providing feedback on the WSDL 2.0 specification, requesting clarification, and contributing test cases to the WSDL 2.0 test suite.
WSDL 2.0 has been promoted to recommendation status and the WSDL working group has completed its work and therefore closed on June 29, 2007. With the working group closed it is expected that a maintenance group will be set up. Woden will maintain close ties with the maintenance group as there may still be issues with the WSDL 2.0 specification and the test suite still requires work.
Any issues with the WSDL 2.0 specification or test suite should be reported via the WSDL mailing list www-ws-desc@w3.org and issue tracking repository http://www.w3.org/Bugs/Public/.