summaryrefslogtreecommitdiffstats
path: root/site/trunk/site-publish/developing-sdo-java.html
blob: 6a768c89dddb110c1c6f79a823794e148b468a04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<!--

    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.
-->


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
    <HEAD>
		<!-- generateKeywords macro -->
	    <META name="description" content="Apache Tuscany">
        <META name="keywords" content="apache, apache tuscany, tuscany, service, services, fabric, soa, service oriented architecture,  sca, service component architecture, das, sdo, csa, ruby, opensource">
		<!-- generateKeywords macro end -->
		
        <LINK type="text/css" rel="stylesheet" href="http://tuscany.apache.org/stylesheets/default.css">
        <LINK rel="SHORTCUT ICON" href="https://cwiki.apache.org/confluence/display/TUSCANY/$images/favicon.ico">   
        <TITLE>Apache Tuscany : Developing SDO Java</TITLE>
    <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
    
    <BODY onload="init()">
        <!-- topNav macro -->
		<TABLE valign="top" border="0" cellspacing="0" cellpadding="0" width="100%" background="http://tuscany.apache.org/images/TuscanyLogoNEW_Text_120px_bg.jpg">
			<TR>
				<TD valing="top" align="left">
					<A href="https://cwiki.apache.org/confluence/pages/viewpage.action?spaceKey=TUSCANY&title=$siteroot"><IMG src="http://tuscany.apache.org/images/TuscanyLogoNEW_Text_120px_bg.jpg" height="91" width="25" border="0"></A>
				</TD>
				<TD>
					<A href="http://tuscany.apache.org/"><IMG src="http://tuscany.apache.org/images/TuscanyLogo.jpg" border="0"></A>
				</TD>
				
				<TD width="100%">
					&nbsp;
				</TD>

				<!-- Adds the edit page link to the top banner-->
				<TD valign="bottom">
					<DIV style="padding: 2px 10px; margin: 0px;">
						<A href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=48496">
						<IMG src="http://tuscany.apache.org/images/notep_16.gif" height="16" width="16" border="0" align="absmiddle" title="Edit Page"></A>
					</DIV>
				</TD>

			</TR>
		</TABLE>
        <!-- topNav macro end -->

		<!-- breadCrumbs macro -->
		<TABLE border="0" cellpadding="2" cellspacing="0" width="100%">
			<TR class="topBar">
				<TD align="left" valign="middle" class="topBarDiv" nowrap="true" width="100%">
					&nbsp;<A href="home.html" title="Apache Tuscany">Apache Tuscany</A>&nbsp;&gt;&nbsp;<A href="home.html" title="Home">Home</A>&nbsp;&gt;&nbsp;<A href="sdo-overview.html" title="SDO Overview">SDO Overview</A>&nbsp;&gt;&nbsp;<A href="sdo-java.html" title="SDO Java">SDO Java</A>&nbsp;&gt;&nbsp;<A href="" title="Developing SDO Java">Developing SDO Java</A>
				</TD>
				
				<TD align="right" valign="middle" class="topBarDiv" align="left" nowrap="true">
				<A href="http://mail-archives.apache.org/mod_mbox/tuscany-user">User List</A> | <A href="http://mail-archives.apache.org/mod_mbox/tuscany-dev">Dev List</A> | <A href="http://issues.apache.org/jira/browse/Tuscany">Issue Tracker</A>&nbsp;&nbsp;
				</TD>
			</TR>
		</TABLE>
		<!-- breadCrumbs macro end -->


        <TABLE border="0" cellpadding="0" width="100%" bgcolor="#FFFFFF">
            <TR>
                <TD align="left" valign="top">

					<!-- pageContent macro -->
					<DIV id="PageContent">
												
						<DIV class="pagecontent">
							<DIV class="wiki-content">
								<TABLE class="sectionMacro" border="0" cellpadding="5" cellspacing="0" width="100%"><TBODY><TR>
<TD class="confluenceTd" valign="top" width="15%">
<DIV class="panel" style="background-color: #ECF4D1;border-color: #C3CDA1;border-style: solid;border-width: 1px;"><DIV class="panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;border-bottom-color: #C3CDA1;background-color: #C3CDA1;"><B>General</B></DIV><DIV class="panelContent" style="background-color: #ECF4D1;">
<P><A href="home.html" title="Home">Home</A><BR>
<A href="http://www.apache.org/licenses/LICENSE-2.0.html" class="external-link" rel="nofollow">License </A><BR>
<A href="sdo-java-get-involved.html" title="SDO Java Get Involved">Get Involved</A><BR>
<A href="sdo-java-found-a-bug.html" title="SDO Java Found a Bug">Found a Bug?</A></P>
</DIV></DIV>

