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 233079
Collapse All | Expand All

(-)a/maven.embedder/nbproject/project.xml (+1 lines)
Lines 158-163 Link Here
158
                </test-type>
158
                </test-type>
159
            </test-dependencies>
159
            </test-dependencies>
160
            <friend-packages>
160
            <friend-packages>
161
                <friend>org.netbeans.modules.maven.util</friend>
161
                <friend>org.netbeans.modules.deploy.ios</friend>
162
                <friend>org.netbeans.modules.deploy.ios</friend>
162
                <friend>org.javeleon.netbeans</friend>
163
                <friend>org.javeleon.netbeans</friend>
163
                <!-- sven reimers -->
164
                <!-- sven reimers -->
(-)a/maven.model/nbproject/project.xml (+1 lines)
Lines 151-156 Link Here
151
                </test-type>
151
                </test-type>
152
            </test-dependencies>
152
            </test-dependencies>
153
            <friend-packages>
153
            <friend-packages>
154
                <friend>org.netbeans.modules.maven.util</friend>
154
                <friend>org.netbeans.modules.deploy.ios</friend>
155
                <friend>org.netbeans.modules.deploy.ios</friend>
155
                <friend>org.javeleon.netbeans</friend>
156
                <friend>org.javeleon.netbeans</friend>
156
                <friend>org.netbeans.modules.groovy.support</friend>
157
                <friend>org.netbeans.modules.groovy.support</friend>
