1 package org.codehaus.mojo.axistools.wsdl2java;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.axis.wsdl.toJava.Emitter;
23 import org.apache.maven.artifact.Artifact;
24 import org.codehaus.mojo.axistools.axis.AbstractAxisPlugin;
25 import org.codehaus.mojo.axistools.axis.AxisPluginException;
26 import org.codehaus.mojo.axistools.axis.Mapping;
27 import org.codehaus.plexus.compiler.util.scan.InclusionScanException;
28 import org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner;
29 import org.codehaus.plexus.compiler.util.scan.StaleSourceScanner;
30 import org.codehaus.plexus.compiler.util.scan.mapping.SuffixMapping;
31 import org.codehaus.plexus.util.FileUtils;
32 import org.codehaus.plexus.util.IOUtil;
33 import org.codehaus.plexus.util.PathTool;
34 import org.codehaus.plexus.util.StringUtils;
35
36 import java.io.File;
37 import java.io.FileOutputStream;
38 import java.io.IOException;
39 import java.io.InputStream;
40 import java.io.OutputStream;
41 import java.net.JarURLConnection;
42 import java.net.MalformedURLException;
43 import java.net.URL;
44 import java.net.URLConnection;
45 import java.util.ArrayList;
46 import java.util.HashMap;
47 import java.util.HashSet;
48 import java.util.Iterator;
49 import java.util.List;
50 import java.util.Set;
51 import java.util.StringTokenizer;
52 import java.util.jar.JarEntry;
53
54
55
56
57
58 public class DefaultWSDL2JavaPlugin
59 extends AbstractAxisPlugin
60 implements WSDL2JavaPlugin
61 {
62
63
64
65
66
67 private ArrayList urls;
68
69
70
71
72
73
74 private ArrayList wsdlFiles;
75
76
77
78
79
80
81 private ArrayList sourceDependencies;
82
83
84
85
86
87
88 private File urlDownloadDirectory;
89
90
91
92
93
94
95 private File sourceDependencyDirectory;
96
97
98
99
100
101
102 private boolean useEmitter;
103
104
105
106
107
108
109 private ArrayList mappings;
110
111
112
113
114 private boolean serverSide;
115
116
117
118
119
120
121 private String packageSpace;
122
123
124
125
126 private boolean verbose;
127
128
129
130
131
132
133 private boolean testCases;
134
135
136
137
138
139
140
141 private boolean runTestCasesAsUnitTests;
142
143
144
145
146 private boolean allElements;
147
148
149
150
151 private boolean debug;
152
153
154
155
156 private Integer timeout;
157
158
159
160
161 private boolean noImports;
162
163
164
165
166 private boolean noWrapped;
167
168
169
170
171 private boolean wrapArrays;
172
173
174
175
176 private boolean skeletonDeploy;
177
178
179
180
181 private String namespaceToPackage;
182
183
184
185
186 private File fileNamespaceToPackage;
187
188
189
190
191 private String deployScope;
192
193
194
195
196 private String typeMappingVersion;
197
198
199
200
201 private String factory;
202
203
204
205
206 private ArrayList nsIncludes;
207
208
209
210
211 private ArrayList nsExcludes;
212
213
214
215
216 private boolean helperGen;
217
218
219
220
221 private String username;
222
223
224
225
226 private String password;
227
228
229
230
231 private String implementationClassName;
232
233
234
235
236
237
238 private boolean subPackageByFileName;
239
240
241
242
243
244
245 private File testSourceDirectory;
246
247 public void execute()
248 throws AxisPluginException
249 {
250 if ( !outputDirectory.exists() )
251 {
252 outputDirectory.mkdirs();
253 }
254
255 getLog().info( "about to add compile source root" );
256
257 if ( project != null )
258 {
259 project.addCompileSourceRoot( outputDirectory.getAbsolutePath() );
260 }
261
262
263
264 if ( urls != null )
265 {
266 for ( Iterator i = urls.iterator(); i.hasNext(); )
267 {
268 downloadWSDLFromUrl( (String) i.next() );
269 }
270 }
271
272 if ( sourceDependencies != null )
273 {
274 for ( Iterator i = sourceDependencies.iterator(); i.hasNext(); )
275 {
276 extractWSDLFromSourceDependency( (String) i.next() );
277 }
278 }
279
280 Set wsdlSet = computeStaleWSDLs();
281
282 if ( wsdlSet.isEmpty() )
283 {
284 getLog().info( "Nothing to generate. All WSDL files are up to date." );
285 }
286 else if ( wsdlFiles == null )
287 {
288 for ( Iterator i = wsdlSet.iterator(); i.hasNext(); )
289 {
290 File wsdl = (File) i.next();
291
292 processWsdl( wsdl );
293 }
294 }
295 else
296 {
297
298
299
300
301 for ( Iterator i = wsdlFiles.iterator(); i.hasNext(); )
302 {
303 String wsdlFileName = (String) i.next();
304 File wsdl = getFile( wsdlSet, wsdlFileName );
305
306
307 if ( wsdl == null )
308 {
309 getLog().info( "Skipping up to date wsdl: " + wsdlFileName + "." );
310 continue;
311 }
312
313 processWsdl( wsdl );
314 }
315 }
316
317 if ( runTestCasesAsUnitTests )
318 {
319 migrateTestSource();
320 }
321 }
322
323 private void processWsdl( File wsdl )
324 throws AxisPluginException
325 {
326 getLog().info( "Processing wsdl: " + wsdl.toString() );
327
328 if ( !useEmitter )
329 {
330 WSDL2JavaWrapper wsdlWrapper = new WSDL2JavaWrapper();
331 wsdlWrapper.execute( generateWSDLArgumentList( wsdl.getAbsoluteFile() ) );
332 }
333 else
334 {
335 runEmitter( wsdl );
336 }
337
338 try
339 {
340 FileUtils.copyFileToDirectory( wsdl, timestampDirectory );
341 }
342 catch ( IOException e )
343 {
344 throw new AxisPluginException( "Error while copying the WSDL to timestamp directory.", e );
345 }
346 }
347
348
349
350
351
352
353
354
355 private File getFile( Set fileSet, String fileName )
356 {
357 for ( Iterator iterator = fileSet.iterator(); iterator.hasNext(); )
358 {
359 File file = (File) iterator.next();
360 if ( file.getName().equals( fileName ) )
361 {
362 return file;
363 }
364 }
365 return null;
366 }
367
368
369
370
371
372
373
374
375
376
377
378
379 private void downloadWSDLFromUrl( String urlStr )
380 throws AxisPluginException
381 {
382 URLConnection urlConnection;
383 try
384 {
385 URL url = new URL( urlStr );
386 urlConnection = url.openConnection();
387 }
388 catch ( Exception e )
389 {
390 throw new AxisPluginException( "unable to open connection for download of WSDL file from URL " + urlStr
391 + ". Reason: " + e.getClass().getName() + ": " + e.getMessage(), e );
392 }
393
394 File localWsdl = new File( urlDownloadDirectory, createSafeFileName( urlStr ) );
395
396
397 if ( localWsdl.exists() && localWsdl.lastModified() == urlConnection.getLastModified() )
398 {
399 getLog().debug( "local copy of WSDL file from URL " + urlStr + " is up to date." );
400 return;
401 }
402
403
404
405
406 if ( !urlDownloadDirectory.exists() )
407 {
408 urlDownloadDirectory.mkdirs();
409 }
410
411 InputStream urlInput = null;
412 OutputStream localWsdlOutput = null;
413 try
414 {
415 urlInput = urlConnection.getInputStream();
416 localWsdlOutput = new FileOutputStream( localWsdl );
417
418 IOUtil.copy( urlInput, localWsdlOutput );
419 localWsdlOutput.flush();
420
421 getLog().info( "downloaded WSDL from URL " + urlStr + " (" + localWsdl.length() + " Bytes)." );
422
423 }
424 catch ( Exception e )
425 {
426 throw new AxisPluginException( "unable to download WSDL file from " + urlStr + " to "
427 + localWsdl.getAbsolutePath() + ". Reason: " + e.getClass().getName() + ": " + e.getMessage(), e );
428 }
429 finally
430 {
431 IOUtil.close( urlInput );
432 IOUtil.close( localWsdlOutput );
433 }
434
435 localWsdl.setLastModified( urlConnection.getLastModified() );
436 }
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451 private void extractWSDLFromSourceDependency( String sourceDependencyString )
452 throws AxisPluginException
453 {
454 StringTokenizer strtok = new StringTokenizer( sourceDependencyString, ":" );
455
456 if ( strtok.countTokens() != 4 )
457 {
458 throw new AxisPluginException( "invalid sourceDependency: " + sourceDependencyString
459 + ". Expected format: groupId:artifactId:version:file" );
460 }
461
462 String groupId = strtok.nextToken();
463 String artifactId = strtok.nextToken();
464 String version = strtok.nextToken();
465 String wsdlFileString = strtok.nextToken();
466
467 JarEntry entry;
468 JarURLConnection jarConnection;
469 try
470 {
471 Artifact artifact = artifactFactory.createArtifact( groupId, artifactId, version, null, "jar" );
472
473 URL url = new URL( "jar:file:" + localRepository.getBasedir() + File.separator
474 + localRepository.pathOf( artifact ) + "!" + wsdlFileString );
475
476 jarConnection = (JarURLConnection) url.openConnection();
477
478 entry = jarConnection.getJarEntry();
479 if ( entry == null )
480 {
481 throw new AxisPluginException( "unable to find " + wsdlFileString
482 + " in artifact of sourceDependency " + sourceDependencyString + "." );
483 }
484 }
485 catch ( Exception e )
486 {
487 throw new AxisPluginException( "unable to open JAR URL connection for extraction of "
488 + "WSDL file from artifact of sourceDependency " + sourceDependencyString + ". Reason: "
489 + e.getClass().getName() + ": " + e.getMessage(), e );
490 }
491
492 File localWsdl = new File( sourceDependencyDirectory, createSafeFileName( sourceDependencyString ) );
493
494
495
496 if ( localWsdl.exists() && entry.getTime() == localWsdl.lastModified() )
497 {
498 getLog().debug( "local copy of WSDL file from artifact of sourceDependency " + sourceDependencyString
499 + " is up to date." );
500 return;
501 }
502
503
504
505
506 if ( !sourceDependencyDirectory.exists() )
507 {
508 sourceDependencyDirectory.mkdirs();
509 }
510
511 InputStream jarWsdlInput = null;
512 FileOutputStream localWsdlOutput = null;
513 try
514 {
515 jarWsdlInput = jarConnection.getInputStream();
516 localWsdlOutput = new FileOutputStream( localWsdl );
517
518 IOUtil.copy( jarWsdlInput, localWsdlOutput );
519 localWsdlOutput.flush();
520
521 getLog().info( "extracted WSDL from sourceDependency " + sourceDependencyString + " ("
522 + localWsdl.length() + " Bytes)." );
523 }
524 catch ( Exception e )
525 {
526 throw new AxisPluginException( "unable to retrieve " + wsdlFileString
527 + " from artifact of sourceDependency " + sourceDependencyString + ".", e );
528 }
529 finally
530 {
531 IOUtil.close( jarWsdlInput );
532 IOUtil.close( localWsdlOutput );
533 }
534
535 localWsdl.setLastModified( entry.getTime() );
536 }
537
538
539
540
541 private void migrateTestSource()
542 throws AxisPluginException
543 {
544 if ( !testSourceDirectory.exists() )
545 {
546 testSourceDirectory.mkdirs();
547 }
548
549 Set testSources = locateTestSources();
550
551 for ( Iterator iter = testSources.iterator(); iter.hasNext(); )
552 {
553 File source = (File) iter.next();
554
555 try
556 {
557 FileUtils.copyFileToDirectory( source, getDestinationDirectory( source ) );
558 FileUtils.fileDelete( source.getAbsolutePath() );
559 }
560 catch ( IOException ioe )
561 {
562 throw new AxisPluginException( "error copying test sources", ioe );
563 }
564 }
565
566 project.addTestCompileSourceRoot( testSourceDirectory.getPath() );
567 }
568
569
570
571
572
573
574
575
576
577
578 private File getDestinationDirectory( File source )
579 {
580 String relativeFilePath = PathTool.getRelativeFilePath( outputDirectory.getAbsolutePath(),
581 source.getAbsolutePath() );
582 String relativePath = FileUtils.getPath( relativeFilePath );
583 if ( StringUtils.isEmpty( relativePath ) && packageSpace != null )
584 {
585 relativePath = StringUtils.replace( packageSpace, '.', File.separatorChar );
586 }
587 return new File( testSourceDirectory, relativePath );
588 }
589
590
591
592
593
594
595
596 private String[] generateWSDLArgumentList( File wsdl )
597 throws AxisPluginException
598 {
599 ArrayList argsList = new ArrayList();
600
601 if ( debug )
602 {
603 argsList.add( "--Debug" );
604 }
605
606 if ( verbose )
607 {
608 argsList.add( "-v" );
609 }
610
611 argsList.add( "-o" );
612 argsList.add( outputDirectory.getAbsolutePath() );
613
614 if ( serverSide )
615 {
616 argsList.add( "-s" );
617 }
618
619 if ( testCases )
620 {
621 argsList.add( "-t" );
622 }
623
624 if ( allElements )
625 {
626 argsList.add( "-a" );
627 }
628
629 if ( noImports )
630 {
631 argsList.add( "-n" );
632 }
633
634 if ( timeout != null )
635 {
636 argsList.add( "-O" );
637 argsList.add( timeout.toString() );
638 }
639
640 if ( noWrapped )
641 {
642 argsList.add( "-W" );
643 }
644
645 if ( wrapArrays )
646 {
647 argsList.add( "-w" );
648 }
649
650 if ( skeletonDeploy )
651 {
652 argsList.add( "-S" );
653 argsList.add( "true" );
654 }
655
656 if ( mappings != null && mappings.size() > 0 )
657 {
658 if ( packageSpace == null )
659 {
660 Iterator iter = mappings.iterator();
661 while ( iter.hasNext() )
662 {
663 Mapping mapping = (Mapping) iter.next();
664 argsList.add( "-N" + mapping.getNamespace() + "=" + mapping.getTargetPackage() );
665 }
666 }
667 else
668 {
669 throw new AxisPluginException( "mappings and packageSpace can not be used together" );
670 }
671 }
672
673 if ( fileNamespaceToPackage != null )
674 {
675 argsList.add( "-f" );
676 argsList.add( fileNamespaceToPackage.getAbsolutePath() );
677 }
678
679 if ( deployScope != null )
680 {
681 argsList.add( "-d" );
682 argsList.add( deployScope );
683 }
684
685 if ( typeMappingVersion != null )
686 {
687 if ( "1.1".equals( typeMappingVersion ) || "1.2".equals( typeMappingVersion ) )
688 {
689 argsList.add( "-T" );
690 argsList.add( typeMappingVersion );
691 }
692 else
693 {
694 throw new AxisPluginException( "invalid typeMappingVersion (1.1 or 1.2)" );
695 }
696 }
697
698 if ( factory != null )
699 {
700 argsList.add( "-F" );
701 argsList.add( factory );
702 }
703
704 if ( nsIncludes != null )
705 {
706 for ( Iterator i = nsIncludes.iterator(); i.hasNext(); )
707 {
708 argsList.add( "-i" );
709 argsList.add( i.next() );
710 }
711 }
712
713 if ( nsExcludes != null )
714 {
715 for ( Iterator i = nsExcludes.iterator(); i.hasNext(); )
716 {
717 argsList.add( "-x" );
718 argsList.add( i.next() );
719 }
720 }
721
722 if ( helperGen )
723 {
724 argsList.add( "-H" );
725 }
726
727 if ( username != null )
728 {
729 argsList.add( "-U" );
730 argsList.add( username );
731 }
732
733 if ( password != null )
734 {
735 argsList.add( "-P" );
736 argsList.add( password );
737 }
738
739 if ( implementationClassName != null )
740 {
741 argsList.add( "-c" );
742 argsList.add( implementationClassName );
743 }
744
745 if ( packageSpace != null && !subPackageByFileName )
746 {
747 argsList.add( "-p" );
748 argsList.add( packageSpace );
749 }
750 else if ( packageSpace != null && subPackageByFileName )
751 {
752 argsList.add( "-p" );
753 argsList.add( packageSpace + "." + FileUtils.basename( wsdl.getAbsolutePath(), ".wsdl" ) );
754 }
755
756 argsList.add( wsdl.toURI().toString() );
757
758 getLog().debug( "argslist: " + argsList.toString() );
759
760 return (String[]) argsList.toArray( new String[argsList.size()] );
761 }
762
763
764
765
766
767
768 private Set locateTestSources()
769 throws AxisPluginException
770 {
771 SuffixMapping mapping = new SuffixMapping( "TestCase.java", "TestCase.class" );
772
773 SourceInclusionScanner scanner = new StaleSourceScanner();
774
775 scanner.addSourceMapping( mapping );
776
777 Set testSources = new HashSet();
778
779 try
780 {
781 testSources.addAll( scanner.getIncludedSources( outputDirectory, testSourceDirectory ) );
782 }
783 catch ( InclusionScanException e )
784 {
785 throw new AxisPluginException(
786 "Error scanning source root: \'" + outputDirectory + "\' for stale wsdls to reprocess.", e );
787 }
788
789 return testSources;
790 }
791
792 private Set computeStaleWSDLs()
793 throws AxisPluginException
794 {
795 SuffixMapping mapping = new SuffixMapping( ".wsdl", ".wsdl" );
796
797 SourceInclusionScanner scanner = new StaleSourceScanner( staleMillis );
798
799 scanner.addSourceMapping( mapping );
800
801 Set staleSources = new HashSet();
802
803 try
804 {
805 if ( ( sourceDirectory != null ) && sourceDirectory.exists() )
806 {
807 staleSources.addAll( scanner.getIncludedSources( sourceDirectory, timestampDirectory ) );
808 }
809
810 if ( ( urlDownloadDirectory != null ) && urlDownloadDirectory.exists() )
811 {
812 staleSources.addAll( scanner.getIncludedSources( urlDownloadDirectory, timestampDirectory ) );
813 }
814
815 if ( ( sourceDependencyDirectory != null ) && sourceDependencyDirectory.exists() )
816 {
817 staleSources.addAll( scanner.getIncludedSources( sourceDependencyDirectory, timestampDirectory ) );
818 }
819 }
820 catch ( InclusionScanException e )
821 {
822 throw new AxisPluginException(
823 "Error scanning source root: \'" + sourceDirectory + "\' for stale wsdls to reprocess.", e );
824 }
825
826 return staleSources;
827 }
828
829 private void runEmitter( File wsdl )
830 throws AxisPluginException
831 {
832 Emitter emitter = new Emitter();
833 if ( mappings != null )
834 {
835 getLog().debug( "mappings size : " + mappings.size() );
836 HashMap mappingMap = this.getNamespaceMap( mappings );
837 getLog().debug( "mappingMap size : " + mappingMap.size() );
838 emitter.setNamespaceMap( mappingMap );
839 }
840
841 URL wsdlUrl;
842
843 try
844 {
845 wsdlUrl = wsdl.toURL();
846 }
847 catch ( MalformedURLException e )
848 {
849 throw new AxisPluginException( "error processing " + wsdl.getAbsolutePath(), e );
850 }
851
852 getLog().debug( "wsdlUrl.toExternalForm() " + wsdlUrl.toExternalForm() );
853
854
855 emitter.setAllWanted( allElements );
856
857
858 emitter.setDebug( debug );
859
860
861
862 if ( StringUtils.isNotEmpty( factory ) )
863 {
864 emitter.setFactory( factory );
865 }
866 emitter.setHelperWanted( helperGen );
867
868 if ( StringUtils.isNotEmpty( implementationClassName ) )
869 {
870 emitter.setImplementationClassName( implementationClassName );
871 }
872
873
874 emitter.setImports( !noImports );
875
876
877 emitter.setNamespaceExcludes( nsExcludes == null ? java.util.Collections.EMPTY_LIST : nsExcludes );
878
879
880 emitter.setNamespaceIncludes( nsIncludes == null ? java.util.Collections.EMPTY_LIST : nsIncludes );
881
882 emitter.setNowrap( noWrapped );
883
884 if ( StringUtils.isNotEmpty( namespaceToPackage ) )
885 {
886 emitter.setNStoPkg( namespaceToPackage );
887 }
888 emitter.setOutputDir( outputDirectory.getPath() );
889
890 if ( StringUtils.isNotEmpty( packageSpace ) )
891 {
892 emitter.setPackageName( packageSpace );
893 }
894 emitter.setPassword( password );
895
896
897
898
899
900
901 emitter.setServerSide( serverSide );
902
903
904 emitter.setSkeletonWanted( skeletonDeploy );
905 emitter.setTestCaseWanted( testCases );
906
907
908
909 emitter.setTypeMappingVersion( typeMappingVersion );
910 emitter.setUsername( username );
911 emitter.setVerbose( verbose );
912
913 emitter.setWrapArrays( wrapArrays );
914 try
915 {
916 emitter.run( wsdlUrl.toExternalForm() );
917 }
918 catch ( Exception e )
919 {
920 throw new AxisPluginException( "error running " + wsdlUrl.toExternalForm(), e );
921 }
922 }
923
924 protected HashMap getNamespaceMap( List mappings )
925 {
926 HashMap namespaceMap = new HashMap( mappings.size() );
927 for ( int i = 0, size = mappings.size(); i < size; i++ )
928 {
929 Mapping mapping = (Mapping) mappings.get( i );
930 getLog().debug( "mapping " + mappings.toString() );
931 namespaceMap.put( mapping.getNamespace(), mapping.getTargetPackage() );
932 }
933 return namespaceMap;
934
935 }
936
937 public void setUrls( ArrayList urls )
938 {
939 this.urls = urls;
940 }
941
942 public void setWsdlFiles( ArrayList wsdlFiles )
943 {
944 this.wsdlFiles = wsdlFiles;
945 }
946
947 public void setSourceDependencies( ArrayList sourceDependencies )
948 {
949 this.sourceDependencies = sourceDependencies;
950 }
951
952 public void setUrlDownloadDirectory( File urlDownloadDirectory )
953 {
954 this.urlDownloadDirectory = urlDownloadDirectory;
955 }
956
957 public void setSourceDependencyDirectory( File sourceDependencyDirectory )
958 {
959 this.sourceDependencyDirectory = sourceDependencyDirectory;
960 }
961
962 public void setUseEmitter( boolean useEmitter )
963 {
964 this.useEmitter = useEmitter;
965 }
966
967 public void setMappings( ArrayList mappings )
968 {
969 this.mappings = mappings;
970 }
971
972 public void setServerSide( boolean serverSide )
973 {
974 this.serverSide = serverSide;
975 }
976
977 public void setPackageSpace( String packageSpace )
978 {
979 this.packageSpace = packageSpace;
980 }
981
982 public void setVerbose( boolean verbose )
983 {
984 this.verbose = verbose;
985 }
986
987 public void setTestCases( boolean testCases )
988 {
989 this.testCases = testCases;
990 }
991
992 public void setRunTestCasesAsUnitTests( boolean runTestCasesAsUnitTests )
993 {
994 this.runTestCasesAsUnitTests = runTestCasesAsUnitTests;
995 }
996
997 public void setAllElements( boolean allElements )
998 {
999 this.allElements = allElements;
1000 }
1001
1002 public void setDebug( boolean debug )
1003 {
1004 this.debug = debug;
1005 }
1006
1007 public void setTimeout( Integer timeout )
1008 {
1009 this.timeout = timeout;
1010 }
1011
1012 public void setNoImports( boolean noImports )
1013 {
1014 this.noImports = noImports;
1015 }
1016
1017 public void setNoWrapped( boolean noWrapped )
1018 {
1019 this.noWrapped = noWrapped;
1020 }
1021
1022 public void setWrapArrays( boolean wrapArrays )
1023 {
1024 this.wrapArrays = wrapArrays;
1025 }
1026
1027 public void setSkeletonDeploy( boolean skeletonDeploy )
1028 {
1029 this.skeletonDeploy = skeletonDeploy;
1030 }
1031
1032 public void setNamespaceToPackage( String namespaceToPackage )
1033 {
1034 this.namespaceToPackage = namespaceToPackage;
1035 }
1036
1037 public void setFileNamespaceToPackage( File fileNamespaceToPackage )
1038 {
1039 this.fileNamespaceToPackage = fileNamespaceToPackage;
1040 }
1041
1042 public void setDeployScope( String deployScope )
1043 {
1044 this.deployScope = deployScope;
1045 }
1046
1047 public void setTypeMappingVersion( String typeMappingVersion )
1048 {
1049 this.typeMappingVersion = typeMappingVersion;
1050 }
1051
1052 public void setFactory( String factory )
1053 {
1054 this.factory = factory;
1055 }
1056
1057 public void setNsIncludes( ArrayList nsIncludes )
1058 {
1059 this.nsIncludes = nsIncludes;
1060 }
1061
1062 public void setNsExcludes( ArrayList nsExcludes )
1063 {
1064 this.nsExcludes = nsExcludes;
1065 }
1066
1067 public void setHelperGen( boolean helperGen )
1068 {
1069 this.helperGen = helperGen;
1070 }
1071
1072 public void setUsername( String username )
1073 {
1074 this.username = username;
1075 }
1076
1077 public void setPassword( String password )
1078 {
1079 this.password = password;
1080 }
1081
1082 public void setImplementationClassName( String implementationClassName )
1083 {
1084 this.implementationClassName = implementationClassName;
1085 }
1086
1087 public void setSubPackageByFileName( boolean subPackageByFileName )
1088 {
1089 this.subPackageByFileName = subPackageByFileName;
1090 }
1091
1092 public void setTestSourceDirectory( File testSourceDirectory )
1093 {
1094 this.testSourceDirectory = testSourceDirectory;
1095 }
1096 }