This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 245153
Collapse All | Expand All

(-)api.maven.archetype/apichanges.xml (+166 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--
3
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4
5
Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
6
7
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
8
Other names may be trademarks of their respective owners.
9
10
11
The contents of this file are subject to the terms of either the GNU
12
General Public License Version 2 only ("GPL") or the Common
13
Development and Distribution License("CDDL") (collectively, the
14
"License"). You may not use this file except in compliance with the
15
License. You can obtain a copy of the License at
16
http://www.netbeans.org/cddl-gplv2.html
17
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
18
specific language governing permissions and limitations under the
19
License.  When distributing the software, include this License Header
20
Notice in each file and include the License file at
21
nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
22
particular file as subject to the "Classpath" exception as provided
23
by Oracle in the GPL Version 2 section of the License file that
24
accompanied this code. If applicable, add the following below the
25
License Header, with the fields enclosed by brackets [] replaced by
26
your own identifying information:
27
"Portions Copyrighted [year] [name of copyright owner]"
28
29
Contributor(s):
30
31
The Original Software is NetBeans. The Initial Developer of the Original
32
Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
33
Microsystems, Inc. All Rights Reserved.
34
35
If you wish your version of this file to be governed by only the CDDL
36
or only the GPL Version 2, indicate your decision by adding
37
"[Contributor] elects to include this software in this distribution
38
under the [CDDL or GPL Version 2] license." If you do not indicate a
39
single choice of license, a recipient has the option to distribute
40
your version of this file under either the CDDL, the GPL Version 2 or
41
to extend the choice of license to its licensees as provided above.
42
However, if you add GPL Version 2 code and therefore, elected the GPL
43
Version 2 license, then the option applies only if the new code is
44
made subject to such option by the copyright holder.
45
-->
46
<?xml-stylesheet type="text/xml" href="../nbbuild/javadoctools/apichanges.xsl"?>
47
<!DOCTYPE apichanges PUBLIC "-//NetBeans//DTD API changes list 1.0//EN" "../nbbuild/javadoctools/apichanges.dtd">
48
49
<!--
50
51
INFO FOR PEOPLE ADDING CHANGES:
52
53
Check the DTD (apichanges.dtd) for details on the syntax. You do not
54
need to regenerate the HTML, as this is part of Javadoc generation; just
55
change the XML. Rough syntax of a change (several parts optional):
56
57
<change>
58
    <api name="compiler"/>
59
    <summary>Some brief description here, can use <b>XHTML</b></summary>
60
    <version major="1" minor="99"/>
61
    <date day="13" month="6" year="2001"/>
62
    <author login="jrhacker"/>
63
    <compatibility addition="yes"/>
64
    <description>
65
        The main description of the change here.
66
        Again can use full <b>XHTML</b> as needed.
67
    </description>
68
    <class package="org.openide.compiler" name="DoWhatIWantCompiler"/>
69
    <issue number="14309"/>
70
</change>
71
72
Also permitted elements: <package>, <branch>. <version> is API spec
73
version, recommended for all new changes. <compatibility> should say
74
if things were added/modified/deprecated/etc. and give all information
75
related to upgrading old code. List affected top-level classes and
76
link to issue numbers if applicable. See the DTD for more details.
77
78
Changes need not be in any particular order, they are sorted in various
79
ways by the stylesheet anyway.
80
81
Dates are assumed to mean "on the trunk". If you *also* make the same
82
change on a stabilization branch, use the <branch> tag to indicate this
83
and explain why the change was made on a branch in the <description>.
84
85
Please only change this file on the trunk! Rather: you can change it
86
on branches if you want, but these changes will be ignored; only the
87
trunk version of this file is important.
88
89
Deprecations do not count as incompatible, assuming that code using the
90
deprecated calls continues to see their documented behavior. But do
91
specify deprecation="yes" in <compatibility>.
92
93
This file is not a replacement for Javadoc: it is intended to list changes,
94
not describe the complete current behavior, for which ordinary documentation
95
is the proper place.
96
97
-->
98
99
<apichanges>
100
101
    <!-- First, a list of API names you may use: -->
102
    <apidefs>
103
        <apidef name="general">Maven Archetype</apidef>
104
        <!-- etc. -->
105
    </apidefs>
106
107
    <!-- ACTUAL CHANGES BEGIN HERE: -->
108
109
    <changes>
110
        
111
        <change id="maven.archetype.api.init">
112
           <api name="general"/>
113
           <summary>Created the public Maven Archetype api</summary>
114
           <version major="1" minor="0"/>
115
           <date day="17" month="7" year="2014"/>
116
           <author login="tstupka"/>
117
           <compatibility modification="yes" semantic="compatible"/>
118
           <description>
119
               <p>
120
                   Public API for creating New Project wizards based on the maven-archetype-plugin.
121
               </p>
122
           </description>
123
           <class package="org.netbeans.maven.archetype.api" name="Archetype"/>
124
           <class package="org.netbeans.maven.archetype.api" name="ArchetypeWizards"/>
125
           <class package="org.netbeans.maven.archetype.api" name="ProjectInfo"/>
126
           <issue number="245153"/>
127
        </change>
128
        
129
    </changes>
130
131
    <!-- Now the surrounding HTML text and document structure: -->
132
133
    <htmlcontents>
134
<!--
135
136
                            NO NO NO NO NO!
137
138
         ==============>    DO NOT EDIT ME!  <==============
139
140
          AUTOMATICALLY GENERATED FROM APICHANGES.XML, DO NOT EDIT
141
142
                SEE projects/projectuiapi/apichanges.xml
143
144
-->
145
    <head>
146
      <title>Change History for Maven Archetype</title>
147
      <link rel="stylesheet" href="prose.css" type="text/css"/>
148
    </head>
149
    <body>
150
151
<p class="overviewlink"><a href="overview-summary.html">Overview</a></p>
152
153
<h1>Introduction</h1>
154
155
<p>This document lists changes made to the <a href="@org-netbeans-modules-maven-archetype@/index.html">Maven Project API</a>.</p>
156
157
<!-- The actual lists of changes, as summaries and details: -->
158
      <hr/>
159
      <standard-changelists module-code-name="org.netbeans.modules.maven/1"/>
160
161
      <hr/><p>@FOOTER@</p>
162
163
    </body>
164
  </htmlcontents>
165
166
</apichanges>
(-)api.maven.archetype/arch.xml (+1130 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--
3
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4
5
Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
6
7
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
8
Other names may be trademarks of their respective owners.
9
10
11
The contents of this file are subject to the terms of either the GNU
12
General Public License Version 2 only ("GPL") or the Common
13
Development and Distribution License("CDDL") (collectively, the
14
"License"). You may not use this file except in compliance with the
15
License. You can obtain a copy of the License at
16
http://www.netbeans.org/cddl-gplv2.html
17
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
18
specific language governing permissions and limitations under the
19
License.  When distributing the software, include this License Header
20
Notice in each file and include the License file at
21
nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
22
particular file as subject to the "Classpath" exception as provided
23
by Oracle in the GPL Version 2 section of the License file that
24
accompanied this code. If applicable, add the following below the
25
License Header, with the fields enclosed by brackets [] replaced by
26
your own identifying information:
27
"Portions Copyrighted [year] [name of copyright owner]"
28
29
Contributor(s):
30
31
The Original Software is NetBeans. The Initial Developer of the Original
32
Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
33
Microsystems, Inc. All Rights Reserved.
34
35
If you wish your version of this file to be governed by only the CDDL
36
or only the GPL Version 2, indicate your decision by adding
37
"[Contributor] elects to include this software in this distribution
38
under the [CDDL or GPL Version 2] license." If you do not indicate a
39
single choice of license, a recipient has the option to distribute
40
your version of this file under either the CDDL, the GPL Version 2 or
41
to extend the choice of license to its licensees as provided above.
42
However, if you add GPL Version 2 code and therefore, elected the GPL
43
Version 2 license, then the option applies only if the new code is
44
made subject to such option by the copyright holder.
45
-->
46
<!DOCTYPE api-answers PUBLIC "-//NetBeans//DTD Arch Answers//EN" "../nbbuild/antsrc/org/netbeans/nbbuild/Arch.dtd" [
47
  <!ENTITY api-questions SYSTEM "../nbbuild/antsrc/org/netbeans/nbbuild/Arch-api-questions.xml">
48
]>
49
50
<api-answers
51
  question-version="1.0"
52
  author="tstupka@netbeans.org"
53
>
54
55
  &api-questions;
56
57
58
<!--
59
        <question id="arch-overall" when="init">
60
            Describe the overall architecture.
61
            <hint>
62
            What will be API for
63
            <a href="http://openide.netbeans.org/tutorial/api-design.html#design.apiandspi">
64
                clients and what support API</a>? 
65
            What parts will be pluggable?
66
            How will plug-ins be registered? Please use <code>&lt;api type="export"/&gt;</code>
67
            to describe your general APIs.
68
            If possible please provide 
69
            simple diagrams. 
70
            </hint>
71
        </question>
72
-->
73
 <answer id="arch-overall">
74
  <ul>
75
   <li>
76
    <api group="java" name="MavenArchetypeAPI" type="export" category="stable">
77
     <p> 
78
      The Maven Archetype API provides some miscellaneous APIs related to 
79
      maven-archetype-plugin.
80
     </p>
81
    </api>
82
   </li>
83
  </ul>
84
 </answer>
85
86
<!--
87
        <question id="arch-usecases" when="init">
88
            Describe the main <a href="http://openide.netbeans.org/tutorial/api-design.html#usecase">
89
            use cases</a> of the new API. Who will use it at
90
            what circumstances and what will be the typical code to write
91
            to use the module.
92
        </question>
93
-->
94
 <answer id="arch-usecases">
95
  <p>
96
    creating of New Project wizards based on the maven-archetype-plugin.
97
  </p>
98
 </answer>
99
100
101
102
<!--
103
        <question id="resources-read" when="final">
104
            Does your module read any resources from layers? For what purpose?
105
            
106
            <hint>
107
            As this is some kind of intermodule dependency, it is a kind of API.
108
            Please describe it and classify according to 
109
            <a href="http://openide.netbeans.org/tutorial/api-design.html#categories">
110
            common stability categories</a>.
111
            </hint>
112
        </question>
113
-->
114
 <answer id="resources-read">
115
116
    <api group="layer" name="MavenArchetypes" type="export" category="official">
117
     <p>
118
       "Projects/org-netbeans-modules-maven/Archetypes" folder contains fileobjects
119
       that represent archetypes. The archetypes are defined by the following file attributes:
120
     </p>
121
       <table>
122
           <tbody>
123
               <tr><td>groupId</td><td>mandatory</td><td></td></tr>
124
               <tr><td>artifactId</td><td>mandatory</td><td></td></tr>
125
               <tr><td>version</td><td>mandatory</td><td></td></tr>
126
               <tr><td>repository</td><td>optional</td><td>url of the archetype's repository</td></tr>
127
               <tr><td>nameBundleKey</td><td>optional</td><td>key in bundle file that holds localized name</td></tr>
128
               <tr><td>descriptionBundleKey</td><td>optional</td><td>key in bundle file that holds localized description</td></tr>
129
           </tbody>
130
       </table>
131
    </api>
132
133
 </answer>
134
135
<!--
136
        <question id="exec-property" when="impl">
137
            Is execution of your code influenced by any environment or
138
            Java system (<code>System.getProperty</code>) property?
139
            On a similar note, is there something interesting that you
140
            pass to <code>java.util.logging.Logger</code>? Or do you observe
141
            what others log?
142
            <hint>
143
            If there is a property that can change the behavior of your 
144
            code, somebody will likely use it. You should describe what it does 
145
            and the <a href="http://wiki.netbeans.org/API_Stability">stability category</a>
146
            of this API. You may use
147
            <pre>
148
                &lt;api type="export" group="property" name="id" category="private" url="http://..."&gt;
149
                    description of the property, where it is used, what it influence, etc.
150
                &lt;/api&gt;            
151
            </pre>
152
            </hint>
153
        </question>
154
-->
155
 <answer id="exec-property">
156
  <p>
157
      No environment or Java System properties.
158
  </p>
159
 </answer>
160
161
162
163
164
<!--
165
        <question id="arch-quality" when="init">
166
            How will the <a href="http://www.netbeans.org/community/guidelines/q-evangelism.html" shape="rect">quality</a>
167
            of your code be tested and 
168
            how are future regressions going to be prevented?
169
            <hint>
170
            What kind of testing do
171
            you want to use? How much functionality, in which areas,
172
            should be covered by the tests? How you find out that your
173
            project was successful?
174
            </hint>
175
        </question>
176
-->
177
 <answer id="arch-quality">
178
  <p>
179
   XXX no answer for arch-quality
180
  </p>
181
 </answer>
182
183
184
185
<!--
186
        <question id="arch-time" when="init">
187
            What are the time estimates of the work?
188
            <hint>
189
            Please express your estimates of how long the design, implementation,
190
            stabilization are likely to last. How many people will be needed to
191
            implement this and what is the expected milestone by which the work should be 
192
            ready?
193
            </hint>
194
        </question>
195
-->
196
 <answer id="arch-time">
197
  <p>
198
   XXX no answer for arch-time
199
  </p>
200
 </answer>
201
202
203
204
<!--
205
        <question id="arch-what" when="init">
206
            What is this project good for?
207
            <hint>
208
            Please provide here a few lines describing the project, 
209
            what problem it should solve, provide links to documentation, 
210
            specifications, etc.
211
            </hint>
212
        </question>
213
-->
214
 <answer id="arch-what">
215
  <p>
216
   XXX no answer for arch-what
217
  </p>
218
 </answer>
219
220
221
222
<!--
223
        <question id="arch-where" when="impl">
224
            Where one can find sources for your module?
225
            <hint>
226
                Please provide link to the Hg web client at
227
                http://hg.netbeans.org/
228
                or just use tag defaultanswer generate='here'
229
            </hint>
230
        </question>
231
-->
232
 <answer id="arch-where">
233
  <defaultanswer generate='here' />
234
 </answer>
235
236
237
238
<!--
239
        <question id="compat-deprecation" when="init">
240
            How the introduction of your project influences functionality
241
            provided by previous version of the product?
242
            <hint>
243
            If you are planning to deprecate/remove/change any existing APIs,
244
            list them here accompanied with the reason explaining why you
245
            are doing so.
246
            </hint>
247
        </question>
248
-->
249
 <answer id="compat-deprecation">
250
  <p>
251
   XXX no answer for compat-deprecation
252
  </p>
253
 </answer>
254
255
256
257
<!--
258
        <question id="compat-i18n" when="impl">
259
            Is your module correctly internationalized?
260
            <hint>
261
            Correct internationalization means that it obeys instructions 
262
            at <a href="http://www.netbeans.org/download/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/i18n-branding.html" shape="rect">
263
            NetBeans I18N pages</a>.
264
            </hint>
265
        </question>
266
-->
267
 <answer id="compat-i18n">
268
  <p>
269
   XXX no answer for compat-i18n
270
  </p>
271
 </answer>
272
273
274
275
<!--
276
        <question id="compat-standards" when="init">
277
            Does the module implement or define any standards? Is the 
278
            implementation exact or does it deviate somehow?
279
        </question>
280
-->
281
 <answer id="compat-standards">
282
  <p>
283
   XXX no answer for compat-standards
284
  </p>
285
 </answer>
286
287
288
289
<!--
290
        <question id="compat-version" when="impl">
291
            Can your module coexist with earlier and future
292
            versions of itself? Can you correctly read all old settings? Will future
293
            versions be able to read your current settings? Can you read
294
            or politely ignore settings stored by a future version?
295
            
296
            <hint>
297
            Very helpful for reading settings is to store version number
298
            there, so future versions can decide whether how to read/convert
299
            the settings and older versions can ignore the new ones.
300
            </hint>
301
        </question>
302
-->
303
 <answer id="compat-version">
304
  <p>
305
   XXX no answer for compat-version
306
  </p>
307
 </answer>
308
309
310
311
<!--
312
        <question id="dep-jre" when="final">
313
            Which version of JRE do you need (1.2, 1.3, 1.4, etc.)?
314
            <hint>
315
            It is expected that if your module runs on 1.x that it will run 
316
            on 1.x+1 if no, state that please. Also describe here cases where
317
            you run different code on different versions of JRE and why.
318
            </hint>
319
        </question>
320
-->
321
 <answer id="dep-jre">
322
  <p>
323
   XXX no answer for dep-jre
324
  </p>
325
 </answer>
326
327
328
329
<!--
330
        <question id="dep-jrejdk" when="final">
331
            Do you require the JDK or is the JRE enough?
332
        </question>
333
-->
334
 <answer id="dep-jrejdk">
335
  <p>
336
   XXX no answer for dep-jrejdk
337
  </p>
338
 </answer>
339
340
341
342
<!--
343
        <question id="dep-nb" when="init">
344
            What other NetBeans projects and modules does this one depend on?
345
            <hint>
346
            Depending on other NetBeans projects influnces the ability of
347
            users of your work to customize their own branded version of
348
            NetBeans by enabling and disabling some modules. Too
349
            much dependencies restrict this kind of customization. If that
350
            is your case, then you may want to split your functionality into
351
            pieces of autoload, eager and regular modules which can be
352
            enabled independently. Usually the answer to this question
353
            is generated from your <code>project.xml</code> file, but
354
            if it is not guessed correctly, you can suppress it by
355
            specifying &lt;defaultanswer generate="none"/&gt; and
356
            write here your own. Please describe such projects as imported APIs using
357
            the <code>&lt;api name="identification" type="import or export" category="stable" url="where is the description" /&gt;</code>.
358
            By doing this information gets listed in the summary page of your
359
            javadoc.
360
            </hint>
361
        </question>
362
-->
363
 <answer id="dep-nb">
364
  <defaultanswer generate='here' />
365
 </answer>
366
367
368
369
<!--
370
        <question id="dep-non-nb" when="init">
371
            What other projects outside NetBeans does this one depend on?
372
            
373
            <hint>
374
            Depending on 3rd party libraries is always problematic,
375
            especially if they are not open source, as that complicates
376
            the licensing scheme of NetBeans. Please enumerate your
377
            external dependencies here, so it is correctly understood since
378
            the begining what are the legal implications of your project.
379
            Also please note that
380
            some non-NetBeans projects are packaged as NetBeans modules
381
            (see <a href="http://libs.netbeans.org/" shape="rect">libraries</a>) and
382
            it is preferred to use this approach when more modules may
383
            depend and share such third-party libraries.
384
            </hint>
385
        </question>
386
-->
387
 <answer id="dep-non-nb">
388
  <p>
389
   XXX no answer for dep-non-nb
390
  </p>
391
 </answer>
392
393
394
395
<!--
396
        <question id="dep-platform" when="init">
397
            On which platforms does your module run? Does it run in the same
398
            way on each?
399
            <hint>
400
            If you plan any dependency on OS or any usage of native code,
401
            please describe why you are doing so and describe how you envision
402
            to enforce the portability of your code.
403
            Please note that there is a support for <a href="http://www.netbeans.org/download/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/api.html#how-os-specific" shape="rect">OS conditionally
404
            enabled modules</a> which together with autoload/eager modules
405
            can allow you to enable to provide the best OS aware support
406
            on certain OSes while providing compatibility bridge on the not
407
            supported ones.
408
            Also please list the supported
409
            OSes/HW platforms and mentioned the lovest version of JDK required
410
            for your project to run on. Also state whether JRE is enough or
411
            you really need JDK.
412
            </hint>
413
        </question>
414
-->
415
 <answer id="dep-platform">
416
  <p>
417
   XXX no answer for dep-platform
418
  </p>
419
 </answer>
420
421
422
423
<!--
424
        <question id="deploy-dependencies" when="final">
425
            What do other modules need to do to declare a dependency on this one,
426
            in addition to or instead of the normal module dependency declaration
427
            (e.g. tokens to require)?
428
            <hint>
429
                Provide a sample of the actual lines you would add to a module manifest
430
                to declare a dependency, for example OpenIDE-Module-Requires: some.token.
431
                If other modules should not depend on this module, or should just use a
432
                simple regular module dependency, you can just answer "nothing". If you
433
                intentionally expose a semistable API to clients using implementation
434
                dependencies, you should mention that here (but there is no need to give
435
                an example of usage).
436
            </hint>
437
        </question>
438
-->
439
 <answer id="deploy-dependencies">
440
  <p>
441
   No special requirements here.
442
  </p>
443
 </answer>
444
445
446
447
<!--
448
        <question id="deploy-jar" when="impl">
449
            Do you deploy just module JAR file(s) or other files as well?
450
            <hint>
451
            Usually a module consist of one JAR file (perhaps with Class-Path
452
            extensions) and also a configuration file that enables it. If you
453
            have any other files, use
454
            &lt;api group="java.io.File" name="yourname" type="export" category="friend"&gt;...&lt;/api&gt;
455
            to define the location, name and stability of your files (of course
456
            changing "yourname" and "friend" to suit your needs).
457
            
458
            If it uses more than one JAR, describe where they are located, how
459
            they refer to each other. 
460
            If it consist of module JAR(s) and other files, please describe
461
            what is their purpose, why other files are necessary. Please 
462
            make sure that installation/uninstallation leaves the system 
463
            in state as it was before installation.
464
            </hint>
465
        </question>
466
-->
467
 <answer id="deploy-jar">
468
  <p>
469
   XXX no answer for deploy-jar
470
  </p>
471
 </answer>
472
473
474
475
<!--
476
        <question id="deploy-nbm" when="impl">
477
            Can you deploy an NBM via the Update Center?
478
            <hint>
479
            If not why?
480
            </hint>
481
        </question>
482
-->
483
 <answer id="deploy-nbm">
484
  <p>
485
   XXX no answer for deploy-nbm
486
  </p>
487
 </answer>
488
489
490
491
<!--
492
        <question id="deploy-packages" when="init">
493
            Are packages of your module made inaccessible by not declaring them
494
            public?
495
            
496
            <hint>
497
            By default NetBeans build harness treats all packages are private.
498
            If you export some of them - either as public or friend packages,
499
            you should have a reason. If the reason is described elsewhere
500
            in this document, you can ignore this question.
501
            </hint>
502
        </question>
503
-->
504
 <answer id="deploy-packages">
505
  <p>
506
   XXX no answer for deploy-packages
507
  </p>
508
 </answer>
509
510
511
512
<!--
513
        <question id="deploy-shared" when="final">
514
            Do you need to be installed in the shared location only, or in the user directory only,
515
            or can your module be installed anywhere?
516
            <hint>
517
            Installation location shall not matter, if it does explain why.
518
            Consider also whether <code>InstalledFileLocator</code> can help.
519
            </hint>
520
        </question>
521
-->
522
 <answer id="deploy-shared">
523
  <p>
524
   XXX no answer for deploy-shared
525
  </p>
526
 </answer>
527
528
529
530
<!--
531
        <question id="exec-ant-tasks" when="impl">
532
            Do you define or register any ant tasks that other can use?
533
            
534
            <hint>
535
            If you provide an ant task that users can use, you need to be very
536
            careful about its syntax and behaviour, as it most likely forms an
537
	          API for end users and as there is a lot of end users, their reaction
538
            when such API gets broken can be pretty strong.
539
            </hint>
540
        </question>
541
-->
542
 <answer id="exec-ant-tasks">
543
  <p>
544
   XXX no answer for exec-ant-tasks
545
  </p>
546
 </answer>
547
548
549
550
<!--
551
        <question id="exec-classloader" when="impl">
552
            Does your code create its own class loader(s)?
553
            <hint>
554
            A bit unusual. Please explain why and what for.
555
            </hint>
556
        </question>
557
-->
558
 <answer id="exec-classloader">
559
  <p>
560
   XXX no answer for exec-classloader
561
  </p>
562
 </answer>
563
564
565
566
<!--
567
        <question id="exec-component" when="impl">
568
            Is execution of your code influenced by any (string) property
569
            of any of your components?
570
            
571
            <hint>
572
            Often <code>JComponent.getClientProperty</code>, <code>Action.getValue</code>
573
            or <code>PropertyDescriptor.getValue</code>, etc. are used to influence
574
            a behavior of some code. This of course forms an interface that should
575
            be documented. Also if one depends on some interface that an object
576
            implements (<code>component instanceof Runnable</code>) that forms an
577
            API as well.
578
            </hint>
579
        </question>
580
-->
581
 <answer id="exec-component">
582
  <p>
583
   XXX no answer for exec-component
584
  </p>
585
 </answer>
586
587
588
589
<!--
590
        <question id="exec-introspection" when="impl">
591
            Does your module use any kind of runtime type information (<code>instanceof</code>,
592
            work with <code>java.lang.Class</code>, etc.)?
593
            <hint>
594
            Check for cases when you have an object of type A and you also
595
            expect it to (possibly) be of type B and do some special action. That
596
            should be documented. The same applies on operations in meta-level
597
            (Class.isInstance(...), Class.isAssignableFrom(...), etc.).
598
            </hint>
599
        </question>
600
-->
601
 <answer id="exec-introspection">
602
  <p>
603
   XXX no answer for exec-introspection
604
  </p>
605
 </answer>
606
607
608
609
<!--
610
        <question id="exec-privateaccess" when="final">
611
            Are you aware of any other parts of the system calling some of 
612
            your methods by reflection?
613
            <hint>
614
            If so, describe the "contract" as an API. Likely private or friend one, but
615
            still API and consider rewrite of it.
616
            </hint>
617
        </question>
618
-->
619
 <answer id="exec-privateaccess">
620
  <p>
621
   XXX no answer for exec-privateaccess
622
  </p>
623
 </answer>
624
625
626
627
<!--
628
        <question id="exec-process" when="impl">
629
            Do you execute an external process from your module? How do you ensure
630
            that the result is the same on different platforms? Do you parse output?
631
            Do you depend on result code?
632
            <hint>
633
            If you feed an input, parse the output please declare that as an API.
634
            </hint>
635
        </question>
636
-->
637
 <answer id="exec-process">
638
  <p>
639
   XXX no answer for exec-process
640
  </p>
641
 </answer>
642
643
644
645
<!--
646
        <question id="exec-reflection" when="impl">
647
            Does your code use Java Reflection to execute other code?
648
            <hint>
649
            This usually indicates a missing or insufficient API in the other
650
            part of the system. If the other side is not aware of your dependency
651
            this contract can be easily broken.
652
            </hint>
653
        </question>
654
-->
655
 <answer id="exec-reflection">
656
  <p>
657
   XXX no answer for exec-reflection
658
  </p>
659
 </answer>
660
661
662
663
<!--
664
        <question id="exec-threading" when="init">
665
            What threading models, if any, does your module adhere to? How the
666
            project behaves with respect to threading?
667
            <hint>
668
                Is your API threadsafe? Can it be accessed from any threads or
669
                just from some dedicated ones? Any special relation to AWT and
670
                its Event Dispatch thread? Also
671
                if your module calls foreign APIs which have a specific threading model,
672
                indicate how you comply with the requirements for multithreaded access
673
                (synchronization, mutexes, etc.) applicable to those APIs.
674
                If your module defines any APIs, or has complex internal structures
675
                that might be used from multiple threads, declare how you protect
676
                data against concurrent access, race conditions, deadlocks, etc.,
677
                and whether such rules are enforced by runtime warnings, errors, assertions, etc.
678
                Examples: a class might be non-thread-safe (like Java Collections); might
679
                be fully thread-safe (internal locking); might require access through a mutex
680
                (and may or may not automatically acquire that mutex on behalf of a client method);
681
                might be able to run only in the event queue; etc.
682
                Also describe when any events are fired: synchronously, asynchronously, etc.
683
                Ideas: <a href="http://core.netbeans.org/proposals/threading/index.html#recommendations" shape="rect">Threading Recommendations</a> (in progress)
684
            </hint>
685
        </question>
686
-->
687
 <answer id="exec-threading">
688
  <p>
689
   XXX no answer for exec-threading
690
  </p>
691
 </answer>
692
693
694
695
<!--
696
        <question id="format-clipboard" when="impl">
697
            Which data flavors (if any) does your code read from or insert to
698
            the clipboard (by access to clipboard on means calling methods on <code>java.awt.datatransfer.Transferable</code>?
699
            
700
            <hint>
701
            Often Node's deal with clipboard by usage of <code>Node.clipboardCopy, Node.clipboardCut and Node.pasteTypes</code>.
702
            Check your code for overriding these methods.
703
            </hint>
704
        </question>
705
-->
706
 <answer id="format-clipboard">
707
  <p>
708
   XXX no answer for format-clipboard
709
  </p>
710
 </answer>
711
712
713
714
<!--
715
        <question id="format-dnd" when="impl">
716
            Which protocols (if any) does your code understand during Drag &amp; Drop?
717
            <hint>
718
            Often Node's deal with clipboard by usage of <code>Node.drag, Node.getDropType</code>. 
719
            Check your code for overriding these methods. Btw. if they are not overridden, they
720
            by default delegate to <code>Node.clipboardCopy, Node.clipboardCut and Node.pasteTypes</code>.
721
            </hint>
722
        </question>
723
-->
724
 <answer id="format-dnd">
725
  <p>
726
   XXX no answer for format-dnd
727
  </p>
728
 </answer>
729
730
731
732
<!--
733
        <question id="format-types" when="impl">
734
            Which protocols and file formats (if any) does your module read or write on disk,
735
            or transmit or receive over the network? Do you generate an ant build script?
736
            Can it be edited and modified? 
737
            
738
            <hint>
739
            <p>
740
            Files can be read and written by other programs, modules and users. If they influence
741
            your behaviour, make sure you either document the format or claim that it is a private
742
            api (using the &lt;api&gt; tag). 
743
            </p>
744
            
745
            <p>
746
            If you generate an ant build file, this is very likely going to be seen by end users and
747
            they will be attempted to edit it. You should be ready for that and provide here a link
748
            to documentation that you have for such purposes and also describe how you are going to
749
            understand such files during next release, when you (very likely) slightly change the 
750
            format.
751
            </p>
752
            </hint>
753
        </question>
754
-->
755
 <answer id="format-types">
756
  <p>
757
   XXX no answer for format-types
758
  </p>
759
 </answer>
760
761
762
763
<!--
764
        <question id="lookup-lookup" when="init">
765
            Does your module use <code>org.openide.util.Lookup</code>
766
            or any similar technology to find any components to communicate with? Which ones?
767
            
768
            <hint>
769
            NetBeans is build around a generic registry of services called
770
            lookup. It is preferable to use it for registration and discovery
771
            if possible. See
772
            <a href="http://www.netbeans.org/download/dev/javadoc/org-openide-util/org/openide/util/lookup/doc-files/index.html" shape="rect">
773
            The Solution to Comunication Between Components
774
            </a>. If you do not plan to use lookup and insist usage
775
            of other solution, then please describe why it is not working for
776
            you.
777
            <br/>
778
            When filling the final version of your arch document, please
779
            describe the interfaces you are searching for, where 
780
            are defined, whether you are searching for just one or more of them,
781
            if the order is important, etc. Also classify the stability of such
782
            API contract. Use &lt;api group=&amp;lookup&amp; /&gt; tag, so
783
            your information gets listed in the summary page of your javadoc.
784
            </hint>
785
        </question>
786
-->
787
 <answer id="lookup-lookup">
788
  <p>
789
   XXX no answer for lookup-lookup
790
  </p>
791
 </answer>
792
793
794
795
<!--
796
        <question id="lookup-register" when="final">
797
            Do you register anything into lookup for other code to find?
798
            <hint>
799
            Do you register using layer file or using a declarative annotation such as <code>@ServiceProvider</code>?
800
            Who is supposed to find your component?
801
            </hint>
802
        </question>
803
-->
804
 <answer id="lookup-register">
805
  <p>
806
   XXX no answer for lookup-register
807
  </p>
808
 </answer>
809
810
811
812
<!--
813
        <question id="lookup-remove" when="final">
814
            Do you remove entries of other modules from lookup?
815
            <hint>
816
            Why? Of course, that is possible, but it can be dangerous. Is the module
817
            your are masking resource from aware of what you are doing?
818
            </hint>
819
        </question>
820
-->
821
 <answer id="lookup-remove">
822
  <p>
823
   XXX no answer for lookup-remove
824
  </p>
825
 </answer>
826
827
828
829
<!--
830
        <question id="perf-exit" when="final">
831
            Does your module run any code on exit?
832
        </question>
833
-->
834
 <answer id="perf-exit">
835
  <p>
836
   XXX no answer for perf-exit
837
  </p>
838
 </answer>
839
840
841
842
<!--
843
        <question id="perf-huge_dialogs" when="final">
844
            Does your module contain any dialogs or wizards with a large number of
845
            GUI controls such as combo boxes, lists, trees, or text areas?
846
        </question>
847
-->
848
 <answer id="perf-huge_dialogs">
849
  <p>
850
   XXX no answer for perf-huge_dialogs
851
  </p>
852
 </answer>
853
854
855
856
<!--
857
        <question id="perf-limit" when="init">
858
            Are there any hard-coded or practical limits in the number or size of
859
            elements your code can handle?
860
            <hint>
861
                Most of algorithms have increasing memory and speed complexity
862
                with respect to size of data they operate on. What is the critical
863
                part of your project that can be seen as a bottleneck with
864
                respect to speed or required memory? What are the practical
865
                sizes of data you tested your project with? What is your estimate
866
                of potential size of data that would cause visible performance
867
                problems? Is there some kind of check to detect such situation
868
                and prevent "hard" crashes - for example the CloneableEditorSupport
869
                checks for size of a file to be opened in editor
870
                and if it is larger than 1Mb it shows a dialog giving the
871
                user the right to decide - e.g. to cancel or commit suicide.
872
            </hint>
873
        </question>
874
-->
875
 <answer id="perf-limit">
876
  <p>
877
   XXX no answer for perf-limit
878
  </p>
879
 </answer>
880
881
882
883
<!--
884
        <question id="perf-mem" when="final">
885
            How much memory does your component consume? Estimate
886
            with a relation to the number of windows, etc.
887
        </question>
888
-->
889
 <answer id="perf-mem">
890
  <p>
891
   XXX no answer for perf-mem
892
  </p>
893
 </answer>
894
895
896
897
<!--
898
        <question id="perf-menus" when="final">
899
            Does your module use dynamically updated context menus, or
900
            context-sensitive actions with complicated and slow enablement logic?
901
            <hint>
902
                If you do a lot of tricks when adding actions to regular or context menus, you can significantly
903
                slow down display of the menu, even when the user is not using your action. Pay attention to
904
                actions you add to the main menu bar, and to context menus of foreign nodes or components. If
905
                the action is conditionally enabled, or changes its display dynamically, you need to check the
906
                impact on performance. In some cases it may be more appropriate to make a simple action that is
907
                always enabled but does more detailed checks in a dialog if it is actually run.
908
            </hint>
909
        </question>
910
-->
911
 <answer id="perf-menus">
912
  <p>
913
   XXX no answer for perf-menus
914
  </p>
915
 </answer>
916
917
918
919
<!--
920
        <question id="perf-progress" when="final">
921
            Does your module execute any long-running tasks?
922
            
923
            <hint>Long running tasks should never block 
924
            AWT thread as it badly hurts the UI
925
            <a href="http://performance.netbeans.org/responsiveness/issues.html" shape="rect">
926
            responsiveness</a>.
927
            Tasks like connecting over
928
            network, computing huge amount of data, compilation
929
            be done asynchronously (for example
930
            using <code>RequestProcessor</code>), definitively it should 
931
            not block AWT thread.
932
            </hint>
933
        </question>
934
-->
935
 <answer id="perf-progress">
936
  <p>
937
   XXX no answer for perf-progress
938
  </p>
939
 </answer>
940
941
942
943
<!--
944
        <question id="perf-scale" when="init">
945
            Which external criteria influence the performance of your
946
            program (size of file in editor, number of files in menu, 
947
            in source directory, etc.) and how well your code scales?
948
            <hint>
949
            Please include some estimates, there are other more detailed 
950
            questions to answer in later phases of implementation. 
951
            </hint>
952
        </question>
953
-->
954
 <answer id="perf-scale">
955
  <p>
956
   XXX no answer for perf-scale
957
  </p>
958
 </answer>
959
960
961
962
<!--
963
        <question id="perf-spi" when="init">
964
            How the performance of the plugged in code will be enforced?
965
            <hint>
966
            If you allow foreign code to be plugged into your own module, how
967
            do you enforce that it will behave correctly and quickly and will not
968
            negatively influence the performance of your own module?
969
            </hint>
970
        </question>
971
-->
972
 <answer id="perf-spi">
973
  <p>
974
   XXX no answer for perf-spi
975
  </p>
976
 </answer>
977
978
979
980
<!--
981
        <question id="perf-startup" when="final">
982
            Does your module run any code on startup?
983
        </question>
984
-->
985
 <answer id="perf-startup">
986
  <p>
987
   XXX no answer for perf-startup
988
  </p>
989
 </answer>
990
991
992
993
<!--
994
        <question id="perf-wakeup" when="final">
995
            Does any piece of your code wake up periodically and do something
996
            even when the system is otherwise idle (no user interaction)?
997
        </question>
998
-->
999
 <answer id="perf-wakeup">
1000
  <p>
1001
   XXX no answer for perf-wakeup
1002
  </p>
1003
 </answer>
1004
1005
1006
1007
<!--
1008
        <question id="resources-file" when="final">
1009
            Does your module use <code>java.io.File</code> directly?
1010
            
1011
            <hint>
1012
            NetBeans provide a logical wrapper over plain files called 
1013
            <code>org.openide.filesystems.FileObject</code> that
1014
            provides uniform access to such resources and is the preferred
1015
            way that should be used. But of course there can be situations when
1016
            this is not suitable.
1017
            </hint>
1018
        </question>
1019
-->
1020
 <answer id="resources-file">
1021
  <p>
1022
   XXX no answer for resources-file
1023
  </p>
1024
 </answer>
1025
1026
1027
1028
<!--
1029
        <question id="resources-layer" when="final">
1030
            Does your module provide own layer? Does it create any files or
1031
            folders in it? What it is trying to communicate by that and with which 
1032
            components?
1033
            
1034
            <hint>
1035
            NetBeans allows automatic and declarative installation of resources 
1036
            by module layers. Module register files into appropriate places
1037
            and other components use that information to perform their task
1038
            (build menu, toolbar, window layout, list of templates, set of
1039
            options, etc.). 
1040
            </hint>
1041
        </question>
1042
-->
1043
 <answer id="resources-layer">
1044
  <p>
1045
   XXX no answer for resources-layer
1046
  </p>
1047
 </answer>
1048
1049
1050
1051
<!--
1052
        <question id="resources-mask" when="final">
1053
            Does your module mask/hide/override any resources provided by other modules in
1054
            their layers?
1055
            
1056
            <hint>
1057
            If you mask a file provided by another module, you probably depend
1058
            on that and do not want the other module to (for example) change
1059
            the file's name. That module shall thus make that file available as an API
1060
            of some stability category.
1061
            </hint>
1062
        </question>
1063
-->
1064
 <answer id="resources-mask">
1065
  <p>
1066
   XXX no answer for resources-mask
1067
  </p>
1068
 </answer>
1069
1070
1071
1072
<!--
1073
        <question id="resources-preferences" when="final">
1074
            Does your module uses preferences via Preferences API? Does your module use NbPreferences or
1075
            or regular JDK Preferences ? Does it read, write or both ? 
1076
            Does it share preferences with other modules ? If so, then why ?
1077
            <hint>
1078
                You may use
1079
                    &lt;api type="export" group="preferences"
1080
                    name="preference node name" category="private"&gt;
1081
                    description of individual keys, where it is used, what it
1082
                    influences, whether the module reads/write it, etc.
1083
                    &lt;/api&gt;
1084
                Due to XML ID restrictions, rather than /org/netbeans/modules/foo give the "name" as org.netbeans.modules.foo.
1085
                Note that if you use NbPreferences this name will then be the same as the code name base of the module.
1086
            </hint>
1087
        </question>
1088
-->
1089
 <answer id="resources-preferences">
1090
  <p>
1091
   XXX no answer for resources-preferences
1092
  </p>
1093
 </answer>
1094
1095
1096
1097
<!--
1098
        <question id="security-grant" when="final">
1099
            Does your code grant additional rights to some other code?
1100
            <hint>Avoid using a class loader that adds extra
1101
            permissions to loaded code unless really necessary.
1102
            Also note that your API implementation
1103
            can also expose unneeded permissions to enemy code by
1104
            calling AccessController.doPrivileged().</hint>
1105
        </question>
1106
-->
1107
 <answer id="security-grant">
1108
  <p>
1109
   XXX no answer for security-grant
1110
  </p>
1111
 </answer>
1112
1113
1114
1115
<!--
1116
        <question id="security-policy" when="final">
1117
            Does your functionality require modifications to the standard policy file?
1118
            <hint>Your code might pass control to third-party code not
1119
            coming from trusted domains. This could be code downloaded over the
1120
            network or code coming from libraries that are not bundled
1121
            with NetBeans. Which permissions need to be granted to which domains?</hint>
1122
        </question>
1123
-->
1124
 <answer id="security-policy">
1125
  <p>
1126
   XXX no answer for security-policy
1127
  </p>
1128
 </answer>
1129
1130
</api-answers>
(-)api.maven.archetype/build.xml (+50 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--
3
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4
5
Copyright 2010 Oracle and/or its affiliates. All rights reserved.
6
7
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
8
Other names may be trademarks of their respective owners.
9
10
11
The contents of this file are subject to the terms of either the GNU
12
General Public License Version 2 only ("GPL") or the Common
13
Development and Distribution License("CDDL") (collectively, the
14
"License"). You may not use this file except in compliance with the
15
License. You can obtain a copy of the License at
16
http://www.netbeans.org/cddl-gplv2.html
17
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
18
specific language governing permissions and limitations under the
19
License.  When distributing the software, include this License Header
20
Notice in each file and include the License file at
21
nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
22
particular file as subject to the "Classpath" exception as provided
23
by Oracle in the GPL Version 2 section of the License file that
24
accompanied this code. If applicable, add the following below the
25
License Header, with the fields enclosed by brackets [] replaced by
26
your own identifying information:
27
"Portions Copyrighted [year] [name of copyright owner]"
28
29
Contributor(s):
30
31
The Original Software is NetBeans. The Initial Developer of the Original
32
Software is Sun Microsystems, Inc. Portions Copyright 2008 Sun
33
Microsystems, Inc. All Rights Reserved.
34
35
If you wish your version of this file to be governed by only the CDDL
36
or only the GPL Version 2, indicate your decision by adding
37
"[Contributor] elects to include this software in this distribution
38
under the [CDDL or GPL Version 2] license." If you do not indicate a
39
single choice of license, a recipient has the option to distribute
40
your version of this file under either the CDDL, the GPL Version 2 or
41
to extend the choice of license to its licensees as provided above.
42
However, if you add GPL Version 2 code and therefore, elected the GPL
43
Version 2 license, then the option applies only if the new code is
44
made subject to such option by the copyright holder.
45
-->
46
47
<project basedir="." default="netbeans" name="api.maven.archetype">
48
    <description>Builds, tests, and runs the project org.netbeans.api.maven.archetype</description>
49
    <import file="../nbbuild/templates/projectized.xml"/>
50
</project>
(-)api.maven.archetype/manifest.mf (+5 lines)
Line 0 Link Here
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.api.maven.archetype
3
OpenIDE-Module-Specification-Version: 1.0
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/api/maven/archetype/Bundle.properties
5
AutoUpdate-Show-In-Client: false
(-)api.maven.archetype/nbproject/project.properties (+46 lines)
Line 0 Link Here
1
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
#
3
# Copyright 2010 Oracle and/or its affiliates. All rights reserved.
4
#
5
# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
6
# Other names may be trademarks of their respective owners.
7
#
8
# The contents of this file are subject to the terms of either the GNU
9
# General Public License Version 2 only ("GPL") or the Common
10
# Development and Distribution License("CDDL") (collectively, the
11
# "License"). You may not use this file except in compliance with the
12
# License. You can obtain a copy of the License at
13
# http://www.netbeans.org/cddl-gplv2.html
14
# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
15
# specific language governing permissions and limitations under the
16
# License.  When distributing the software, include this License Header
17
# Notice in each file and include the License file at
18
# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
19
# particular file as subject to the "Classpath" exception as provided
20
# by Oracle in the GPL Version 2 section of the License file that
21
# accompanied this code. If applicable, add the following below the
22
# License Header, with the fields enclosed by brackets [] replaced by
23
# your own identifying information:
24
# "Portions Copyrighted [year] [name of copyright owner]"
25
#
26
# If you wish your version of this file to be governed by only the CDDL
27
# or only the GPL Version 2, indicate your decision by adding
28
# "[Contributor] elects to include this software in this distribution
29
# under the [CDDL or GPL Version 2] license." If you do not indicate a
30
# single choice of license, a recipient has the option to distribute
31
# your version of this file under either the CDDL, the GPL Version 2 or
32
# to extend the choice of license to its licensees as provided above.
33
# However, if you add GPL Version 2 code and therefore, elected the GPL
34
# Version 2 license, then the option applies only if the new code is
35
# made subject to such option by the copyright holder.
36
#
37
# Contributor(s):
38
#
39
# Portions Copyrighted 2008 Sun Microsystems, Inc.
40
41
javac.source=1.6
42
javac.compilerargs=-Xlint -Xlint:-serial
43
javadoc.apichanges=${basedir}/apichanges.xml
44
javadoc.arch=${basedir}/arch.xml
45
46
(-)api.maven.archetype/nbproject/project.xml (+122 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--
3
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4
5
Copyright 2010 Oracle and/or its affiliates. All rights reserved.
6
7
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
8
Other names may be trademarks of their respective owners.
9
10
11
The contents of this file are subject to the terms of either the GNU
12
General Public License Version 2 only ("GPL") or the Common
13
Development and Distribution License("CDDL") (collectively, the
14
"License"). You may not use this file except in compliance with the
15
License. You can obtain a copy of the License at
16
http://www.netbeans.org/cddl-gplv2.html
17
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
18
specific language governing permissions and limitations under the
19
License.  When distributing the software, include this License Header
20
Notice in each file and include the License file at
21
nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
22
particular file as subject to the "Classpath" exception as provided
23
by Oracle in the GPL Version 2 section of the License file that
24
accompanied this code. If applicable, add the following below the
25
License Header, with the fields enclosed by brackets [] replaced by
26
your own identifying information:
27
"Portions Copyrighted [year] [name of copyright owner]"
28
29
Contributor(s):
30
31
The Original Software is NetBeans. The Initial Developer of the Original
32
Software is Sun Microsystems, Inc. Portions Copyright 2008 Sun
33
Microsystems, Inc. All Rights Reserved.
34
35
If you wish your version of this file to be governed by only the CDDL
36
or only the GPL Version 2, indicate your decision by adding
37
"[Contributor] elects to include this software in this distribution
38
under the [CDDL or GPL Version 2] license." If you do not indicate a
39
single choice of license, a recipient has the option to distribute
40
your version of this file under either the CDDL, the GPL Version 2 or
41
to extend the choice of license to its licensees as provided above.
42
However, if you add GPL Version 2 code and therefore, elected the GPL
43
Version 2 license, then the option applies only if the new code is
44
made subject to such option by the copyright holder.
45
-->
46
<project xmlns="http://www.netbeans.org/ns/project/1">
47
    <type>org.netbeans.modules.apisupport.project</type>
48
    <configuration>
49
        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
50
            <code-name-base>org.netbeans.api.maven.archetype</code-name-base>
51
            <module-dependencies>
52
                <dependency>
53
                    <code-name-base>org.netbeans.api.annotations.common</code-name-base>
54
                    <build-prerequisite/>
55
                    <compile-dependency/>
56
                    <run-dependency>
57
                        <release-version>1</release-version>
58
                        <specification-version>1.24</specification-version>
59
                    </run-dependency>
60
                </dependency>
61
                <dependency>
62
                    <code-name-base>org.netbeans.modules.maven</code-name-base>
63
                    <build-prerequisite/>
64
                    <compile-dependency/>
65
                    <run-dependency>
66
                        <release-version>2</release-version>
67
                        <specification-version>2.106</specification-version>
68
                    </run-dependency>
69
                </dependency>
70
                <dependency>
71
                    <code-name-base>org.openide.dialogs</code-name-base>
72
                    <build-prerequisite/>
73
                    <compile-dependency/>
74
                    <run-dependency>
75
                        <specification-version>7.22</specification-version>
76
                    </run-dependency>
77
                </dependency>
78
                <dependency>
79
                    <code-name-base>org.openide.filesystems</code-name-base>
80
                    <build-prerequisite/>
81
                    <compile-dependency/>
82
                    <run-dependency>
83
                        <specification-version>7.49</specification-version>
84
                    </run-dependency>
85
                </dependency>
86
                <dependency>
87
                    <code-name-base>org.openide.loaders</code-name-base>
88
                    <build-prerequisite/>
89
                    <compile-dependency/>
90
                    <run-dependency>
91
                        <specification-version>7.47</specification-version>
92
                    </run-dependency>
93
                </dependency>
94
                <dependency>
95
                    <code-name-base>org.openide.util.lookup</code-name-base>
96
                    <build-prerequisite/>
97
                    <compile-dependency/>
98
                    <run-dependency>
99
                        <specification-version>8.0</specification-version>
100
                    </run-dependency>
101
                </dependency>
102
            </module-dependencies>
103
            <test-dependencies>
104
                <test-type>
105
                    <name>unit</name>
106
                    <test-dependency>
107
                        <code-name-base>org.netbeans.libs.junit4</code-name-base>
108
                        <compile-dependency/>
109
                    </test-dependency>
110
                    <test-dependency>
111
                        <code-name-base>org.netbeans.modules.nbjunit</code-name-base>
112
                        <recursive/>
113
                        <compile-dependency/>
114
                    </test-dependency>
115
                </test-type>
116
            </test-dependencies>
117
            <public-packages>
118
                <package>org.netbeans.api.maven.archetype</package>
119
            </public-packages>
120
        </data>
121
    </configuration>
122
</project>
(-)api.maven.archetype/src/org/netbeans/api/maven/archetype/Archetype.java (+215 lines)
Line 0 Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
5
 *
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
 * Other names may be trademarks of their respective owners.
8
 *
9
 * The contents of this file are subject to the terms of either the GNU
10
 * General Public License Version 2 only ("GPL") or the Common
11
 * Development and Distribution License("CDDL") (collectively, the
12
 * "License"). You may not use this file except in compliance with the
13
 * License. You can obtain a copy of the License at
14
 * http://www.netbeans.org/cddl-gplv2.html
15
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16
 * specific language governing permissions and limitations under the
17
 * License.  When distributing the software, include this License Header
18
 * Notice in each file and include the License file at
19
 * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
20
 * particular file as subject to the "Classpath" exception as provided
21
 * by Oracle in the GPL Version 2 section of the License file that
22
 * accompanied this code. If applicable, add the following below the
23
 * License Header, with the fields enclosed by brackets [] replaced by
24
 * your own identifying information:
25
 * "Portions Copyrighted [year] [name of copyright owner]"
26
 *
27
 * If you wish your version of this file to be governed by only the CDDL
28
 * or only the GPL Version 2, indicate your decision by adding
29
 * "[Contributor] elects to include this software in this distribution
30
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
31
 * single choice of license, a recipient has the option to distribute
32
 * your version of this file under either the CDDL, the GPL Version 2 or
33
 * to extend the choice of license to its licensees as provided above.
34
 * However, if you add GPL Version 2 code and therefore, elected the GPL
35
 * Version 2 license, then the option applies only if the new code is
36
 * made subject to such option by the copyright holder.
37
 *
38
 * Contributor(s):
39
 *
40
 * Portions Copyrighted 2008 Sun Microsystems, Inc.
41
 */
42
43
package org.netbeans.api.maven.archetype;
44
45
import org.netbeans.api.annotations.common.NonNull;
46
47
/**
48
 * Simple model class to describe a Maven archetype. To be created by ArchetypeProvider 
49
 * implementations, consumed by the New Maven Project wizard.
50
 * 
51
 * @author Tomas Stupka
52
 * @since 1.0
53
 */
54
public final class Archetype {
55
56
    private org.netbeans.modules.maven.api.archetype.Archetype delegate;
57
58
    /**
59
     * C'tor 
60
     * 
61
     * @since 1.0
62
     */
63
    public Archetype() {
64
        delegate = new org.netbeans.modules.maven.api.archetype.Archetype();
65
    }
66
    
67
    /**
68
     * Returns the artifact id.
69
     * 
70
     * @return the artifact id
71
     * @since 1.0
72
     */
73
    public String getArtifactId() {
74
        return delegate.getArtifactId();
75
    }
76
    
77
    /**
78
     * Sets the artifact id
79
     * 
80
     * @param artifactId 
81
     * @since 1.0
82
     */
83
    public void setArtifactId(String artifactId) {
84
        delegate.setArtifactId(artifactId);
85
    }
86
    
87
    /**
88
     * Returns the group id.
89
     * 
90
     * @return the group id
91
     * @since 1.0
92
     */
93
    public String getGroupId() {
94
        return delegate.getGroupId();
95
    }
96
    
97
    /**
98
     * Sets the group id
99
     * 
100
     * @param groupId 
101
     * @since 1.0
102
     */
103
    public void setGroupId(String groupId) {
104
        delegate.setGroupId(groupId);
105
    }
106
    
107
    /**
108
     * Returns the version.
109
     * 
110
     * @return the version
111
     * @since 1.0
112
     */
113
    public String getVersion() {
114
        return delegate.getVersion();
115
    }
116
    
117
    /**
118
     * Sets the version.
119
     * 
120
     * @param version 
121
     * @since 1.0
122
     */
123
    public void setVersion(String version) {
124
        delegate.setVersion(version);
125
    }
126
    
127
    /**
128
     * Returns the name.
129
     * 
130
     * @return the name
131
     * @since 1.0
132
     */
133
    public @NonNull String getName() {
134
        return delegate.getName();
135
    }
136
    
137
    /**
138
     * Sets the name.
139
     * 
140
     * @param name 
141
     * @since 1.0
142
     */
143
    public void setName(String name) {
144
        delegate.setName(name);
145
    }
146
    
147
    /**
148
     * Returns the description. Is an optional property.
149
     * 
150
     * @return the description or <code>null</code> if none available
151
     * @since 1.0
152
     */
153
    public String getDescription() {
154
        return delegate.getDescription();
155
    }
156
    
157
    /**
158
     * Sets the description.
159
     * 
160
     * @param description 
161
     * @since 1.0
162
     */
163
    public void setDescription(String description) {
164
        delegate.setDescription(description);
165
    }
166
    
167
    /**
168
     * Sets the repository. Is an optional property.
169
     *
170
     * @param repository
171
     * @since 1.0
172
     */
173
    public void setRepository(String repository) {
174
        delegate.setRepository(repository);
175
    }
176
    
177
    /**
178
     * Returns the repository. Is an optional property.
179
     *
180
     * @return the repository or <code>null</code> if none available
181
     * @since 1.0
182
     */
183
    public String getRepository() {
184
        return delegate.getRepository();
185
    }
186
    
187
    @Override
188
    public int hashCode() {
189
        return getGroupId().trim().hashCode() + 13 * getArtifactId().trim().hashCode() + 23 * getVersion().trim().hashCode();
190
    }
191
    
192
    @Override
193
    public boolean equals(Object obj) {
194
        if (!(obj instanceof Archetype)) {
195
            return false;
196
        }
197
        Archetype ar1 = (Archetype)obj;
198
        boolean gr = ar1.getGroupId().trim().equals(getGroupId().trim());
199
        if (!gr) {
200
            return false;
201
        }
202
        boolean ar = ar1.getArtifactId().trim().equals(getArtifactId().trim());
203
        if (!ar) {
204
            return false;
205
        }
206
        boolean ver =  ar1.getVersion().trim().equals(getVersion().trim());
207
        return ver;
208
    }
209
210
    @Override 
211
    public String toString() {
212
        return delegate.toString();
213
    }
214
215
}
(-)api.maven.archetype/src/org/netbeans/api/maven/archetype/ArchetypeWizards.java (+140 lines)
Line 0 Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
5
 *
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
 * Other names may be trademarks of their respective owners.
8
 *
9
 * The contents of this file are subject to the terms of either the GNU
10
 * General Public License Version 2 only ("GPL") or the Common
11
 * Development and Distribution License("CDDL") (collectively, the
12
 * "License"). You may not use this file except in compliance with the
13
 * License. You can obtain a copy of the License at
14
 * http://www.netbeans.org/cddl-gplv2.html
15
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16
 * specific language governing permissions and limitations under the
17
 * License.  When distributing the software, include this License Header
18
 * Notice in each file and include the License file at
19
 * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
20
 * particular file as subject to the "Classpath" exception as provided
21
 * by Oracle in the GPL Version 2 section of the License file that
22
 * accompanied this code. If applicable, add the following below the
23
 * License Header, with the fields enclosed by brackets [] replaced by
24
 * your own identifying information:
25
 * "Portions Copyrighted [year] [name of copyright owner]"
26
 *
27
 * If you wish your version of this file to be governed by only the CDDL
28
 * or only the GPL Version 2, indicate your decision by adding
29
 * "[Contributor] elects to include this software in this distribution
30
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
31
 * single choice of license, a recipient has the option to distribute
32
 * your version of this file under either the CDDL, the GPL Version 2 or
33
 * to extend the choice of license to its licensees as provided above.
34
 * However, if you add GPL Version 2 code and therefore, elected the GPL
35
 * Version 2 license, then the option applies only if the new code is
36
 * made subject to such option by the copyright holder.
37
 *
38
 * Contributor(s):
39
 *
40
 * Portions Copyrighted 2010 Sun Microsystems, Inc.
41
 */
42
43
package org.netbeans.api.maven.archetype;
44
45
import java.io.File;
46
import java.io.IOException;
47
import java.util.Map;
48
import java.util.Set;
49
import org.netbeans.api.annotations.common.NullAllowed;
50
import org.netbeans.api.templates.TemplateRegistration;
51
import org.openide.WizardDescriptor;
52
import org.openide.filesystems.FileObject;
53
54
/**
55
 * Utilities for creating New Project wizards based on maven-archetype-plugin.
56
 *
57
 * @author Tomas Stupka
58
 * @since 1.0
59
 */
60
public class ArchetypeWizards {
61
    
62
    private ArchetypeWizards() { }
63
64
    /**
65
     * Run a single archetype.
66
     * 
67
     * @param projDir the new project directory (must be normalized first!) (note: parent dir is actually passed to plugin, i.e. assumes that project name matches this basedir)
68
     * @param vi metadata for new project
69
     * @param arch the archetype to process
70
     * @param additionalProperties any additional archetype properties, or null
71
     * @param updateLastUsedProjectDir true to update last-used project directory for next wizard run
72
     * @since 1.0
73
     * @throws java.io.IOException
74
     */
75
    public static void createFromArchetype(File projDir, ProjectInfo vi, Archetype arch, @NullAllowed Map<String,String> additionalProperties, boolean updateLastUsedProjectDir) throws IOException {
76
        org.netbeans.modules.maven.api.archetype.ArchetypeWizards.createFromArchetype(
77
                projDir, 
78
                convertProjectInfo(vi), 
79
                convertArchetype(arch), 
80
                additionalProperties, 
81
                updateLastUsedProjectDir);
82
    }
83
84
    /**
85
     * Opens newly created Maven projects.
86
     * 
87
     * @param dirF the top-level dir to check in
88
     * @param mainProjectDir the dir containing the main project, or null
89
     * @return set of project directories
90
     * @since 1.0
91
     * @throws java.io.IOException
92
     */
93
    public static Set<FileObject> openProjects(File dirF, File mainProjectDir) throws IOException {
94
        return org.netbeans.modules.maven.api.archetype.ArchetypeWizards.openProjects(dirF, mainProjectDir);
95
    }
96
97
    /**
98
     * Log new project usage.
99
     * 
100
     * @param groupId
101
     * @param artifactId
102
     * @param version
103
     * @since 1.0
104
     */
105
    public static void logUsage(String groupId, String artifactId, String version) {
106
        org.netbeans.modules.maven.api.archetype.ArchetypeWizards.logUsage(groupId, artifactId, version);
107
    }
108
109
    /**
110
     * Wizard iterator using a predetermined archetype.
111
     * 
112
     * @param groupId
113
     * @param artifactId
114
     * @param version
115
     * @param repository
116
     * @param title
117
     * @return a wizard iterators
118
     * @since 1.0
119
     * @see TemplateRegistration
120
     * @see #TEMPLATE_FOLDER
121
     */
122
    public static WizardDescriptor.InstantiatingIterator<?> definedArchetype(String groupId, String artifactId, String version, @NullAllowed String repository, String title) {
123
        return org.netbeans.modules.maven.api.archetype.ArchetypeWizards.definedArchetype(groupId, artifactId, version, repository, title);
124
    }
125
126
    private static org.netbeans.modules.maven.api.archetype.ProjectInfo convertProjectInfo(ProjectInfo pi) {
127
        return new org.netbeans.modules.maven.api.archetype.ProjectInfo(pi.getGroupId(), pi.getArtifactId(), pi.getVersion(), pi.getPackageName());
128
    }
129
    
130
    private static org.netbeans.modules.maven.api.archetype.Archetype convertArchetype(Archetype a) {
131
        org.netbeans.modules.maven.api.archetype.Archetype archetype = new org.netbeans.modules.maven.api.archetype.Archetype();
132
        archetype.setGroupId(a.getGroupId());
133
        archetype.setArtifactId(a.getArtifactId());
134
        archetype.setVersion(a.getVersion());
135
        archetype.setName(a.getName());
136
        archetype.setDescription(a.getDescription());
137
        archetype.setRepository(a.getRepository());
138
        return archetype;
139
    }
140
}
(-)api.maven.archetype/src/org/netbeans/api/maven/archetype/Bundle.properties (+43 lines)
Line 0 Link Here
1
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
#
3
# Copyright 2010 Oracle and/or its affiliates. All rights reserved.
4
#
5
# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
6
# Other names may be trademarks of their respective owners.
7
#
8
# The contents of this file are subject to the terms of either the GNU
9
# General Public License Version 2 only ("GPL") or the Common
10
# Development and Distribution License("CDDL") (collectively, the
11
# "License"). You may not use this file except in compliance with the
12
# License. You can obtain a copy of the License at
13
# http://www.netbeans.org/cddl-gplv2.html
14
# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
15
# specific language governing permissions and limitations under the
16
# License.  When distributing the software, include this License Header
17
# Notice in each file and include the License file at
18
# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
19
# particular file as subject to the "Classpath" exception as provided
20
# by Oracle in the GPL Version 2 section of the License file that
21
# accompanied this code. If applicable, add the following below the
22
# License Header, with the fields enclosed by brackets [] replaced by
23
# your own identifying information:
24
# "Portions Copyrighted [year] [name of copyright owner]"
25
#
26
# If you wish your version of this file to be governed by only the CDDL
27
# or only the GPL Version 2, indicate your decision by adding
28
# "[Contributor] elects to include this software in this distribution
29
# under the [CDDL or GPL Version 2] license." If you do not indicate a
30
# single choice of license, a recipient has the option to distribute
31
# your version of this file under either the CDDL, the GPL Version 2 or
32
# to extend the choice of license to its licensees as provided above.
33
# However, if you add GPL Version 2 code and therefore, elected the GPL
34
# Version 2 license, then the option applies only if the new code is
35
# made subject to such option by the copyright holder.
36
#
37
# Contributor(s):
38
#
39
# Portions Copyrighted 2008 Sun Microsystems, Inc.
40
41
OpenIDE-Module-Display-Category=Maven
42
OpenIDE-Module-Name=Maven Archetype API
43
OpenIDE-Module-Long-Description=Maven archetypes related API.
(-)api.maven.archetype/src/org/netbeans/api/maven/archetype/ProjectInfo.java (+108 lines)
Line 0 Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
5
 *
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
 * Other names may be trademarks of their respective owners.
8
 *
9
 * The contents of this file are subject to the terms of either the GNU
10
 * General Public License Version 2 only ("GPL") or the Common
11
 * Development and Distribution License("CDDL") (collectively, the
12
 * "License"). You may not use this file except in compliance with the
13
 * License. You can obtain a copy of the License at
14
 * http://www.netbeans.org/cddl-gplv2.html
15
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16
 * specific language governing permissions and limitations under the
17
 * License.  When distributing the software, include this License Header
18
 * Notice in each file and include the License file at
19
 * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
20
 * particular file as subject to the "Classpath" exception as provided
21
 * by Oracle in the GPL Version 2 section of the License file that
22
 * accompanied this code. If applicable, add the following below the
23
 * License Header, with the fields enclosed by brackets [] replaced by
24
 * your own identifying information:
25
 * "Portions Copyrighted [year] [name of copyright owner]"
26
 *
27
 * If you wish your version of this file to be governed by only the CDDL
28
 * or only the GPL Version 2, indicate your decision by adding
29
 * "[Contributor] elects to include this software in this distribution
30
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
31
 * single choice of license, a recipient has the option to distribute
32
 * your version of this file under either the CDDL, the GPL Version 2 or
33
 * to extend the choice of license to its licensees as provided above.
34
 * However, if you add GPL Version 2 code and therefore, elected the GPL
35
 * Version 2 license, then the option applies only if the new code is
36
 * made subject to such option by the copyright holder.
37
 *
38
 * Contributor(s):
39
 *
40
 * Portions Copyrighted 2009 Sun Microsystems, Inc.
41
 */
42
43
package org.netbeans.api.maven.archetype;
44
45
/**
46
 * Information about one project to be created.
47
 * 
48
 * @author Tomas Stupka
49
 * @since 1.0
50
 */
51
public final class ProjectInfo {
52
    
53
    private final org.netbeans.modules.maven.api.archetype.ProjectInfo delegate;
54
    
55
    /**
56
     * C'tor
57
     * 
58
     * @param groupId the group id
59
     * @param artifactId the artifact id
60
     * @param version the version 
61
     * @param packageName the package name
62
     * @since 1.0
63
     */
64
    public ProjectInfo(String groupId, String artifactId, String version, String packageName) {
65
        delegate = new org.netbeans.modules.maven.api.archetype.ProjectInfo(groupId, artifactId, version, packageName);
66
    }
67
68
    /**
69
     * Returns the group id
70
     * 
71
     * @return 
72
     * @since 1.0
73
     */
74
    public String getGroupId() {
75
        return delegate.groupId;
76
    }
77
78
    /**
79
     * Returns the artifact id.
80
     * 
81
     * @return 
82
     * @since 1.0
83
     */
84
    public String getArtifactId() {
85
        return delegate.artifactId;
86
    }
87
88
    /**
89
     * Returns the version.
90
     * 
91
     * @return 
92
     * @since 1.0
93
     */
94
    public String getVersion() {
95
        return delegate.version;
96
    }
97
98
    /**
99
     * Returns the package name.
100
     * 
101
     * @return 
102
     * @since 1.0
103
     */
104
    public String getPackageName() {
105
        return delegate.packageName;
106
    }
107
    
108
}
(-)api.maven.archetype/test/unit/src/org/netbeans/modules/maven/archetype/api/ArchetypeTest.java (+116 lines)
Line 0 Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
5
 *
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
 * Other names may be trademarks of their respective owners.
8
 *
9
 * The contents of this file are subject to the terms of either the GNU
10
 * General Public License Version 2 only ("GPL") or the Common
11
 * Development and Distribution License("CDDL") (collectively, the
12
 * "License"). You may not use this file except in compliance with the
13
 * License. You can obtain a copy of the License at
14
 * http://www.netbeans.org/cddl-gplv2.html
15
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16
 * specific language governing permissions and limitations under the
17
 * License.  When distributing the software, include this License Header
18
 * Notice in each file and include the License file at
19
 * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
20
 * particular file as subject to the "Classpath" exception as provided
21
 * by Oracle in the GPL Version 2 section of the License file that
22
 * accompanied this code. If applicable, add the following below the
23
 * License Header, with the fields enclosed by brackets [] replaced by
24
 * your own identifying information:
25
 * "Portions Copyrighted [year] [name of copyright owner]"
26
 *
27
 * If you wish your version of this file to be governed by only the CDDL
28
 * or only the GPL Version 2, indicate your decision by adding
29
 * "[Contributor] elects to include this software in this distribution
30
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
31
 * single choice of license, a recipient has the option to distribute
32
 * your version of this file under either the CDDL, the GPL Version 2 or
33
 * to extend the choice of license to its licensees as provided above.
34
 * However, if you add GPL Version 2 code and therefore, elected the GPL
35
 * Version 2 license, then the option applies only if the new code is
36
 * made subject to such option by the copyright holder.
37
 *
38
 * Contributor(s):
39
 *
40
 * Portions Copyrighted 2011 Sun Microsystems, Inc.
41
 */
42
43
package org.netbeans.modules.maven.archetype.api;
44
45
import org.netbeans.api.maven.archetype.Archetype;
46
import org.netbeans.junit.NbTestCase;
47
48
public class ArchetypeTest extends NbTestCase {
49
50
    public ArchetypeTest(String n) {
51
        super(n);
52
    }
53
54
    public void testArchetype() {
55
        Archetype a = createArchetype("aid", "gid", "1.0");
56
        
57
        assertEquals("aid", a.getArtifactId());
58
        assertEquals("gid", a.getGroupId());
59
        assertEquals("1.0", a.getVersion());
60
        assertEquals("aid", a.getName());
61
        assertNull(a.getDescription());
62
        assertNull(a.getRepository());
63
        
64
        Archetype a2 = createArchetype("aid", "gid", "1.0");
65
        assertEquals(a, a2);
66
        assertEquals(a.hashCode(), a2.hashCode());
67
        
68
        a = createArchetype("aid", "gid", "1.0", "test", "test desc", "test repository");
69
        
70
        assertEquals("aid", a.getArtifactId());
71
        assertEquals("gid", a.getGroupId());
72
        assertEquals("1.0", a.getVersion());
73
        assertEquals("test", a.getName());
74
        assertEquals("test desc", a.getDescription());
75
        assertEquals("test repository", a.getRepository());
76
77
        a2 = createArchetype("aid", "gid", "1.0", "test", "test desc", "test repository");
78
        assertEquals(a, a2);
79
        assertEquals(a.hashCode(), a2.hashCode());
80
        
81
    }
82
    
83
    public void testGetName() {
84
        Archetype a = createArchetype("aid", "gid", "1.0");
85
        assertEquals("aid", a.getName());
86
        
87
        a = createArchetype("aid", "gid", "1.0", null, null, null);
88
        assertEquals("aid", a.getName());
89
        
90
        a = createArchetype("aid", "gid", "1.0", "${project.artifactId}", null, null);
91
        assertEquals("aid", a.getName());
92
93
        a = createArchetype("aid", "gid", "1.0", "test name", null, null);
94
        assertEquals("test name", a.getName());
95
    }
96
97
    private Archetype createArchetype(String aid, String gid, String version) {
98
        Archetype a = new Archetype();
99
        a.setArtifactId(aid);
100
        a.setGroupId(gid);
101
        a.setVersion(version);
102
        return a;
103
    }
104
105
    private Archetype createArchetype(String aid, String gid, String version, String name, String desc, String repo) {
106
        Archetype a = new Archetype();
107
        a.setArtifactId(aid);
108
        a.setGroupId(gid);
109
        a.setVersion(version);
110
        a.setName(name);
111
        a.setDescription(desc);
112
        a.setRepository(repo);
113
        return a;
114
    }
115
    
116
}
(-)api.maven.archetype/test/unit/src/org/netbeans/modules/maven/archetype/api/ProjectInfoTest.java (+63 lines)
Line 0 Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
5
 *
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
 * Other names may be trademarks of their respective owners.
8
 *
9
 * The contents of this file are subject to the terms of either the GNU
10
 * General Public License Version 2 only ("GPL") or the Common
11
 * Development and Distribution License("CDDL") (collectively, the
12
 * "License"). You may not use this file except in compliance with the
13
 * License. You can obtain a copy of the License at
14
 * http://www.netbeans.org/cddl-gplv2.html
15
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16
 * specific language governing permissions and limitations under the
17
 * License.  When distributing the software, include this License Header
18
 * Notice in each file and include the License file at
19
 * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
20
 * particular file as subject to the "Classpath" exception as provided
21
 * by Oracle in the GPL Version 2 section of the License file that
22
 * accompanied this code. If applicable, add the following below the
23
 * License Header, with the fields enclosed by brackets [] replaced by
24
 * your own identifying information:
25
 * "Portions Copyrighted [year] [name of copyright owner]"
26
 *
27
 * If you wish your version of this file to be governed by only the CDDL
28
 * or only the GPL Version 2, indicate your decision by adding
29
 * "[Contributor] elects to include this software in this distribution
30
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
31
 * single choice of license, a recipient has the option to distribute
32
 * your version of this file under either the CDDL, the GPL Version 2 or
33
 * to extend the choice of license to its licensees as provided above.
34
 * However, if you add GPL Version 2 code and therefore, elected the GPL
35
 * Version 2 license, then the option applies only if the new code is
36
 * made subject to such option by the copyright holder.
37
 *
38
 * Contributor(s):
39
 *
40
 * Portions Copyrighted 2011 Sun Microsystems, Inc.
41
 */
42
43
package org.netbeans.modules.maven.archetype.api;
44
45
import org.netbeans.api.maven.archetype.ProjectInfo;
46
import org.netbeans.junit.NbTestCase;
47
48
public class ProjectInfoTest extends NbTestCase {
49
50
    public ProjectInfoTest(String n) {
51
        super(n);
52
    }
53
54
    public void testProjectInfo() {
55
        ProjectInfo pi = new ProjectInfo("gid", "aid", "1.0", "package.name");
56
        assertEquals("gid", pi.getGroupId());
57
        assertEquals("aid", pi.getArtifactId());
58
        assertEquals("1.0", pi.getVersion());
59
        assertEquals("package.name", pi.getPackageName());
60
    }
61
    
62
63
}
(-)maven/nbproject/project.xml (+1 lines)
Lines 495-500 Link Here
495
                <friend>org.netbeans.modules.hudson.maven</friend>
495
                <friend>org.netbeans.modules.hudson.maven</friend>
496
                <friend>org.netbeans.modules.jbi.fuji.support</friend>
496
                <friend>org.netbeans.modules.jbi.fuji.support</friend>
497
                <friend>org.netbeans.modules.kenai.maven</friend>
497
                <friend>org.netbeans.modules.kenai.maven</friend>
498
                <friend>org.netbeans.api.maven.archetype</friend>
498
                <friend>org.netbeans.modules.maven.apisupport</friend>
499
                <friend>org.netbeans.modules.maven.apisupport</friend>
499
                <friend>org.netbeans.modules.maven.checkstyle</friend>
500
                <friend>org.netbeans.modules.maven.checkstyle</friend>
500
                <friend>org.netbeans.modules.maven.coverage</friend>
501
                <friend>org.netbeans.modules.maven.coverage</friend>
(-)nbbuild/build.properties (+1 lines)
Lines 99-104 Link Here
99
# List of modules that provide stable javadoc
99
# List of modules that provide stable javadoc
100
config.javadoc.stable=\
100
config.javadoc.stable=\
101
    api.annotations.common,\
101
    api.annotations.common,\
102
    api.maven.archetype,\
102
    autoupdate.services,\
103
    autoupdate.services,\
103
    autoupdate.ui,\
104
    autoupdate.ui,\
104
    core.ide,\
105
    core.ide,\
(-)nbbuild/cluster.properties (+1 lines)
Lines 515-520 Link Here
515
        ant.kit,\
515
        ant.kit,\
516
        api.debugger.jpda,\
516
        api.debugger.jpda,\
517
        api.java,\
517
        api.java,\
518
        api.maven.archetype,\
518
        beans,\
519
        beans,\
519
        classfile,\
520
        classfile,\
520
        dbschema,\
521
        dbschema,\

Return to bug 245153