(-)a/maven.util/arch.xml (+1081 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE api-answers PUBLIC "-//NetBeans//DTD Arch Answers//EN" "../nbbuild/antsrc/org/netbeans/nbbuild/Arch.dtd" [
3
  <!ENTITY api-questions SYSTEM "../nbbuild/antsrc/org/netbeans/nbbuild/Arch-api-questions.xml">
4
]>
5
6
<api-answers
7
  question-version="1.29"
8
  author="yourname@netbeans.org"
9
>
10
11
  &api-questions;
12
13
14
<!--
15
        <question id="arch-overall" when="init">
16
            Describe the overall architecture. 
17
            <hint>
18
            What will be API for 
19
            <a href="http://wiki.netbeans.org/API_Design#Separate_API_for_clients_from_support_API">
20
                clients and what support API</a>? 
21
            What parts will be pluggable?
22
            How will plug-ins be registered? Please use <code>&lt;api type="export"/&gt;</code>
23
            to describe your general APIs and specify their
24
            <a href="http://wiki.netbeans.org/API_Stability#Private">
25
            stability categories</a>.
26
            If possible please provide simple diagrams.
27
            </hint>
28
        </question>
29
-->
30
 <answer id="arch-overall">
31
   <p>The purpose of this module is to provide an easy way to read and set Maven
32
      plugin properties in POM.xml project file without having implementation
33
      dependencies on several Maven modules.
34
  </p>
35
  <p>
36
    </p>
37
 </answer>
38
39
40
41
<!--
42
        <question id="arch-quality" when="init">
43
            How will the <a href="http://www.netbeans.org/community/guidelines/q-evangelism.html">quality</a>
44
            of your code be tested and 
45
            how are future regressions going to be prevented?
46
            <hint>
47
            What kind of testing do
48
            you want to use? How much functionality, in which areas,
49
            should be covered by the tests? How you find out that your
50
            project was successful?
51
            </hint>
52
        </question>
53
-->
54
 <answer id="arch-quality">
55
  <p>
56
   All public API methods will be covered by unit tests.
57
  </p>
58
 </answer>
59
60
61
62
<!--
63
        <question id="arch-time" when="init">
64
            What are the time estimates of the work?
65
            <hint>
66
            Please express your estimates of how long the design, implementation,
67
            stabilization are likely to last. How many people will be needed to
68
            implement this and what is the expected milestone by which the work should be 
69
            ready?
70
            </hint>
71
        </question>
72
-->
73
 <answer id="arch-time">
74
  <p>
75
   2 man days.
76
  </p>
77
 </answer>
78
79
80
81
<!--
82
        <question id="arch-usecases" when="init">
83
            <hint>
84
                Content of this answer will be displayed as part of page at
85
                http://www.netbeans.org/download/dev/javadoc/usecases.html 
86
                You can use tags &lt;usecase name="name&gt; regular html description &lt;/usecase&gt;
87
                and if you want to use an URL you can prefix if with @TOP@ to begin
88
                at the root of your javadoc
89
            </hint>
90
        
91
            Describe the main <a href="http://wiki.netbeans.org/API_Design#The_Importance_of_Being_Use_Case_Oriented">
92
            use cases</a> of the new API. Who will use it under
93
            what circumstances? What kind of code would typically need to be written
94
            to use the module?
95
        </question>
96
-->
97
 <answer id="arch-usecases">
98
  <p>
99
   The main use case is implementing a panel to be added to Maven project properties
100
      window to adjust properties of a Maven plugin used in that project.
101
  </p>
102
 </answer>
103
104
105
106
<!--
107
        <question id="arch-what" when="init">
108
            What is this project good for?
109
            <hint>
110
            Please provide here a few lines describing the project, 
111
            what problem it should solve, provide links to documentation, 
112
            specifications, etc.
113
            </hint>
114
        </question>
115
-->
116
 <answer id="arch-what">
117
  <p>
118
   Read and set Maven project properties.
119
  </p>
120
 </answer>
121
122
123
124
<!--
125
        <question id="arch-where" when="impl">
126
            Where one can find sources for your module?
127
            <hint>
128
                Please provide link to the Hg web client at
129
                http://hg.netbeans.org/
130
                or just use tag defaultanswer generate='here'
131
            </hint>
132
        </question>
133
-->
134
 <answer id="arch-where">
135
  <defaultanswer generate='here' />
136
 </answer>
137
138
139
140
<!--
141
        <question id="compat-deprecation" when="init">
142
            How the introduction of your project influences functionality
143
            provided by previous version of the product?
144
            <hint>
145
            If you are planning to deprecate/remove/change any existing APIs,
146
            list them here accompanied with the reason explaining why you
147
            are doing so.
148
            </hint>
149
        </question>
150
-->
151
 <answer id="compat-deprecation">
152
  <p>
153
   This module does not deprecate nor replace any existing APIs.
154
  </p>
155
 </answer>
156
157
158
159
<!--
160
        <question id="compat-i18n" when="impl">
161
            Is your module correctly internationalized?
162
            <hint>
163
            Correct internationalization means that it obeys instructions 
164
            at <a href="http://www.netbeans.org/download/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/i18n-branding.html">
165
            NetBeans I18N pages</a>.
166
            </hint>
167
        </question>
168
-->
169
 <answer id="compat-i18n">
170
  <p>
171
   Does not apply.
172
  </p>
173
 </answer>
174
175
176
177
<!--
178
        <question id="compat-standards" when="init">
179
            Does the module implement or define any standards? Is the 
180
            implementation exact or does it deviate somehow?
181
        </question>
182
-->
183
 <answer id="compat-standards">
184
  <p>
185
   Does not apply.
186
  </p>
187
 </answer>
188
189
190
191
<!--
192
        <question id="compat-version" when="impl">
193
            Can your module coexist with earlier and future
194
            versions of itself? Can you correctly read all old settings? Will future
195
            versions be able to read your current settings? Can you read
196
            or politely ignore settings stored by a future version?
197
            
198
            <hint>
199
            Very helpful for reading settings is to store version number
200
            there, so future versions can decide whether how to read/convert
201
            the settings and older versions can ignore the new ones.
202
            </hint>
203
        </question>
204
-->
205
 <answer id="compat-version">
206
  <p>
207
   Future versions of this module should be backwards compatible.
208
  </p>
209
 </answer>
210
211
212
213
<!--
214
        <question id="dep-jre" when="final">
215
            Which version of JRE do you need (1.2, 1.3, 1.4, etc.)?
216
            <hint>
217
            It is expected that if your module runs on 1.x that it will run 
218
            on 1.x+1 if no, state that please. Also describe here cases where
219
            you run different code on different versions of JRE and why.
220
            </hint>
221
        </question>
222
-->
223
 <answer id="dep-jre">
224
  <p>
225
   Same as the rest of the IDE.
226
  </p>
227
 </answer>
228
229
230
231
<!--
232
        <question id="dep-jrejdk" when="final">
233
            Do you require the JDK or is the JRE enough?
234
        </question>
235
-->
236
 <answer id="dep-jrejdk">
237
  <p>
238
   JDK required.
239
  </p>
240
 </answer>
241
242
243
244
<!--
245
        <question id="dep-nb" when="init">
246
            What other NetBeans projects and modules does this one depend on?
247
            <hint>
248
            Depending on other NetBeans projects influnces the ability of
249
            users of your work to customize their own branded version of
250
            NetBeans by enabling and disabling some modules. Too
251
            much dependencies restrict this kind of customization. If that
252
            is your case, then you may want to split your functionality into
253
            pieces of autoload, eager and regular modules which can be
254
            enabled independently. Usually the answer to this question
255
            is generated from your <code>project.xml</code> file, but
256
            if it is not guessed correctly, you can suppress it by
257
            specifying &lt;defaultanswer generate="none"/&gt; and
258
            write here your own. Please describe such projects as imported APIs using
259
            the <code>&lt;api name="identification" type="import or export" category="stable" url="where is the description" /&gt;</code>.
260
            By doing this information gets listed in the summary page of your
261
            javadoc.
262
            </hint>
263
        </question>
264
-->
265
 <answer id="dep-nb">
266
  <defaultanswer generate='here' />
267
 </answer>
268
269
270
271
<!--
272
        <question id="dep-non-nb" when="init">
273
            What other projects outside NetBeans does this one depend on?
274
            
275
            <hint>
276
            Depending on 3rd party libraries is always problematic,
277
            especially if they are not open source, as that complicates
278
            the licensing scheme of NetBeans. Please enumerate your
279
            external dependencies here, so it is correctly understood since
280
            the begining what are the legal implications of your project.
281
            Also please note that
282
            some non-NetBeans projects are packaged as NetBeans modules
283
            (see <a href="http://libs.netbeans.org/">libraries</a>) and
284
            it is preferred to use this approach when more modules may
285
            depend and share such third-party libraries.
286
            </hint>
287
        </question>
288
-->
289
 <answer id="dep-non-nb">
290
  <p>
291
   No extra dependencies.
292
  </p>
293
 </answer>
294
295
296
297
<!--
298
        <question id="dep-platform" when="init">
299
            On which platforms does your module run? Does it run in the same
300
            way on each?
301
            <hint>
302
            If you plan any dependency on OS or any usage of native code,
303
            please describe why you are doing so and describe how you envision
304
            to enforce the portability of your code.
305
            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">OS conditionally
306
            enabled modules</a> which together with autoload/eager modules
307
            can allow you to enable to provide the best OS aware support
308
            on certain OSes while providing compatibility bridge on the not
309
            supported ones.
310
            Also please list the supported
311
            OSes/HW platforms and mentioned the lovest version of JDK required
312
            for your project to run on. Also state whether JRE is enough or
313
            you really need JDK.
314
            </hint>
315
        </question>
316
-->
317
 <answer id="dep-platform">
318
  <p>
319
   All platforms the IDE supports.
320
  </p>
321
 </answer>
322
323
324
325
<!--
326
        <question id="deploy-dependencies" when="final">
327
            What do other modules need to do to declare a dependency on this one,
328
            in addition to or instead of the normal module dependency declaration
329
            (e.g. tokens to require)?
330
            <hint>
331
                Provide a sample of the actual lines you would add to a module manifest
332
                to declare a dependency, for example OpenIDE-Module-Requires: some.token.
333
                If other modules should not depend on this module, or should just use a
334
                simple regular module dependency, you can just answer "nothing". If you
335
                intentionally expose a semistable API to clients using implementation
336
                dependencies, you should mention that here (but there is no need to give
337
                an example of usage).
338
            </hint>
339
        </question>
340
-->
341
 <answer id="deploy-dependencies">
342
  <p>
343
   No special dependencies.
344
  </p>
345
 </answer>
346
347
348
349
<!--
350
        <question id="deploy-jar" when="impl">
351
            Do you deploy just module JAR file(s) or other files as well?
352
            <hint>
353
            Usually a module consist of one JAR file (perhaps with Class-Path
354
            extensions) and also a configuration file that enables it. If you
355
            have any other files, use
356
            &lt;api group="java.io.File" name="yourname" type="export" category="friend"&gt;...&lt;/api&gt;
357
            to define the location, name and stability of your files (of course
358
            changing "yourname" and "friend" to suit your needs).
359
            
360
            If it uses more than one JAR, describe where they are located, how
361
            they refer to each other. 
362
            If it consist of module JAR(s) and other files, please describe
363
            what is their purpose, why other files are necessary. Please 
364
            make sure that installation/uninstallation leaves the system 
365
            in state as it was before installation.
366
            </hint>
367
        </question>
368
-->
369
 <answer id="deploy-jar">
370
  <p>
371
   Only JAR.
372
  </p>
373
 </answer>
374
375
376
377
<!--
378
        <question id="deploy-nbm" when="impl">
379
            Can you deploy an NBM via the Update Center?
380
            <hint>
381
            If not why?
382
            </hint>
383
        </question>
384
-->
385
 <answer id="deploy-nbm">
386
  <p>
387
   Yes.
388
  </p>
389
 </answer>
390
391
392
393
<!--
394
        <question id="deploy-packages" when="init">
395
            Are packages of your module made inaccessible by not declaring them
396
            public?
397
            
398
            <hint>
399
            By default NetBeans build harness treats all packages are private.
400
            If you export some of them - either as public or friend packages,
401
            you should have a reason. If the reason is described elsewhere
402
            in this document, you can ignore this question.
403
            </hint>
404
        </question>
405
-->
406
 <answer id="deploy-packages">
407
  <p>
408
   There are public packages in this module.
409
      <api name="MavenPluginProperties" group="java" type="export" category="devel" />
410
  </p>
411
 </answer>
412
413
414
415
<!--
416
        <question id="deploy-shared" when="final">
417
            Do you need to be installed in the shared location only, or in the user directory only,
418
            or can your module be installed anywhere?
419
            <hint>
420
            Installation location shall not matter, if it does explain why.
421
            Consider also whether <code>InstalledFileLocator</code> can help.
422
            </hint>
423
        </question>
424
-->
425
 <answer id="deploy-shared">
426
  <p>
427
   No special installation requirements.
428
  </p>
429
 </answer>
430
431
432
433
<!--
434
        <question id="exec-ant-tasks" when="impl">
435
            Do you define or register any ant tasks that other can use?
436
            
437
            <hint>
438
            If you provide an ant task that users can use, you need to be very
439
            careful about its syntax and behaviour, as it most likely forms an
440
	          API for end users and as there is a lot of end users, their reaction
441
            when such API gets broken can be pretty strong.
442
            </hint>
443
        </question>
444
-->
445
 <answer id="exec-ant-tasks">
446
  <p>
447
   No ant tasks.
448
  </p>
449
 </answer>
450
451
452
453
<!--
454
        <question id="exec-classloader" when="impl">
455
            Does your code create its own class loader(s)?
456
            <hint>
457
            A bit unusual. Please explain why and what for.
458
            </hint>
459
        </question>
460
-->
461
 <answer id="exec-classloader">
462
  <p>
463
   No custom class loaders.
464
  </p>
465
 </answer>
466
467
468
469
<!--
470
        <question id="exec-component" when="impl">
471
            Is execution of your code influenced by any (string) property
472
            of any of your components?
473
            
474
            <hint>
475
            Often <code>JComponent.getClientProperty</code>, <code>Action.getValue</code>
476
            or <code>PropertyDescriptor.getValue</code>, etc. are used to influence
477
            a behavior of some code. This of course forms an interface that should
478
            be documented. Also if one depends on some interface that an object
479
            implements (<code>component instanceof Runnable</code>) that forms an
480
            API as well.
481
            </hint>
482
        </question>
483
-->
484
 <answer id="exec-component">
485
  <p>
486
   No
487
  </p>
488
 </answer>
489
490
491
492
<!--
493
        <question id="exec-introspection" when="impl">
494
            Does your module use any kind of runtime type information (<code>instanceof</code>,
495
            work with <code>java.lang.Class</code>, etc.)?
496
            <hint>
497
            Check for cases when you have an object of type A and you also
498
            expect it to (possibly) be of type B and do some special action. That
499
            should be documented. The same applies on operations in meta-level
500
            (Class.isInstance(...), Class.isAssignableFrom(...), etc.).
501
            </hint>
502
        </question>
503
-->
504
 <answer id="exec-introspection">
505
  <p>
506
   No
507
  </p>
508
 </answer>
509
510
511
512
<!--
513
        <question id="exec-privateaccess" when="final">
514
            Are you aware of any other parts of the system calling some of 
515
            your methods by reflection?
516
            <hint>
517
            If so, describe the "contract" as an API. Likely private or friend one, but
518
            still API and consider rewrite of it.
519
            </hint>
520
        </question>
521
-->
522
 <answer id="exec-privateaccess">
523
  <p>
524
   No
525
  </p>
526
 </answer>
527
528
529
530
<!--
531
        <question id="exec-process" when="impl">
532
            Do you execute an external process from your module? How do you ensure
533
            that the result is the same on different platforms? Do you parse output?
534
            Do you depend on result code?
535
            <hint>
536
            If you feed an input, parse the output please declare that as an API.
537
            </hint>
538
        </question>
539
-->
540
 <answer id="exec-process">
541
  <p>
542
   No
543
  </p>
544
 </answer>
545
546
547
548
<!--
549
        <question id="exec-property" when="impl">
550
            Is execution of your code influenced by any environment or
551
            Java system (<code>System.getProperty</code>) property?
552
            On a similar note, is there something interesting that you
553
            pass to <code>java.util.logging.Logger</code>? Or do you observe
554
            what others log?
555
            <hint>
556
            If there is a property that can change the behavior of your 
557
            code, somebody will likely use it. You should describe what it does 
558
            and the <a href="http://wiki.netbeans.org/API_Stability">stability category</a>
559
            of this API. You may use
560
            <pre>
561
                &lt;api type="export" group="property" name="id" category="private" url="http://..."&gt;
562
                    description of the property, where it is used, what it influence, etc.
563
                &lt;/api&gt;            
564
            </pre>
565
            </hint>
566
        </question>
567
-->
568
 <answer id="exec-property">
569
  <p>
570
   No
571
  </p>
572
 </answer>
573
574
575
576
<!--
577
        <question id="exec-reflection" when="impl">
578
            Does your code use Java Reflection to execute other code?
579
            <hint>
580
            This usually indicates a missing or insufficient API in the other
581
            part of the system. If the other side is not aware of your dependency
582
            this contract can be easily broken.
583
            </hint>
584
        </question>
585
-->
586
 <answer id="exec-reflection">
587
  <p>
588
   No
589
  </p>
590
 </answer>
591
592
593
594
<!--
595
        <question id="exec-threading" when="init">
596
            What threading models, if any, does your module adhere to? How the
597
            project behaves with respect to threading?
598
            <hint>
599
                Is your API threadsafe? Can it be accessed from any threads or
600
                just from some dedicated ones? Any special relation to AWT and
601
                its Event Dispatch thread? Also
602
                if your module calls foreign APIs which have a specific threading model,
603
                indicate how you comply with the requirements for multithreaded access
604
                (synchronization, mutexes, etc.) applicable to those APIs.
605
                If your module defines any APIs, or has complex internal structures
606
                that might be used from multiple threads, declare how you protect
607
                data against concurrent access, race conditions, deadlocks, etc.,
608
                and whether such rules are enforced by runtime warnings, errors, assertions, etc.
609
                Examples: a class might be non-thread-safe (like Java Collections); might
610
                be fully thread-safe (internal locking); might require access through a mutex
611
                (and may or may not automatically acquire that mutex on behalf of a client method);
612
                might be able to run only in the event queue; etc.
613
                Also describe when any events are fired: synchronously, asynchronously, etc.
614
                Ideas: <a href="http://core.netbeans.org/proposals/threading/index.html#recommendations">Threading Recommendations</a> (in progress)
615
            </hint>
616
        </question>
617
-->
618
 <answer id="exec-threading">
619
  <p>
620
   All API methods are thread safe.
621
  </p>
622
 </answer>
623
624
625
626
<!--
627
        <question id="format-clipboard" when="impl">
628
            Which data flavors (if any) does your code read from or insert to
629
            the clipboard (by access to clipboard on means calling methods on <code>java.awt.datatransfer.Transferable</code>?
630
            
631
            <hint>
632
            Often Node's deal with clipboard by usage of <code>Node.clipboardCopy, Node.clipboardCut and Node.pasteTypes</code>.
633
            Check your code for overriding these methods.
634
            </hint>
635
        </question>
636
-->
637
 <answer id="format-clipboard">
638
  <p>
639
   No clipboard interaction.
640
  </p>
641
 </answer>
642
643
644
645
<!--
646
        <question id="format-dnd" when="impl">
647
            Which protocols (if any) does your code understand during Drag &amp; Drop?
648
            <hint>
649
            Often Node's deal with clipboard by usage of <code>Node.drag, Node.getDropType</code>. 
650
            Check your code for overriding these methods. Btw. if they are not overridden, they
651
            by default delegate to <code>Node.clipboardCopy, Node.clipboardCut and Node.pasteTypes</code>.
652
            </hint>
653
        </question>
654
-->
655
 <answer id="format-dnd">
656
  <p>
657
   No dnd.
658
  </p>
659
 </answer>
660
661
662
663
<!--
664
        <question id="format-types" when="impl">
665
            Which protocols and file formats (if any) does your module read or write on disk,
666
            or transmit or receive over the network? Do you generate an ant build script?
667
            Can it be edited and modified? 
668
            
669
            <hint>
670
            <p>
671
            Files can be read and written by other programs, modules and users. If they influence
672
            your behaviour, make sure you either document the format or claim that it is a private
673
            api (using the &lt;api&gt; tag). 
674
            </p>
675
            
676
            <p>
677
            If you generate an ant build file, this is very likely going to be seen by end users and
678
            they will be attempted to edit it. You should be ready for that and provide here a link
679
            to documentation that you have for such purposes and also describe how you are going to
680
            understand such files during next release, when you (very likely) slightly change the 
681
            format.
682
            </p>
683
            </hint>
684
        </question>
685
-->
686
 <answer id="format-types">
687
  <p>
688
   No direct disk access.
689
  </p>
690
 </answer>
691
692
693
694
<!--
695
        <question id="lookup-lookup" when="init">
696
            Does your module use <code>org.openide.util.Lookup</code>
697
            or any similar technology to find any components to communicate with? Which ones?
698
            
699
            <hint>
700
            NetBeans is build around a generic registry of services called
701
            lookup. It is preferable to use it for registration and discovery
702
            if possible. See
703
            <a href="http://www.netbeans.org/download/dev/javadoc/org-openide-util/org/openide/util/lookup/doc-files/index.html">
704
            The Solution to Comunication Between Components
705
            </a>. If you do not plan to use lookup and insist usage
706
            of other solution, then please describe why it is not working for
707
            you.
708
            <br/>
709
            When filling the final version of your arch document, please
710
            describe the interfaces you are searching for, where 
711
            are defined, whether you are searching for just one or more of them,
712
            if the order is important, etc. Also classify the stability of such
713
            API contract. Use &lt;api group=&amp;lookup&amp; /&gt; tag, so
714
            your information gets listed in the summary page of your javadoc.
715
            </hint>
716
        </question>
717
-->
718
 <answer id="lookup-lookup">
719
  <p>
720
   Uses Lookup passed into project customizer to find Maven model handle.
721
  </p>
722
 </answer>
723
724
725
726
<!--
727
        <question id="lookup-register" when="final">
728
            Do you register anything into lookup for other code to find?
729
            <hint>
730
            Do you register using layer file or using a declarative annotation such as <code>@ServiceProvider</code>?
731
            Who is supposed to find your component?
732
            </hint>
733
        </question>
734
-->
735
 <answer id="lookup-register">
736
  <p>
737
   No
738
  </p>
739
 </answer>
740
741
742
743
<!--
744
        <question id="lookup-remove" when="final">
745
            Do you remove entries of other modules from lookup?
746
            <hint>
747
            Why? Of course, that is possible, but it can be dangerous. Is the module
748
            your are masking resource from aware of what you are doing?
749
            </hint>
750
        </question>
751
-->
752
 <answer id="lookup-remove">
753
  <p>
754
   No
755
  </p>
756
 </answer>
757
758
759
760
<!--
761
        <question id="perf-exit" when="final">
762
            Does your module run any code on exit?
763
        </question>
764
-->
765
 <answer id="perf-exit">
766
  <p>
767
   No
768
  </p>
769
 </answer>
770
771
772
773
<!--
774
        <question id="perf-huge_dialogs" when="final">
775
            Does your module contain any dialogs or wizards with a large number of
776
            GUI controls such as combo boxes, lists, trees, or text areas?
777
        </question>
778
-->
779
 <answer id="perf-huge_dialogs">
780
  <p>
781
   No
782
  </p>
783
 </answer>
784
785
786
787
<!--
788
        <question id="perf-limit" when="init">
789
            Are there any hard-coded or practical limits in the number or size of
790
            elements your code can handle?
791
            <hint>
792
                Most of algorithms have increasing memory and speed complexity
793
                with respect to size of data they operate on. What is the critical
794
                part of your project that can be seen as a bottleneck with
795
                respect to speed or required memory? What are the practical
796
                sizes of data you tested your project with? What is your estimate
797
                of potential size of data that would cause visible performance
798
                problems? Is there some kind of check to detect such situation
799
                and prevent "hard" crashes - for example the CloneableEditorSupport
800
                checks for size of a file to be opened in editor
801
                and if it is larger than 1Mb it shows a dialog giving the
802
                user the right to decide - e.g. to cancel or commit suicide.
803
            </hint>
804
        </question>
805
-->
806
 <answer id="perf-limit">
807
  <p>
808
   No
809
  </p>
810
 </answer>
811
812
813
814
<!--
815
        <question id="perf-mem" when="final">
816
            How much memory does your component consume? Estimate
817
            with a relation to the number of windows, etc.
818
        </question>
819
-->
820
 <answer id="perf-mem">
821
  <p>
822
   No UI components.
823
  </p>
824
 </answer>
825
826
827
828
<!--
829
        <question id="perf-menus" when="final">
830
            Does your module use dynamically updated context menus, or
831
            context-sensitive actions with complicated and slow enablement logic?
832
            <hint>
833
                If you do a lot of tricks when adding actions to regular or context menus, you can significantly
834
                slow down display of the menu, even when the user is not using your action. Pay attention to
835
                actions you add to the main menu bar, and to context menus of foreign nodes or components. If
836
                the action is conditionally enabled, or changes its display dynamically, you need to check the
837
                impact on performance. In some cases it may be more appropriate to make a simple action that is
838
                always enabled but does more detailed checks in a dialog if it is actually run.
839
            </hint>
840
        </question>
841
-->
842
 <answer id="perf-menus">
843
  <p>
844
   No menus.
845
  </p>
846
 </answer>
847
848
849
850
<!--
851
        <question id="perf-progress" when="final">
852
            Does your module execute any long-running tasks?
853
            
854
            <hint>Long running tasks should never block 
855
            AWT thread as it badly hurts the UI
856
            <a href="http://performance.netbeans.org/responsiveness/issues.html">
857
            responsiveness</a>.
858
            Tasks like connecting over
859
            network, computing huge amount of data, compilation
860
            be done asynchronously (for example
861
            using <code>RequestProcessor</code>), definitively it should 
862
            not block AWT thread.
863
            </hint>
864
        </question>
865
-->
866
 <answer id="perf-progress">
867
  <p>
868
   No long running tasks.
869
  </p>
870
 </answer>
871
872
873
874
<!--
875
        <question id="perf-scale" when="init">
876
            Which external criteria influence the performance of your
877
            program (size of file in editor, number of files in menu, 
878
            in source directory, etc.) and how well your code scales?
879
            <hint>
880
            Please include some estimates, there are other more detailed 
881
            questions to answer in later phases of implementation. 
882
            </hint>
883
        </question>
884
-->
885
 <answer id="perf-scale">
886
  <p>
887
   Does not apply.
888
  </p>
889
 </answer>
890
891
892
893
<!--
894
        <question id="perf-spi" when="init">
895
            How the performance of the plugged in code will be enforced?
896
            <hint>
897
            If you allow foreign code to be plugged into your own module, how
898
            do you enforce that it will behave correctly and quickly and will not
899
            negatively influence the performance of your own module?
900
            </hint>
901
        </question>
902
-->
903
 <answer id="perf-spi">
904
  <p>
905
   No plugged in code.
906
  </p>
907
 </answer>
908
909
910
911
<!--
912
        <question id="perf-startup" when="final">
913
            Does your module run any code on startup?
914
        </question>
915
-->
916
 <answer id="perf-startup">
917
  <p>
918
   No
919
  </p>
920
 </answer>
921
922
923
924
<!--
925
        <question id="perf-wakeup" when="final">
926
            Does any piece of your code wake up periodically and do something
927
            even when the system is otherwise idle (no user interaction)?
928
        </question>
929
-->
930
 <answer id="perf-wakeup">
931
  <p>
932
   No
933
  </p>
934
 </answer>
935
936
937
938
<!--
939
        <question id="resources-file" when="final">
940
            Does your module use <code>java.io.File</code> directly?
941
            
942
            <hint>
943
            NetBeans provide a logical wrapper over plain files called 
944
            <code>org.openide.filesystems.FileObject</code> that
945
            provides uniform access to such resources and is the preferred
946
            way that should be used. But of course there can be situations when
947
            this is not suitable.
948
            </hint>
949
        </question>
950
-->
951
 <answer id="resources-file">
952
  <p>
953
   No
954
  </p>
955
 </answer>
956
957
958
959
<!--
960
        <question id="resources-layer" when="final">
961
            Does your module provide own layer? Does it create any files or
962
            folders in it? What it is trying to communicate by that and with which 
963
            components?
964
            
965
            <hint>
966
            NetBeans allows automatic and declarative installation of resources 
967
            by module layers. Module register files into appropriate places
968
            and other components use that information to perform their task
969
            (build menu, toolbar, window layout, list of templates, set of
970
            options, etc.). 
971
            </hint>
972
        </question>
973
-->
974
 <answer id="resources-layer">
975
  <p>
976
   No
977
  </p>
978
 </answer>
979
980
981
982
<!--
983
        <question id="resources-mask" when="final">
984
            Does your module mask/hide/override any resources provided by other modules in
985
            their layers?
986
            
987
            <hint>
988
            If you mask a file provided by another module, you probably depend
989
            on that and do not want the other module to (for example) change
990
            the file's name. That module shall thus make that file available as an API
991
            of some stability category.
992
            </hint>
993
        </question>
994
-->
995
 <answer id="resources-mask">
996
  <p>
997
   No
998
  </p>
999
 </answer>
1000
1001
1002
1003
<!--
1004
        <question id="resources-preferences" when="final">
1005
            Does your module uses preferences via Preferences API? Does your module use NbPreferences or
1006
            or regular JDK Preferences ? Does it read, write or both ? 
1007
            Does it share preferences with other modules ? If so, then why ?
1008
            <hint>
1009
                You may use
1010
                    &lt;api type="export" group="preferences"
1011
                    name="preference node name" category="private"&gt;
1012
                    description of individual keys, where it is used, what it
1013
                    influences, whether the module reads/write it, etc.
1014
                    &lt;/api&gt;
1015
                Due to XML ID restrictions, rather than /org/netbeans/modules/foo give the "name" as org.netbeans.modules.foo.
1016
                Note that if you use NbPreferences this name will then be the same as the code name base of the module.
1017
            </hint>
1018
        </question>
1019
-->
1020
 <answer id="resources-preferences">
1021
  <p>
1022
   No
1023
  </p>
1024
 </answer>
1025
1026
1027
1028
<!--
1029
        <question id="resources-read" when="final">
1030
            Does your module read any resources from layers? For what purpose?
1031
            
1032
            <hint>
1033
            As this is some kind of intermodule dependency, it is a kind of API.
1034
            Please describe it and classify according to 
1035
            <a href="http://wiki.netbeans.org/API_Design#What_is_an_API.3F">
1036
            common stability categories</a>.
1037
            </hint>
1038
        </question>
1039
-->
1040
 <answer id="resources-read">
1041
  <p>
1042
   No
1043
  </p>
1044
 </answer>
1045
1046
1047
1048
<!--
1049
        <question id="security-grant" when="final">
1050
            Does your code grant additional rights to some other code?
1051
            <hint>Avoid using a class loader that adds extra
1052
            permissions to loaded code unless really necessary.
1053
            Also note that your API implementation
1054
            can also expose unneeded permissions to enemy code by
1055
            calling AccessController.doPrivileged().</hint>
1056
        </question>
1057
-->
1058
 <answer id="security-grant">
1059
  <p>
1060
   No
1061
  </p>
1062
 </answer>
1063
1064
1065
1066
<!--
1067
        <question id="security-policy" when="final">
1068
            Does your functionality require modifications to the standard policy file?
1069
            <hint>Your code might pass control to third-party code not
1070
            coming from trusted domains. This could be code downloaded over the
1071
            network or code coming from libraries that are not bundled
1072
            with NetBeans. Which permissions need to be granted to which domains?</hint>
1073
        </question>
1074
-->
1075
 <answer id="security-policy">
1076
  <p>
1077
   No
1078
  </p>
1079
 </answer>
1080
1081
</api-answers>
(-)a/maven.util/build.xml (+5 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<project basedir="." default="netbeans" name="maven.util">
3
    <description>Builds, tests, and runs the project org.netbeans.modules.maven.util</description>
4
    <import file="../nbbuild/templates/projectized.xml"/>
5
</project>
(-)a/maven.util/manifest.mf (+5 lines)
Line 0 Link Here
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.maven.util/1
3
OpenIDE-Module-Implementation-Version: 1
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/maven/util/Bundle.properties
5
(-)a/maven.util/nbproject/project.properties (+4 lines)
Line 0 Link Here
1
javac.source=1.6
2
javac.compilerargs=-Xlint -Xlint:-serial
3
javadoc.arch=${basedir}/arch.xml
4
spec.version.base=1.0
(-)a/maven.util/nbproject/project.xml (+64 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<project xmlns="http://www.netbeans.org/ns/project/1">
3
    <type>org.netbeans.modules.apisupport.project</type>
4
    <configuration>
5
        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
6
            <code-name-base>org.netbeans.modules.maven.util</code-name-base>
7
            <module-dependencies>
8
                <dependency>
9
                    <code-name-base>org.netbeans.modules.maven</code-name-base>
10
                    <build-prerequisite/>
11
                    <compile-dependency/>
12
                    <run-dependency>
13
                        <release-version>2</release-version>
14
                    </run-dependency>
15
                </dependency>
16
                <dependency>
17
                    <code-name-base>org.netbeans.modules.maven.embedder</code-name-base>
18
                    <build-prerequisite/>
19
                    <compile-dependency/>
20
                    <run-dependency>
21
                        <release-version>2</release-version>
22
                    </run-dependency>
23
                </dependency>
24
                <dependency>
25
                    <code-name-base>org.netbeans.modules.maven.model</code-name-base>
26
                    <build-prerequisite/>
27
                    <compile-dependency/>
28
                    <run-dependency>
29
                        <release-version>1</release-version>
30
                    </run-dependency>
31
                </dependency>
32
                <dependency>
33
                    <code-name-base>org.netbeans.modules.projectapi</code-name-base>
34
                    <build-prerequisite/>
35
                    <compile-dependency/>
36
                    <run-dependency>
37
                        <release-version>1</release-version>
38
                        <specification-version>1.54</specification-version>
39
                    </run-dependency>
40
                </dependency>
41
                <dependency>
42
                    <code-name-base>org.netbeans.modules.xml.xam</code-name-base>
43
                    <build-prerequisite/>
44
                    <compile-dependency/>
45
                    <run-dependency>
46
                        <release-version>1</release-version>
47
                        <specification-version>1.25.0.1</specification-version>
48
                    </run-dependency>
49
                </dependency>
50
                <dependency>
51
                    <code-name-base>org.openide.util.lookup</code-name-base>
52
                    <build-prerequisite/>
53
                    <compile-dependency/>
54
                    <run-dependency>
55
                        <specification-version>8.22</specification-version>
56
                    </run-dependency>
57
                </dependency>
58
            </module-dependencies>
59
            <public-packages>
60
                <package>org.netbeans.modules.maven.util</package>
61
            </public-packages>
62
        </data>
63
    </configuration>
64
</project>
(-)a/maven.util/src/org/netbeans/modules/maven/util/Bundle.properties (+1 lines)
Line 0 Link Here
1
OpenIDE-Module-Name=Maven Utilities
(-)a/maven.util/src/org/netbeans/modules/maven/util/PluginUtilities.java (+157 lines)
Line 0 Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2013 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 2013 Sun Microsystems, Inc.
41
 */
42
package org.netbeans.modules.maven.util;
43
44
import org.apache.maven.project.MavenProject;
45
import org.netbeans.api.project.Project;
46
import org.netbeans.modules.maven.api.NbMavenProject;
47
import org.netbeans.modules.maven.api.PluginPropertyUtils;
48
import org.netbeans.modules.maven.api.customizer.ModelHandle2;
49
import org.netbeans.modules.maven.model.ModelOperation;
50
import org.netbeans.modules.maven.model.pom.Build;
51
import org.netbeans.modules.maven.model.pom.Configuration;
52
import org.netbeans.modules.maven.model.pom.POMComponentFactory;
53
import org.netbeans.modules.maven.model.pom.POMModel;
54
import org.netbeans.modules.maven.model.pom.Plugin;
55
import org.netbeans.modules.maven.model.pom.Properties;
56
import org.openide.util.Lookup;
57
58
59
/**
60
 * Convenience methods to retrieve and set plugin properties in Maven POM.
61
 * 
62
 * @author S. Aubrecht
63
 */
64
public class PluginUtilities {
65
66
67
    /**
68
     * Retrieve Maven plugin version info.
69
     * @param project Maven project.
70
     * @param groupId Plugin's group id.
71
     * @param artifactId Plugin's artifact id.
72
     * @return Version number for the given plugin or null.
73
     */
74
    public static String getPluginVersion(  Project project, String groupId, String artifactId ) {
75
        NbMavenProject nbMaven = project.getLookup().lookup( NbMavenProject.class );
76
77
        return PluginPropertyUtils.getPluginVersion( nbMaven.getMavenProject(), groupId, artifactId );
78
    }
79
80
    /**
81
     * Retrieve Maven plugin configuration property.
82
     * @param project Maven project.
83
     * @param groupId Plugin's group id.
84
     * @param artifactId Plugin's artifact id.
85
     * @param propertyName Property name.
86
     * @return Property value or null if the plugin isn't present in the POM or the property isn't defined.
87
     */
88
    public static String getPluginProperty( Project project, String groupId, String artifactId, String propertyName ) {
89
        NbMavenProject nbMaven = project.getLookup().lookup( NbMavenProject.class );
90
        MavenProject prj = nbMaven.getMavenProject();
91
        String res = prj.getProperties().getProperty( propertyName );
92
        if( res == null ) {
93
            res = PluginPropertyUtils.getPluginProperty( prj, groupId, artifactId, propertyName, null, null );
94
        }
95
        return res;
96
    }
97
98
    /**
99
     * Change/add property for the given Maven plugin.
100
     * @param projectCustomizerLookup Lookup passed into Project customizer.
101
     * @param groupId Plugin's group id.
102
     * @param artifactId Plugin's artifact id.
103
     * @param propertyName Property name
104
     * @param propertyValue Property value
105
     * 
106
     * @see org.netbeans.spi.project.ui.support.ProjectCustomizer
107
     */
108
    public static void setPluginProperty( Lookup projectCustomizerLookup, String groupId, String artifactId, String propertyName, String propertyValue ) {
109
        ModelHandle2 mh = projectCustomizerLookup.lookup( ModelHandle2.class);
110
        mh.addPOMModification( new ParameterOperation( groupId, artifactId, propertyName, propertyValue));
111
    }
112
113
114
    private static class ParameterOperation implements ModelOperation<POMModel> {
115
116
        private final String groupId;
117
        private final String artifactId;
118
        private final String name;
119
        private final String value;
120
121
        public ParameterOperation( String groupId, String artifacId, String paramName, String paramValue ) {
122
            this.groupId = groupId;
123
            this.artifactId = artifacId;
124
            this.name = paramName;
125
            this.value = paramValue;
126
        }
127
128
        @Override
129
        public void performOperation( POMModel model ) {
130
            //new approach, assume all plugins conform to the new setting.
131
            POMComponentFactory fact = model.getFactory();
132
            Properties props = model.getProject().getProperties();
133
            if( props != null ) {
134
                props.setProperty( name, value );
135
            }
136
137
            //check if compiler/resources plugins are configured and update them to ${project.source.encoding expression
138
            Build bld = model.getProject().getBuild();
139
            if( bld == null ) {
140
                return;
141
            }
142
143
            Plugin plugin = bld.findPluginById( groupId, artifactId );
144
            if( plugin != null ) {
145
                Configuration conf = plugin.getConfiguration();
146
                if( conf == null ) {
147
                    conf = fact.createConfiguration();
148
                    plugin.setConfiguration( conf );
149
                }
150
                if( conf != null ) {
151
                    conf.setSimpleParameter( name, value );
152
                }
153
            }
154
155
        }
156
    };
157
}
(-)a/maven/nbproject/project.xml (+1 lines)
Lines 452-457 Link Here
452
                </test-type>
452
                </test-type>
453
            </test-dependencies>
453
            </test-dependencies>
454
            <friend-packages>
454
            <friend-packages>
455
                <friend>org.netbeans.modules.maven.util</friend>
455
                <friend>org.netbeans.modules.deploy.ios</friend>
456
                <friend>org.netbeans.modules.deploy.ios</friend>
456
                <friend>org.javeleon.netbeans</friend>
457
                <friend>org.javeleon.netbeans</friend>
457
                <!-- sven reimers -->
458
                <!-- sven reimers -->

Return to bug 233079