<DIV class="panel" style="background-color: #ECF4D1;border-color: #b4b4b5;border-style: solid;border-width: 1px;"><DIV class="panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;border-bottom-color: #b4b4b5;background-color: #C3CDA1;"><B>SDO Java</B></DIV><DIV class="panelContent" style="background-color: #ECF4D1;">
<P><A href="sdo-java.html" title="SDO Java">SDO Java Home</A><BR>
<A href="tuscany-sdo-java-faq.html" title="Tuscany SDO Java - FAQ">FAQ</A><BR>
<A href="sdo-java-releases.html" title="SDO Java Releases">Downloads</A><BR>
<A href="sdo-java-documentation-menu.html" title="SDO Java Documentation Menu">Documentation</A><BR>
<A href="http://svn.apache.org/repos/asf/tuscany/sdo-java/trunk/" class="external-link" rel="nofollow">Source Code</A></P>
</DIV></DIV></TD>
<TD class="confluenceTd" valign="top" width="85%">
<DIV class="panel" style="background-color: #ECF4D1;border-color: #C3CDA1;border-style: solid;border-width: 1px;"><DIV class="panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;border-bottom-color: #C3CDA1;background-color: #C3CDA1;"><B>How to get involved in development of Java SDO?</B></DIV><DIV class="panelContent" style="background-color: #ECF4D1;">
<P>This document is the development guideline for SDO Java project.</P>
<UL>
	<LI><A href="#DevelopingSDOJava-GeneralGuide">General Guide</A></LI>
	<LI><A href="#DevelopingSDOJava-GettingSourceandSetup">Getting Source code and Setting Development Environment</A></LI>
	<LI><A href="#DevelopingSDOJava-CodingGuidelines">Coding Guidelines</A></LI>
	<LI><A href="#DevelopingSDOJava-Testing">Testing</A></LI>
	<LI><A href="#DevelopingSDOJava-MavenBuildStructure">Maven Build Structure</A></LI>
	<LI><A href="#DevelopingSDOJava-Providingpatches">Reporting Issues and Providing patches</A></LI>
</UL>


<P><BR class="atl-forced-newline">
&nbsp;</P>
</DIV></DIV>

<H3><A name="DevelopingSDOJava-"></A><A name="DevelopingSDOJava-GeneralGuide"></A><DIV class="" style="background-color: #C3CDA1;">General Guide</DIV>
</H3>

<P>Welcome to the Tuscany SDO Java subproject. We look forward to your participation and try to help you get on board. Feel free to ask your questions on the mailing list.</P>

<P>Here are some general guidelines we use in this project.</P>
<UL>
	<LI>Java SDO sub-project aims to provide uniform access to data from heterogeneous sources which could be XML, RDB, POJO, SOAP, etc.</LI>
	<LI>Tuscany Java SDO is not just a reference implementation. We encourage innovation based on the tenets of SDO. A lot of work we do provides feedback to the specifications.</LI>
	<LI>SDO provides both a static (or strongly typed) programming model and a dynamic (or loosely typed) programming model. This provides a simple programming model without sacrificing the dynamic model needed by tools and frameworks.</LI>
	<LI>It supports a disconnected model and provides Meta-data for easy introspection of data types.</LI>
</UL>


<H3><A name="DevelopingSDOJava-"></A><A name="DevelopingSDOJava-GettingSourceandSetup"></A><DIV class="" style="background-color: #C3CDA1;">Getting Source code and Setting Development Environment</DIV>
</H3>


<P>The Java SDO project Subversion repository is located at <A href="https://svn.apache.org/repos/asf/incubator/tuscany/java/sdo" class="external-link" rel="nofollow">https://svn.apache.org/repos/asf/incubator/tuscany/java/sdo</A>.<BR>
The repository can also be viewed online at <A href="http://svn.apache.org/viewvc/incubator/tuscany/java/" class="external-link" rel="nofollow">http://svn.apache.org/viewvc/incubator/tuscany/java/</A></P>

<P>Anyone can check code out of Subversion. You only need to specify a username and password in order to update the Subversion repository, and only Tuscany committers have the permissions to do so.</P>

<H4><A name="DevelopingSDOJava-CheckingoutcodefromSubversion"></A>Checking out code from Subversion</H4>

<P>Use the command as follows (note that it uses http scheme so if you're a committer change it to https):</P>
<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
<PRE class="code-java">
svn checkout http:<SPAN class="code-comment">//svn.apache.org/repos/asf/incubator/tuscany/java/sdo</SPAN>
</PRE>
</DIV></DIV>

<H4><A name="DevelopingSDOJava-CommittingChangestoSubversion"></A>Committing Changes to Subversion</H4>

<P>Any Tuscany committer should have a shell account on svn.apache.org. Before you can commit, you'll need to set a Subversion password for yourself. To do that, log in to svn.apache.org and run the command svnpasswd.</P>

<P>Once your password is set, you can use a command like this to commit:</P>
<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
<PRE class="code-java">
svn commit
</PRE>
</DIV></DIV>
<P>If Subversion can't figure out your username, you can tell it explicitly:</P>
<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
<PRE class="code-java">
svn --username &lt;name&gt; commit
</PRE>
</DIV></DIV>
<P>Subversion will prompt you for a password, and once you've entered it, it will remember it for you. Note this is the password you configured with svnpasswd not your shell or other password.</P>

<P>For more details check <A href="http://cwiki.apache.org/TUSCANY/getting-source.html" class="external-link" rel="nofollow">Getting Source</A>. Also for setup details check <A href="http://cwiki.apache.org/TUSCANY/set-up-sdo-development-environment.html" class="external-link" rel="nofollow">Establishing a Development Environment</A>. Reference the code structure at <A href="http://cwiki.apache.org/TUSCANY/sdo-project-code-structure.html" class="external-link" rel="nofollow">SDO Project Code Structure</A>. </P>

<H3><A name="DevelopingSDOJava-"></A><A name="DevelopingSDOJava-CodingGuidelines"></A><DIV class="" style="background-color: #C3CDA1;">Coding Guidelines</DIV>
</H3>

<P>There are a few simple guidelines when developing for JAVA SDO:</P>
<UL>
	<LI>The basic coding style used is described at <A href="http://java.sun.com/docs/codeconv/" class="external-link" rel="nofollow">Sun Java coding standards</A> but the main thing is to be consistent with the existing code you're updating, so for example, if you're updating a method that uses the braces on the same line style don't add code with the hanging braces style.</LI>
</UL>


<UL>
	<LI>Always include the Apache License Headers on all files (both source code files and resource files such as xml documents)</LI>
</UL>


<UL>
	<LI>Include a descriptive log message for check-ins, for example &quot;fixed such and such problem&quot;.</LI>
</UL>


<H4><A name="DevelopingSDOJava-Namingconventionstoincreaseconsistency"></A>Naming conventions to increase consistency</H4>

<P><B>Folder Names:</B> Please use all lowercases and dashes in folder names (like in the jar names)</P>
<UL class="alternate" type="square">
	<LI>Maven artifact id = tuscany-&lt;folder name&gt;</LI>
</UL>


<P><B>Package names:</B> Package names within modules should include the module name so that source code can be located in the source tree easily. </P>

<H3><A name="DevelopingSDOJava-"></A><A name="DevelopingSDOJava-Testing"></A><DIV class="" style="background-color: #C3CDA1;">Testing</DIV>
</H3>

<P>Tuscany uses plain junit test cases to perform unit and integration testing. You can check <A href="https://svn.apache.org/repos/asf/incubator/tuscany/java/sdo/impl/src/test/" class="external-link" rel="nofollow">Test Cases</A> for some examples.</P>

<P><IMG class="emoticon" src="https://cwiki.apache.org/confluence/images/icons/emoticons/lightbulb_on.gif" height="16" width="16" align="absmiddle" alt="" border="0"> Note that we use surefire maven plugin to run the unit and integration tests, and in most cases, they are configured to match a &#42;*/*TestCase.java file name pattern. Because of this, if your test case has a different file name pattern, you might execute it from your IDE of choice, but the maven build won't execute the test.</P>

<H3><A name="DevelopingSDOJava-"></A><A name="DevelopingSDOJava-MavenBuildStructure"></A><DIV class="" style="background-color: #C3CDA1;">Maven Build Structure</DIV>
</H3>

<P><EM>We use the term Module to refer to the leaf of maven tree.</EM></P>
<UL>
	<LI>All poms will use the pom from the parent folder as parent pom</LI>
	<LI>Group id: org.apache.tuscany.sdo</LI>
	<LI>Version of our modules will be specified once in java/sdo/pom.xml, child poms don't need to specify a version as they get it from their parent</LI>
	<LI>pom names begin Apache Tuscany SDO</LI>
	<LI>Eclipse projects are generated for all built modules using mvn &#45;Peclipse eclipse:eclipse</LI>
</UL>


<H3><A name="DevelopingSDOJava-"></A><A name="DevelopingSDOJava-Providingpatches"></A><DIV class="" style="background-color: #C3CDA1;">Reporting issues and providing patches</DIV>
</H3>

<P>You are very welcome to help us develop Tuscany SDO Java.  You may have ideas that you want to pursue yourself or you may wish to pitch in with the design, coding and documentation.  If it's the first of these two then please put forward your suggestions on the <A href="mailto:tuscany-dev@ws.apache.org" class="external-link" rel="nofollow">development mailing list</A>.  If it's the latter, then feel free to ask on the <A href="mailto:tuscany-dev@ws.apache.org" class="external-link" rel="nofollow">mailing</A> list or browse the issue tracking.</P>

<H3><A name="DevelopingSDOJava-ReportinganIssueorAskingForNewFeatures"></A>Reporting an Issue or Asking For New Features</H3>

<P><B>Please use Apache<A href="http://issues.apache.org/jira/browse/Tuscany" class="external-link" rel="nofollow">JIRA</A> system to report bugs or request new features.</B> First time users need to create a login.</P>

<P>Search the existing JIRAs to see if what you want to create is already there. If not, create a new one. Make sure JIRAs are categorized correctly using JIRA categories and are created under the correct component area. Please include as much information as possible in your JIRA to help resolve the issue quicker. This can include version of the software used, platforms running on, steps to reproduce, test case, details of your requirement or even a patch if you have one. </P>

<H3><A name="DevelopingSDOJava-SubmittingaPatch"></A>Submitting a Patch</H3>

<P>Please follow the steps below to create a patch. It will be reviewed and committed by a committer in the project.</P>

<UL>
	<LI>Perform a full build with all tests enabled for the module the fix is for. Specific build procedures vary by sub-project.</LI>
	<LI>Confirm that the problem is fixed and include a test case where possible to help the person who is applying the patch to verify the fix.</LI>
	<LI>Generate the patch using <TT>svn diff File &gt; patchfile</TT></LI>
	<LI>Try to give your patch files meaningful names, including the JIRA number</LI>
	<LI>Add your patch file as an attachment to the associated JIRA issue
	<UL>
		<LI>Clicking on the 'Patch Available' box in the screen where the patch is being submitted will help identify available patches quicker.</LI>
	</UL>
	</LI>
</UL>


<H3><A name="DevelopingSDOJava-HowdoIgetmyJIRAsintoarelease%3F"></A>How do I get my JIRAs into a release?</H3>
<P>You can always propose a release and drive the release with the content that you want. Another way to get a JIRA into a release is by providing a patch or working with other community members (volunteers) to help you get the problem fixed. You can also help by providing test cases.</P>

<P>Each release is managed by a release manager. Make sure that the Release Manager is aware of why a fix to a JIRA is important to your business. In general, the best attempt is made to include as many JIRAs as possible depending on the level of community help. The voting mechanism in the JIRA system can be used to raise the importance of a JIRA to the attention of the release manager. Adding comments in the JIRA would help the release manager understand why a JIRA is important to include in a given release. </P>

<H3><A name="DevelopingSDOJava-Howisareleasedone%3F"></A>How is a release done?</H3>
<P>Anyone can volunteer to be a release manager and drive a release. Based on Apache guidelines, a release requires at least three PMC +1 votes and more +1s than -1s. A release can not be vetoed so a -1 does not block a release.  The steps for how to create a Tuscany release are documented <A href="http://tuscany.apache.org/making-releases.html" class="external-link" rel="nofollow">here </A></P>
<P></P>
</TD></TR></TBODY></TABLE>
							</DIV>
						</DIV>
					</DIV>	
		            <!-- pageContent macro end -->
					
                </TD>
            </TR>
        </TABLE>

		<!-- footer macro -->
				<SCRIPT src="http://www.google-analytics.com/urchin.js" type="text/javascript">
		</SCRIPT>
		<SCRIPT type="text/javascript">
		   _uacct = "UA-1174707-5";
		   urchinTracker();
		</SCRIPT>
		
				<A href="http://www.statcounter.com/" target="_blank"><IMG src="http://c26.statcounter.com/counter.php?sc_project=2619156&java=0&security=94bd7e7d&invisible=0" alt="website stats" border="0"></A>    

		<DIV class="footer">
			Copyright � 2003-2012, The Apache Software Foundation&nbsp;&nbsp;</BR>
                        Apache Tuscany and the Apache Tuscany project logo are trademarks of The Apache Software Foundation.
		</DIV>
		<!-- footer macro end -->

    </BODY>
</HTML>