Merge lp:~james-page/ubuntu/natty/groovy/fix-661230 into lp:ubuntu/natty/groovy

Proposed by James Page
Status: Merged
Merge reported by: James Page
Merged at revision: not available
Proposed branch: lp:~james-page/ubuntu/natty/groovy/fix-661230
Merge into: lp:ubuntu/natty/groovy
Diff against target: 81860 lines (+37105/-21914)
512 files modified
.pc/.quilt_patches (+1/-0)
.pc/.quilt_series (+1/-0)
.pc/0001-start-scripts.patch/src/bin/startGroovy (+271/-0)
.pc/0002-ant-build.diff.patch/build.xml (+902/-0)
.pc/0002-ant-build.diff.patch/config/ant/build-setup.xml (+78/-0)
.pc/0003-disable-bnd.diff.patch/build.xml (+910/-0)
.pc/ant-build.diff/build.xml (+0/-865)
.pc/ant-build.diff/config/ant/build-setup.xml (+0/-78)
.pc/applied-patches (+3/-3)
.pc/disable-bnd.diff/build.xml (+0/-872)
.pc/start-scripts.patch/src/bin/startGroovy (+0/-272)
build.properties (+3/-5)
build.xml (+120/-82)
config/ant/build-maven.xml (+16/-6)
config/bnd/groovy-all-jdk14.bnd (+0/-4)
config/bnd/groovy-jdk14.bnd (+0/-4)
config/checkstyle/codeHeader.txt (+15/-0)
config/checkstyle/config.xml (+3/-0)
config/maven/groovy-tools.pom (+3/-3)
config/maven/settings.xml (+10/-0)
debian/README.Debian (+19/-0)
debian/changelog (+46/-48)
debian/compat (+1/-1)
debian/control (+5/-5)
debian/copyright (+18/-2)
debian/groovy.links (+1/-0)
debian/patches/0001-start-scripts.patch (+44/-0)
debian/patches/0002-ant-build.diff.patch (+174/-0)
debian/patches/0003-disable-bnd.diff.patch (+23/-0)
debian/patches/ant-build.diff (+0/-172)
debian/patches/disable-bnd.diff (+0/-13)
debian/patches/series (+3/-3)
debian/patches/start-scripts.patch (+0/-34)
debian/rules (+2/-1)
pom.xml (+75/-34)
security/groovy.policy (+0/-4)
src/bin/grape.bat (+3/-2)
src/bin/groovy.bat (+3/-2)
src/bin/groovyConsole.bat (+3/-2)
src/bin/groovyc.bat (+3/-2)
src/bin/groovydoc (+33/-0)
src/bin/groovydoc.bat (+19/-0)
src/bin/groovysh.bat (+3/-2)
src/bin/java2groovy.bat (+1/-0)
src/bin/startGroovy (+4/-5)
src/bin/startGroovy.bat (+3/-2)
src/examples/transforms/global/LoggingASTTransformation.groovy (+1/-1)
src/examples/transforms/global/LoggingExample.groovy (+1/-1)
src/examples/transforms/global/META-INF/services/org.codehaus.groovy.transform.ASTTransformation (+1/-2)
src/examples/transforms/local/LoggingASTTransformation.groovy (+1/-1)
src/examples/transforms/local/LoggingExample.groovy (+1/-1)
src/examples/transforms/local/WithLogging.groovy (+2/-2)
src/main/groovy/grape/GrapeIvy.groovy (+12/-7)
src/main/groovy/inspect/swingui/TableSorter.java (+1/-4)
src/main/groovy/io/FileType.java (+28/-0)
src/main/groovy/io/FileVisitResult.java (+32/-0)
src/main/groovy/jmx/builder/JmxBeanFactory.groovy (+56/-56)
src/main/groovy/jmx/builder/JmxBeansFactory.groovy (+13/-4)
src/main/groovy/jmx/builder/package-info.groovy (+20/-0)
src/main/groovy/lang/Closure.java (+61/-3)
src/main/groovy/lang/Delegate.java (+14/-3)
src/main/groovy/lang/ExpandoMetaClass.java (+668/-514)
src/main/groovy/lang/ExpandoMetaClassCreationHandle.java (+1/-1)
src/main/groovy/lang/GroovyClassLoader.java (+137/-122)
src/main/groovy/lang/GroovyCodeSource.java (+16/-1)
src/main/groovy/lang/GroovyShell.java (+55/-6)
src/main/groovy/lang/Immutable.java (+23/-8)
src/main/groovy/lang/IntRange.java (+12/-4)
src/main/groovy/lang/Lazy.java (+95/-23)
src/main/groovy/lang/MapWithDefault.java (+102/-0)
src/main/groovy/lang/MetaBeanProperty.java (+10/-5)
src/main/groovy/lang/MetaClass.java (+4/-4)
src/main/groovy/lang/MetaClassImpl.java (+47/-37)
src/main/groovy/lang/MetaClassRegistry.java (+39/-16)
src/main/groovy/lang/MutableMetaClass.java (+3/-3)
src/main/groovy/lang/ObjectRange.java (+16/-4)
src/main/groovy/lang/Range.java (+2/-2)
src/main/groovy/lang/Reference.java (+8/-6)
src/main/groovy/lang/Script.java (+39/-1)
src/main/groovy/lang/Writable.java (+2/-2)
src/main/groovy/mock/interceptor/Demand.groovy (+9/-6)
src/main/groovy/mock/interceptor/Ignore.groovy (+43/-0)
src/main/groovy/mock/interceptor/LooseExpectation.groovy (+16/-12)
src/main/groovy/mock/interceptor/MockFor.groovy (+224/-45)
src/main/groovy/mock/interceptor/MockInterceptor.groovy (+20/-9)
src/main/groovy/mock/interceptor/MockProxyMetaClass.java (+106/-26)
src/main/groovy/mock/interceptor/StrictExpectation.groovy (+14/-10)
src/main/groovy/mock/interceptor/StubFor.groovy (+115/-65)
src/main/groovy/servlet/AbstractHttpServlet.java (+33/-29)
src/main/groovy/servlet/TemplateServlet.java (+22/-1)
src/main/groovy/sql/BatchingStatementWrapper.java (+84/-0)
src/main/groovy/sql/DataSet.java (+30/-5)
src/main/groovy/sql/Sql.java (+703/-167)
src/main/groovy/sql/SqlWithParams.java (+21/-0)
src/main/groovy/swing/LookAndFeelHelper.groovy (+31/-3)
src/main/groovy/swing/SwingBuilder.groovy (+2/-2)
src/main/groovy/swing/factory/BindGroupFactory.groovy (+16/-5)
src/main/groovy/swing/factory/RendererFactory.groovy (+1/-1)
src/main/groovy/swing/impl/ClosureRenderer.java (+1/-1)
src/main/groovy/text/XmlTemplateEngine.java (+2/-2)
src/main/groovy/time/BaseDuration.java (+2/-2)
src/main/groovy/time/TimeCategory.java (+9/-9)
src/main/groovy/transform/IndexedProperty.java (+70/-0)
src/main/groovy/transform/InheritConstructors.java (+112/-0)
src/main/groovy/transform/Synchronized.java (+116/-0)
src/main/groovy/ui/Console.groovy (+231/-77)
src/main/groovy/ui/ConsoleActions.groovy (+19/-1)
src/main/groovy/ui/ConsoleApplet.groovy (+16/-4)
src/main/groovy/ui/ConsoleTextEditor.java (+1/-4)
src/main/groovy/ui/ConsoleView.groovy (+2/-16)
src/main/groovy/ui/GroovyMain.java (+4/-2)
src/main/groovy/ui/SystemOutputInterceptor.java (+31/-7)
src/main/groovy/ui/text/TextEditor.java (+4/-3)
src/main/groovy/ui/view/BasicContentPane.groovy (+19/-4)
src/main/groovy/ui/view/BasicMenuBar.groovy (+18/-0)
src/main/groovy/ui/view/BasicStatusBar.groovy (+15/-0)
src/main/groovy/ui/view/BasicToolBar.groovy (+16/-0)
src/main/groovy/ui/view/Defaults.groovy (+15/-0)
src/main/groovy/ui/view/GTKDefaults.groovy (+15/-0)
src/main/groovy/ui/view/MacOSXDefaults.groovy (+15/-0)
src/main/groovy/ui/view/MacOSXMenuBar.groovy (+18/-0)
src/main/groovy/ui/view/WindowsDefaults.groovy (+15/-0)
src/main/groovy/util/AntBuilder.java (+83/-39)
src/main/groovy/util/CliBuilder.groovy (+287/-55)
src/main/groovy/util/ConfigSlurper.groovy (+3/-2)
src/main/groovy/util/GroovyScriptEngine.java (+78/-34)
src/main/groovy/util/GroovyTestCase.java (+57/-17)
src/main/groovy/util/GroovyTestSuite.java (+3/-3)
src/main/groovy/util/JavadocAssertionTestBuilder.groovy (+138/-0)
src/main/groovy/util/JavadocAssertionTestSuite.groovy (+119/-0)
src/main/groovy/util/Node.java (+67/-2)
src/main/groovy/util/NodeList.java (+22/-11)
src/main/groovy/util/OrderBy.java (+8/-23)
src/main/groovy/util/PermutationGenerator.java (+21/-6)
src/main/groovy/util/ProxyGenerator.java (+19/-19)
src/main/groovy/util/XmlNodePrinter.java (+15/-2)
src/main/groovy/util/XmlParser.java (+11/-1)
src/main/groovy/util/XmlSlurper.java (+33/-5)
src/main/groovy/util/slurpersupport/Attribute.java (+14/-2)
src/main/groovy/util/slurpersupport/Attributes.java (+18/-6)
src/main/groovy/util/slurpersupport/FilteredAttributes.java (+8/-3)
src/main/groovy/util/slurpersupport/FilteredNodeChildren.java (+9/-3)
src/main/groovy/util/slurpersupport/GPathResult.java (+52/-88)
src/main/groovy/util/slurpersupport/NoChildren.java (+7/-7)
src/main/groovy/util/slurpersupport/Node.java (+14/-7)
src/main/groovy/util/slurpersupport/NodeChild.java (+16/-4)
src/main/groovy/util/slurpersupport/NodeChildren.java (+15/-15)
src/main/groovy/util/slurpersupport/NodeIterator.java (+3/-2)
src/main/groovy/util/slurpersupport/ReplacementNode.java (+7/-2)
src/main/groovy/xml/SAXBuilder.java (+2/-2)
src/main/groovy/xml/StaxBuilder.groovy (+34/-4)
src/main/groovy/xml/StreamingMarkupBuilder.groovy (+29/-15)
src/main/groovy/xml/XmlUtil.java (+134/-13)
src/main/groovy/xml/dom/DOMCategory.java (+134/-6)
src/main/org/codehaus/groovy/ant/Groovy.java (+36/-9)
src/main/org/codehaus/groovy/ant/Groovyc.java (+114/-18)
src/main/org/codehaus/groovy/ant/Groovydoc.java (+123/-52)
src/main/org/codehaus/groovy/antlr/AntlrParserPlugin.java (+445/-406)
src/main/org/codehaus/groovy/antlr/EnumHelper.java (+15/-0)
src/main/org/codehaus/groovy/antlr/GroovySourceToken.java (+4/-5)
src/main/org/codehaus/groovy/antlr/SourceInfo.java (+15/-0)
src/main/org/codehaus/groovy/antlr/groovy.g (+106/-95)
src/main/org/codehaus/groovy/antlr/java/Groovifier.java (+10/-4)
src/main/org/codehaus/groovy/antlr/parser/GroovyLexer.java (+165/-131)
src/main/org/codehaus/groovy/antlr/parser/GroovyLexer.smap (+2317/-2293)
src/main/org/codehaus/groovy/antlr/parser/GroovyRecognizer.java (+1594/-1198)
src/main/org/codehaus/groovy/antlr/parser/GroovyRecognizer.smap (+8019/-7793)
src/main/org/codehaus/groovy/antlr/parser/GroovyTokenTypes.java (+95/-93)
src/main/org/codehaus/groovy/antlr/parser/GroovyTokenTypes.txt (+95/-93)
src/main/org/codehaus/groovy/antlr/treewalker/SourceCodeTraversal.java (+1/-1)
src/main/org/codehaus/groovy/antlr/treewalker/TraversalHelper.java (+2/-2)
src/main/org/codehaus/groovy/antlr/treewalker/Visitor.java (+2/-2)
src/main/org/codehaus/groovy/ast/AnnotatedNode.java (+10/-1)
src/main/org/codehaus/groovy/ast/ClassCodeVisitorSupport.java (+4/-0)
src/main/org/codehaus/groovy/ast/ClassHelper.java (+4/-4)
src/main/org/codehaus/groovy/ast/ClassNode.java (+70/-56)
src/main/org/codehaus/groovy/ast/CompileUnit.java (+3/-3)
src/main/org/codehaus/groovy/ast/EnumConstantClassNode.java (+36/-0)
src/main/org/codehaus/groovy/ast/ImportNode.java (+7/-6)
src/main/org/codehaus/groovy/ast/InnerClassNode.java (+10/-1)
src/main/org/codehaus/groovy/ast/MethodNode.java (+23/-22)
src/main/org/codehaus/groovy/ast/ModuleNode.java (+31/-11)
src/main/org/codehaus/groovy/ast/Parameter.java (+15/-15)
src/main/org/codehaus/groovy/ast/builder/AstBuilder.groovy (+15/-2)
src/main/org/codehaus/groovy/ast/builder/AstBuilderTransformation.groovy (+15/-0)
src/main/org/codehaus/groovy/ast/builder/AstSpecificationCompiler.groovy (+15/-1)
src/main/org/codehaus/groovy/ast/builder/AstStringCompiler.groovy (+15/-1)
src/main/org/codehaus/groovy/ast/expr/ConstructorCallExpression.java (+24/-19)
src/main/org/codehaus/groovy/ast/expr/MethodCallExpression.java (+32/-9)
src/main/org/codehaus/groovy/binding/AggregateBinding.java (+15/-0)
src/main/org/codehaus/groovy/classgen/AnnotationVisitor.java (+43/-0)
src/main/org/codehaus/groovy/classgen/AsmClassGenerator.java (+413/-351)
src/main/org/codehaus/groovy/classgen/BytecodeHelper.java (+19/-12)
src/main/org/codehaus/groovy/classgen/ClassCompletionVerifier.java (+118/-85)
src/main/org/codehaus/groovy/classgen/CompileStack.java (+122/-45)
src/main/org/codehaus/groovy/classgen/EnumVisitor.java (+27/-5)
src/main/org/codehaus/groovy/classgen/ExtendedVerifier.java (+1/-1)
src/main/org/codehaus/groovy/classgen/InnerClassVisitor.java (+151/-46)
src/main/org/codehaus/groovy/classgen/ReturnAdder.java (+11/-7)
src/main/org/codehaus/groovy/classgen/RuntimeIncompleteClassException.java (+0/-32)
src/main/org/codehaus/groovy/classgen/VariableScopeVisitor.java (+8/-54)
src/main/org/codehaus/groovy/classgen/Verifier.java (+182/-128)
src/main/org/codehaus/groovy/classgen/VerifierCodeVisitor.java (+20/-45)
src/main/org/codehaus/groovy/classgen/genArrayAccess.groovy (+15/-0)
src/main/org/codehaus/groovy/classgen/genArrays.groovy (+15/-0)
src/main/org/codehaus/groovy/classgen/genDgmMath.groovy (+15/-0)
src/main/org/codehaus/groovy/classgen/genMathModification.groovy (+15/-0)
src/main/org/codehaus/groovy/control/CompilationUnit.java (+50/-80)
src/main/org/codehaus/groovy/control/CompilerConfiguration.java (+13/-2)
src/main/org/codehaus/groovy/control/ResolveVisitor.java (+189/-48)
src/main/org/codehaus/groovy/control/StaticImportVisitor.java (+241/-55)
src/main/org/codehaus/groovy/groovydoc/GroovyRootDoc.java (+1/-1)
src/main/org/codehaus/groovy/jsr223/GroovyCompiledScript.java (+23/-32)
src/main/org/codehaus/groovy/jsr223/GroovyScriptEngineFactory.java (+31/-38)
src/main/org/codehaus/groovy/jsr223/GroovyScriptEngineImpl.java (+12/-5)
src/main/org/codehaus/groovy/reflection/CachedField.java (+8/-1)
src/main/org/codehaus/groovy/reflection/ClassInfo.java (+4/-2)
src/main/org/codehaus/groovy/reflection/ClassLoaderForClassArtifacts.java (+15/-0)
src/main/org/codehaus/groovy/reflection/GeneratedMetaMethod.java (+197/-19)
src/main/org/codehaus/groovy/reflection/MethodHandle.java (+15/-0)
src/main/org/codehaus/groovy/reflection/ParameterTypes.java (+1/-1)
src/main/org/codehaus/groovy/reflection/handlegen.groovy (+15/-0)
src/main/org/codehaus/groovy/reflection/stdclasses/CachedClosureClass.java (+15/-0)
src/main/org/codehaus/groovy/reflection/stdclasses/FloatCachedClass.java (+4/-1)
src/main/org/codehaus/groovy/runtime/CurriedClosure.java (+66/-29)
src/main/org/codehaus/groovy/runtime/DateGroovyMethods.java (+554/-0)
src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java (+2884/-956)
src/main/org/codehaus/groovy/runtime/DefaultGroovyMethodsSupport.java (+3/-3)
src/main/org/codehaus/groovy/runtime/DefaultGroovyStaticMethods.java (+7/-6)
src/main/org/codehaus/groovy/runtime/EncodingGroovyMethods.java (+225/-0)
src/main/org/codehaus/groovy/runtime/GroovyCategorySupport.java (+25/-8)
src/main/org/codehaus/groovy/runtime/HandleMetaClass.java (+1/-1)
src/main/org/codehaus/groovy/runtime/InvokerHelper.java (+55/-13)
src/main/org/codehaus/groovy/runtime/IteratorClosureAdapter.java (+5/-5)
src/main/org/codehaus/groovy/runtime/MetaClassHelper.java (+0/-2)
src/main/org/codehaus/groovy/runtime/MethodClosure.java (+8/-25)
src/main/org/codehaus/groovy/runtime/MethodRankHelper.java (+71/-10)
src/main/org/codehaus/groovy/runtime/NumberAwareComparator.java (+46/-0)
src/main/org/codehaus/groovy/runtime/ReverseListIterator.java (+15/-0)
src/main/org/codehaus/groovy/runtime/ScriptBytecodeAdapter.java (+5/-1)
src/main/org/codehaus/groovy/runtime/StackTraceUtils.java (+4/-3)
src/main/org/codehaus/groovy/runtime/SwingGroovyMethods.java (+24/-14)
src/main/org/codehaus/groovy/runtime/callsite/AbstractCallSite.java (+5/-1)
src/main/org/codehaus/groovy/runtime/callsite/CallSite.java (+15/-0)
src/main/org/codehaus/groovy/runtime/callsite/ConstructorMetaClassSite.java (+15/-0)
src/main/org/codehaus/groovy/runtime/callsite/ConstructorMetaMethodSite.java (+15/-0)
src/main/org/codehaus/groovy/runtime/callsite/GetEffectivePogoPropertySite.java (+15/-0)
src/main/org/codehaus/groovy/runtime/callsite/NullCallSite.java (+15/-0)
src/main/org/codehaus/groovy/runtime/callsite/StaticMetaClassSite.java (+15/-0)
src/main/org/codehaus/groovy/runtime/dgmimpl/NumberNumberMultiply.java (+15/-0)
src/main/org/codehaus/groovy/runtime/dgmimpl/arrays/CharacterArrayGetAtMetaMethod.java (+15/-0)
src/main/org/codehaus/groovy/runtime/dgmimpl/arrays/DoubleArrayGetAtMetaMethod.java (+15/-0)
src/main/org/codehaus/groovy/runtime/dgmimpl/arrays/ObjectArrayPutAtMetaMethod.java (+12/-12)
src/main/org/codehaus/groovy/runtime/metaclass/ClosureMetaClass.java (+23/-0)
src/main/org/codehaus/groovy/runtime/metaclass/ConcurrentReaderHashMap.java (+42/-49)
src/main/org/codehaus/groovy/runtime/metaclass/MemoryAwareConcurrentReadMap.java (+30/-36)
src/main/org/codehaus/groovy/runtime/metaclass/MetaClassRegistryImpl.java (+36/-20)
src/main/org/codehaus/groovy/runtime/metaclass/MixinInstanceMetaMethod.java (+15/-0)
src/main/org/codehaus/groovy/runtime/metaclass/MixinInstanceMetaProperty.java (+15/-0)
src/main/org/codehaus/groovy/runtime/typehandling/BigDecimalMath.java (+51/-59)
src/main/org/codehaus/groovy/runtime/typehandling/BigIntegerMath.java (+1/-1)
src/main/org/codehaus/groovy/runtime/typehandling/ClassDistance.java (+0/-160)
src/main/org/codehaus/groovy/runtime/typehandling/DefaultTypeTransformation.java (+29/-10)
src/main/org/codehaus/groovy/runtime/typehandling/FloatingPointMath.java (+1/-1)
src/main/org/codehaus/groovy/runtime/typehandling/GroovyCastException.java (+20/-3)
src/main/org/codehaus/groovy/runtime/typehandling/IntegerMath.java (+1/-1)
src/main/org/codehaus/groovy/runtime/typehandling/LongMath.java (+1/-1)
src/main/org/codehaus/groovy/runtime/typehandling/NumberMathModificationInfo.java (+15/-0)
src/main/org/codehaus/groovy/runtime/wrappers/BooleanWrapper.java (+4/-6)
src/main/org/codehaus/groovy/runtime/wrappers/ByteWrapper.java (+4/-7)
src/main/org/codehaus/groovy/runtime/wrappers/CharWrapper.java (+4/-6)
src/main/org/codehaus/groovy/runtime/wrappers/DoubleWrapper.java (+4/-6)
src/main/org/codehaus/groovy/runtime/wrappers/FloatWrapper.java (+4/-6)
src/main/org/codehaus/groovy/runtime/wrappers/GroovyObjectWrapper.java (+46/-52)
src/main/org/codehaus/groovy/runtime/wrappers/IntWrapper.java (+4/-8)
src/main/org/codehaus/groovy/runtime/wrappers/LongWrapper.java (+4/-6)
src/main/org/codehaus/groovy/runtime/wrappers/PojoWrapper.java (+47/-54)
src/main/org/codehaus/groovy/runtime/wrappers/ShortWrapper.java (+2/-3)
src/main/org/codehaus/groovy/runtime/wrappers/Wrapper.java (+25/-252)
src/main/org/codehaus/groovy/syntax/RuntimeParserException.java (+1/-2)
src/main/org/codehaus/groovy/tools/DgmConverter.java (+158/-139)
src/main/org/codehaus/groovy/tools/FileSystemCompiler.java (+15/-14)
src/main/org/codehaus/groovy/tools/LoaderConfiguration.java (+17/-5)
src/main/org/codehaus/groovy/tools/RootLoader.java (+1/-1)
src/main/org/codehaus/groovy/tools/StringHelper.java (+15/-0)
src/main/org/codehaus/groovy/tools/ast/TranformTestHelper.groovy (+17/-3)
src/main/org/codehaus/groovy/tools/groovydoc/GroovyDocTool.java (+9/-3)
src/main/org/codehaus/groovy/tools/groovydoc/GroovyDocWriter.java (+17/-10)
src/main/org/codehaus/groovy/tools/groovydoc/GroovyRootDocBuilder.java (+83/-19)
src/main/org/codehaus/groovy/tools/groovydoc/LinkArgument.java (+15/-0)
src/main/org/codehaus/groovy/tools/groovydoc/Main.groovy (+240/-0)
src/main/org/codehaus/groovy/tools/groovydoc/Main.properties (+67/-0)
src/main/org/codehaus/groovy/tools/groovydoc/SimpleGroovyAbstractableElementDoc.java (+34/-0)
src/main/org/codehaus/groovy/tools/groovydoc/SimpleGroovyClassDoc.java (+234/-47)
src/main/org/codehaus/groovy/tools/groovydoc/SimpleGroovyClassDocAssembler.java (+125/-41)
src/main/org/codehaus/groovy/tools/groovydoc/SimpleGroovyDoc.java (+23/-16)
src/main/org/codehaus/groovy/tools/groovydoc/SimpleGroovyMemberDoc.java (+18/-19)
src/main/org/codehaus/groovy/tools/groovydoc/SimpleGroovyPackageDoc.java (+6/-6)
src/main/org/codehaus/groovy/tools/groovydoc/SimpleGroovyProgramElementDoc.java (+32/-25)
src/main/org/codehaus/groovy/tools/groovydoc/SimpleGroovyRootDoc.java (+24/-5)
src/main/org/codehaus/groovy/tools/groovydoc/SimpleGroovyTag.java (+15/-0)
src/main/org/codehaus/groovy/tools/groovydoc/SimpleGroovyType.java (+1/-1)
src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/GroovyDocTemplateInfo.java (+40/-0)
src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html (+44/-37)
src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/packageLevel/package-frame.html (+10/-10)
src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/packageLevel/package-summary.html (+10/-12)
src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/allclasses-frame.html (+3/-1)
src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/deprecated-list.html (+46/-49)
src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/index-all.html (+1/-1)
src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/overview-summary.html (+25/-1)
src/main/org/codehaus/groovy/tools/gse/DependencyTracker.java (+16/-0)
src/main/org/codehaus/groovy/tools/gse/StringSetMap.java (+19/-4)
src/main/org/codehaus/groovy/tools/javac/JavaStubCompilationUnit.java (+2/-2)
src/main/org/codehaus/groovy/tools/javac/JavaStubGenerator.java (+174/-96)
src/main/org/codehaus/groovy/tools/shell/Groovysh.groovy (+13/-5)
src/main/org/codehaus/groovy/tools/shell/IO.java (+4/-10)
src/main/org/codehaus/groovy/tools/shell/Main.groovy (+26/-5)
src/main/org/codehaus/groovy/tools/shell/Main.properties (+5/-1)
src/main/org/codehaus/groovy/tools/shell/util/ANSI.java (+0/-421)
src/main/org/codehaus/groovy/tools/shell/util/Logger.java (+8/-13)
src/main/org/codehaus/groovy/tools/shell/util/MessageSource.java (+14/-18)
src/main/org/codehaus/groovy/transform/ASTTransformationCollectorCodeVisitor.java (+0/-1)
src/main/org/codehaus/groovy/transform/ASTTransformationVisitor.java (+4/-5)
src/main/org/codehaus/groovy/transform/DelegateASTTransformation.java (+81/-32)
src/main/org/codehaus/groovy/transform/GroovyASTTransformationClass.java (+15/-0)
src/main/org/codehaus/groovy/transform/ImmutableASTTransformation.java (+83/-60)
src/main/org/codehaus/groovy/transform/IndexedPropertyASTTransformation.java (+164/-0)
src/main/org/codehaus/groovy/transform/InheritConstructorsASTTransformation.java (+119/-0)
src/main/org/codehaus/groovy/transform/LazyASTTransformation.java (+104/-62)
src/main/org/codehaus/groovy/transform/SingletonASTTransformation.java (+3/-3)
src/main/org/codehaus/groovy/transform/SynchronizedASTTransformation.java (+106/-0)
src/main/org/codehaus/groovy/transform/powerassert/AssertionRenderer.java (+28/-29)
src/main/org/codehaus/groovy/util/AbstractConcurrentDoubleKeyMap.java (+15/-0)
src/main/org/codehaus/groovy/util/AbstractConcurrentMap.java (+20/-5)
src/main/org/codehaus/groovy/util/AbstractConcurrentMapBase.java (+17/-2)
src/main/org/codehaus/groovy/util/Finalizable.java (+15/-0)
src/main/org/codehaus/groovy/util/HashCodeHelper.java (+2/-5)
src/main/org/codehaus/groovy/util/LazyReference.java (+15/-2)
src/main/org/codehaus/groovy/util/LockableObject.java (+15/-0)
src/main/org/codehaus/groovy/util/ManagedConcurrentMap.java (+15/-1)
src/main/org/codehaus/groovy/util/ManagedLinkedList.java (+15/-15)
src/main/org/codehaus/groovy/util/ManagedReference.java (+15/-0)
src/main/org/codehaus/groovy/util/Reference.java (+15/-0)
src/main/org/codehaus/groovy/util/ReferenceBundle.java (+15/-15)
src/main/org/codehaus/groovy/util/ReferenceManager.java (+15/-0)
src/main/org/codehaus/groovy/util/ReferenceType.java (+15/-0)
src/main/org/codehaus/groovy/util/ReleaseInfo.java (+47/-38)
src/main/org/codehaus/groovy/util/StringUtil.groovy (+51/-0)
src/main/org/codehaus/groovy/vmplugin/VMPluginFactory.java (+18/-5)
src/main/org/codehaus/groovy/vmplugin/v5/Java5.java (+8/-1)
src/main/org/codehaus/groovy/vmplugin/v5/PluginDefaultGroovyMethods.java (+4/-2)
src/main/org/codehaus/groovy/vmplugin/v5/TestNgUtils.java (+1/-1)
src/main/org/codehaus/groovy/vmplugin/v6/Java6.java (+35/-0)
src/main/org/codehaus/groovy/vmplugin/v6/PluginDefaultGroovyMethods.java (+92/-0)
src/main/org/codehaus/groovy/vmplugin/v6/PluginStaticGroovyMethods.java (+42/-0)
src/main/overview.html (+3/-1)
src/main/overviewj.html (+21/-0)
src/test/Outer3.groovy (+19/-0)
src/test/Outer4.groovy (+19/-0)
src/test/UberTestCaseGroovySourceCodehausPackages.java (+2/-1)
src/test/UberTestCaseGroovySourceCodehausPackages_VM6.java (+30/-0)
src/test/UberTestCaseGroovySourceRootPackage.java (+23/-52)
src/test/UberTestCaseGroovySourceSubPackages.java (+9/-5)
src/test/gls/CompilableTestSupport.groovy (+27/-28)
src/test/gls/enums/EnumTest.groovy (+126/-28)
src/test/gls/generics/GenericsTest.groovy (+30/-0)
src/test/gls/innerClass/InnerClassTest.groovy (+24/-7)
src/test/gls/invocation/ClassDuplicationTest.groovy (+21/-0)
src/test/gls/invocation/MethodSelectionTest.groovy (+37/-0)
src/test/gls/syntax/ParsingTest.groovy (+6/-0)
src/test/groovy/ClosureCurryTest.groovy (+31/-1)
src/test/groovy/DateTest.groovy (+6/-0)
src/test/groovy/EqualsTest.groovy (+12/-1)
src/test/groovy/FileTest.groovy (+342/-92)
src/test/groovy/GroovyClosureMethodsTest.groovy (+12/-0)
src/test/groovy/GroovyMethodsTest.groovy (+92/-78)
src/test/groovy/GroovyTruthTest.groovy (+20/-0)
src/test/groovy/ListTest.groovy (+2/-1)
src/test/groovy/MapTest.groovy (+25/-0)
src/test/groovy/Property2Test.groovy (+55/-70)
src/test/groovy/PropertyTest.groovy (+2/-2)
src/test/groovy/SortTest.groovy (+10/-1)
src/test/groovy/StaticImportTarget.groovy (+1/-0)
src/test/groovy/StaticImportTest.groovy (+186/-3)
src/test/groovy/StringTest.groovy (+6/-0)
src/test/groovy/SwitchTest.groovy (+1/-0)
src/test/groovy/bugs/GROOVY3934Helper.groovy (+1/-0)
src/test/groovy/bugs/Groovy1465Bug.groovy (+39/-0)
src/test/groovy/bugs/Groovy3853Bug.groovy (+0/-34)
src/test/groovy/bugs/Groovy3871Bug.groovy (+44/-0)
src/test/groovy/bugs/Groovy3949Bug.groovy (+14/-0)
src/test/groovy/bugs/Groovy3989Bug.groovy (+19/-0)
src/test/groovy/bugs/Groovy4006Bug.groovy (+160/-0)
src/test/groovy/bugs/Groovy4009Bug.groovy (+19/-0)
src/test/groovy/bugs/Groovy4025Bug.groovy (+24/-0)
src/test/groovy/bugs/Groovy4029Bug.groovy (+9/-0)
src/test/groovy/bugs/Groovy4035Bug.groovy (+30/-0)
src/test/groovy/bugs/Groovy4038Bug.groovy (+10/-0)
src/test/groovy/bugs/Groovy4043Bug.groovy (+17/-0)
src/test/groovy/bugs/Groovy4046Bug.groovy (+11/-0)
src/test/groovy/bugs/Groovy4069Bug.groovy (+116/-0)
src/test/groovy/bugs/Groovy4075Bug.groovy (+23/-0)
src/test/groovy/bugs/Groovy4078Bug.groovy (+31/-0)
src/test/groovy/bugs/Groovy4080Bug.groovy (+18/-0)
src/test/groovy/bugs/Groovy4081Bug.groovy (+20/-0)
src/test/groovy/bugs/Groovy4098Bug.groovy (+150/-0)
src/test/groovy/bugs/Groovy4098Child.groovy (+35/-0)
src/test/groovy/bugs/Groovy4098Parent.groovy (+23/-0)
src/test/groovy/bugs/Groovy4104A.java (+29/-0)
src/test/groovy/bugs/Groovy4104B.java (+19/-0)
src/test/groovy/bugs/Groovy4104Bug.groovy (+31/-0)
src/test/groovy/bugs/Groovy4106Bug.groovy (+25/-0)
src/test/groovy/bugs/Groovy4107Bug.groovy (+34/-0)
src/test/groovy/bugs/Groovy4111Bug.groovy (+38/-0)
src/test/groovy/bugs/Groovy4116Bug.groovy (+63/-0)
src/test/groovy/bugs/Groovy4119Bug.groovy (+35/-0)
src/test/groovy/bugs/Groovy4120Bug.groovy (+54/-0)
src/test/groovy/bugs/Groovy4121Bug.groovy (+45/-0)
src/test/groovy/bugs/Groovy4129Bug.groovy (+32/-0)
src/test/groovy/bugs/Groovy4131Bug.groovy (+30/-0)
src/test/groovy/bugs/Groovy4133Bug.groovy (+31/-0)
src/test/groovy/bugs/Groovy4134Bug.groovy (+26/-0)
src/test/groovy/bugs/Groovy4139Bug.groovy (+31/-0)
src/test/groovy/bugs/Groovy4145.groovy (+7/-0)
src/test/groovy/bugs/Groovy4151Bug.groovy (+30/-0)
src/test/groovy/bugs/Groovy4169Bug.groovy (+34/-0)
src/test/groovy/bugs/Groovy4170Bug.groovy (+35/-0)
src/test/groovy/bugs/Groovy4188Bug.groovy (+36/-0)
src/test/groovy/bugs/Groovy4190Bug.groovy (+48/-0)
src/test/groovy/bugs/Groovy4191Bug.groovy (+28/-0)
src/test/groovy/bugs/Groovy4193Bug.groovy (+28/-0)
src/test/groovy/bugs/Groovy4202Bug.groovy (+18/-0)
src/test/groovy/bugs/Groovy4206Bug.groovy (+16/-0)
src/test/groovy/bugs/Groovy4235Bug.groovy (+15/-0)
src/test/groovy/bugs/Groovy4241Bug.groovy (+22/-0)
src/test/groovy/bugs/Groovy4243Bug.groovy (+31/-0)
src/test/groovy/bugs/Groovy4246Bug.groovy (+44/-0)
src/test/groovy/bugs/Groovy4247Bug.groovy (+19/-0)
src/test/groovy/bugs/Groovy4252Bug.groovy (+83/-0)
src/test/groovy/bugs/Groovy4264Bug.groovy (+66/-0)
src/test/groovy/bugs/Groovy4272Bug.groovy (+29/-0)
src/test/groovy/bugs/Groovy4273Bug.groovy (+62/-0)
src/test/groovy/bugs/Groovy4285Bug.groovy (+38/-0)
src/test/groovy/bugs/Groovy4293Bug.groovy (+37/-0)
src/test/groovy/bugs/GroovyInnerEnumBug.groovy (+29/-0)
src/test/groovy/bugs/Groovy_2473Bug.groovy (+2/-2)
src/test/groovy/bugs/MyConstants4272.java (+13/-0)
src/test/groovy/bugs/MyConstantsASTTransformation4272.groovy (+30/-0)
src/test/groovy/bugs/SynchronizedBytecodeBug.groovy (+15/-1)
src/test/groovy/execute/ExecuteTest.groovy (+139/-0)
src/test/groovy/execute/ExecuteTest_Windows.groovy (+15/-0)
src/test/groovy/grape/GrabErrorIsolationTest.groovy (+53/-0)
src/test/groovy/lang/ClassReloadingTest.groovy (+26/-0)
src/test/groovy/lang/ExceptionTest.groovy (+72/-0)
src/test/groovy/lang/GroovyClassLoaderTest.groovy (+16/-18)
src/test/groovy/lang/GroovyCodeSourceTest.groovy (+79/-0)
src/test/groovy/lang/GroovyShellTest.java (+43/-1)
src/test/groovy/lang/ReferenceSerializationTest.groovy (+96/-0)
src/test/groovy/lang/StripMarginTest.groovy (+75/-0)
src/test/groovy/lang/SyntheticReturnTest.groovy (+2/-2)
src/test/groovy/lang/gcldeadlock/DeadlockBugUtil.groovy (+3/-0)
src/test/groovy/lang/gcldeadlock/GroovyClassLoaderDeadlockTest.java (+62/-0)
src/test/groovy/lang/gcldeadlock/script0.groovy (+3/-0)
src/test/groovy/lang/gcldeadlock/script1.groovy (+3/-0)
src/test/groovy/mock/interceptor/HalfMockTest.groovy (+124/-0)
src/test/groovy/mock/interceptor/MockCallSequenceTest.groovy (+67/-5)
src/test/groovy/mock/interceptor/MockForJavaTest.groovy (+4/-4)
src/test/groovy/mock/interceptor/StubForJavaTest.groovy (+10/-5)
src/test/groovy/operator/BitwiseOperatorsTest.groovy (+17/-22)
src/test/groovy/security/SecurityTestSupport.java (+4/-4)
src/test/groovy/servlet/AbstractHttpServletTest.groovy (+14/-4)
src/test/groovy/sql/SqlBatchTest.groovy (+17/-0)
src/test/groovy/sql/SqlCacheTest.groovy (+2/-0)
src/test/groovy/sql/SqlCompleteTest.groovy (+42/-0)
src/test/groovy/swing/SwingMetaMethodsTest.groovy (+2/-0)
src/test/groovy/text/XmlTemplateEngineTest.java (+7/-0)
src/test/groovy/time/TimeCategoryTest.groovy (+20/-4)
src/test/groovy/util/AntTest.groovy (+3/-0)
src/test/groovy/util/CliBuilderTest.groovy (+389/-301)
src/test/groovy/util/ConfigSlurperTest.groovy (+34/-2)
src/test/groovy/util/GroovyScriptEngineTest.groovy (+111/-11)
src/test/groovy/util/JavadocAssertionTestBuilderTest.groovy (+132/-0)
src/test/groovy/util/XmlParserTest.groovy (+25/-0)
src/test/groovy/util/XmlSlurperTest.groovy (+25/-0)
src/test/groovy/xml/BuilderTestSupport.groovy (+9/-0)
src/test/groovy/xml/GpathSyntaxTestSupport.groovy (+168/-6)
src/test/groovy/xml/MarkupBuilderTest.groovy (+13/-7)
src/test/groovy/xml/StreamingMarkupBuilderTest.groovy (+5/-0)
src/test/groovy/xml/dom/DOMCategoryTest.groovy (+15/-1)
src/test/groovy/xml/vm6/StaxBuilderTest.groovy (+17/-12)
src/test/org/codehaus/groovy/ant/GroovyTest.xml (+1/-1)
src/test/org/codehaus/groovy/ast/LineColumnCheck.txt (+6/-6)
src/test/org/codehaus/groovy/jsr223/JSR223SecurityTest.java (+132/-0)
src/test/org/codehaus/groovy/jsr223/SugarTest.groovy (+16/-0)
src/test/org/codehaus/groovy/jsr223/vm6/JavascriptTest.groovy (+19/-0)
src/test/org/codehaus/groovy/runtime/DateGDKTest.groovy (+22/-6)
src/test/org/codehaus/groovy/runtime/DefaultGroovyMethodsTest.java (+46/-1)
src/test/org/codehaus/groovy/runtime/MinusTest.groovy (+95/-80)
src/test/org/codehaus/groovy/runtime/StringAsClassTest.groovy (+17/-1)
src/test/org/codehaus/groovy/tools/FileSystemCompilerTest.java (+14/-45)
src/test/org/codehaus/groovy/tools/groovydoc/GroovyDocToolTest.java (+36/-24)
src/test/org/codehaus/groovy/tools/gse/DependencyTest.java (+9/-9)
src/test/org/codehaus/groovy/transform/DelegateTransformTest.groovy (+79/-4)
src/test/org/codehaus/groovy/transform/ImmutableTransformTest.groovy (+57/-0)
src/test/org/codehaus/groovy/transform/IndexedPropertyTransformTest.groovy (+47/-0)
src/test/org/codehaus/groovy/transform/InheritConstructorsTransformTest.groovy (+46/-0)
src/test/org/codehaus/groovy/transform/LazyTransformTest.groovy (+29/-1)
src/test/org/codehaus/groovy/transform/SynchronizedTransformTest.groovy (+43/-0)
src/test/org/codehaus/groovy/transform/TransformsAndCustomClassLoadersTest.groovy (+1/-1)
src/test/org/codehaus/groovy/transform/powerassert/AssertionRenderingTest.groovy (+2/-2)
src/test/org/codehaus/groovy/transform/powerassert/ValueRenderingTest.groovy (+43/-5)
src/tools/org/codehaus/groovy/tools/DocGenerator.groovy (+45/-19)
To merge this branch: bzr merge lp:~james-page/ubuntu/natty/groovy/fix-661230
Reviewer Review Type Date Requested Status
Chuck Short Pending
Review via email: mp+51179@code.launchpad.net

Description of the change

Sync groovy from debain testing and apply Ubuntu specific change to fix FTBFS with ant 1.8 (default ant in Ubuntu)

To post a comment you must log in.
19. By James Page

Fixed package maintainer

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file '.pc/.quilt_patches'
--- .pc/.quilt_patches 1970-01-01 00:00:00 +0000
+++ .pc/.quilt_patches 2011-02-24 17:57:34 +0000
@@ -0,0 +1,1 @@
1debian/patches
02
=== added file '.pc/.quilt_series'
--- .pc/.quilt_series 1970-01-01 00:00:00 +0000
+++ .pc/.quilt_series 2011-02-24 17:57:34 +0000
@@ -0,0 +1,1 @@
1series
02
=== added directory '.pc/0001-start-scripts.patch'
=== added directory '.pc/0001-start-scripts.patch/src'
=== added directory '.pc/0001-start-scripts.patch/src/bin'
=== added file '.pc/0001-start-scripts.patch/src/bin/startGroovy'
--- .pc/0001-start-scripts.patch/src/bin/startGroovy 1970-01-01 00:00:00 +0000
+++ .pc/0001-start-scripts.patch/src/bin/startGroovy 2011-02-24 17:57:34 +0000
@@ -0,0 +1,271 @@
1# -*- mode:sh -*-
2
3##############################################################################
4## ##
5## Groovy JVM Bootstrap for UN*X ##
6## ##
7##############################################################################
8
9##
10## $Revision: 19979 $
11## $Date: 2010-05-08 13:15:13 +0200 (Sa, 08. Mai 2010) $
12##
13
14PROGNAME=`basename "$0"`
15
16#DIRNAME=`dirname "$0"`
17
18SCRIPT_PATH="$0"
19
20# Use the maximum available, or set MAX_FD != -1 to use that value.
21MAX_FD="maximum"
22
23warn ( ) {
24 echo "${PROGNAME}: $*"
25}
26
27die ( ) {
28 warn "$*"
29 exit 1
30}
31
32earlyInit ( ) {
33 return
34}
35
36lateInit ( ) {
37 return
38}
39
40GROOVY_STARTUP="$HOME/.groovy/startup"
41if [ -r "$GROOVY_STARTUP" ] ; then
42 . "$GROOVY_STARTUP"
43fi
44
45earlyInit
46
47# OS specific support (must be 'true' or 'false').
48cygwin=false
49msys=false
50darwin=false
51case "`uname`" in
52 CYGWIN* )
53 cygwin=true
54 ;;
55 Darwin* )
56 darwin=true
57 ;;
58 MINGW* )
59 msys=true
60 ;;
61esac
62
63if [ "$1" = "-cp" -o "$1" = "-classpath" -o "$1" = "--classpath" ] ; then
64 CP=$2
65 shift 2
66fi
67
68# Attempt to set JAVA_HOME if it's not already set.
69if [ -z "$JAVA_HOME" ] ; then
70 if $darwin ; then
71 [ -z "$JAVA_HOME" -a -d "/Library/Java/Home" ] && export JAVA_HOME="/Library/Java/Home"
72 [ -z "$JAVA_HOME" -a -d "/System/Library/Frameworks/JavaVM.framework/Home" ] && export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home"
73 else
74 javaExecutable="`which javac`"
75 [ -z "$javaExecutable" -o "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ] && die "JAVA_HOME not set and cannot find javac to deduce location, please set JAVA_HOME."
76 # readlink(1) is not available as standard on Solaris 10.
77 readLink=`which readlink`
78 [ `expr "$readLink" : '\([^ ]*\)'` = "no" ] && die "JAVA_HOME not set and readlink not available, please set JAVA_HOME."
79 javaExecutable="`readlink -f \"$javaExecutable\"`"
80 javaHome="`dirname \"$javaExecutable\"`"
81 javaHome=`expr "$javaHome" : '\(.*\)/bin'`
82 JAVA_HOME="$javaHome"
83 export JAVA_HOME
84
85 fi
86fi
87
88# For Cygwin, ensure paths are in UNIX format before anything is touched.
89if $cygwin ; then
90 [ -n "$GROOVY_HOME" ] && GROOVY_HOME=`cygpath --unix "$GROOVY_HOME"`
91 [ -n "$JAVACMD" ] && JAVACMD=`cygpath --unix "$JAVACMD"`
92 [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
93 [ -n "$CP" ] && CP=`cygpath --path --unix "$CP"`
94else
95 if [ -n "$GROOVY_HOME" -a `expr "$GROOVY_HOME":'\/$'` ] ; then
96 GROOVY_HOME=`echo $GROOVY_HOME | sed -e 's/\/$//'`
97 fi
98fi
99
100# For MSYS, ensure paths are in appropriate format.
101if $msys
102then
103 [ -n "$JAVA_HOME" ] && JAVA_HOME=`( cd "$JAVA_HOME" ; pwd )`
104fi
105
106# Attempt to set GROOVY_HOME if it is not already set.
107if [ -z "$GROOVY_HOME" -o ! -d "$GROOVY_HOME" ] ; then
108 # Resolve links: $0 may be a link to groovy's home.
109 PRG="$0"
110 # Need this for relative symlinks.
111 while [ -h "$PRG" ] ; do
112 ls=`ls -ld "$PRG"`
113 link=`expr "$ls" : '.*-> \(.*\)$'`
114 if expr "$link" : '/.*' > /dev/null; then
115 PRG="$link"
116 else
117 PRG=`dirname "$PRG"`"/$link"
118 fi
119 done
120 SAVED="`pwd`"
121 cd "`dirname \"$PRG\"`/.."
122 GROOVY_HOME="`pwd -P`"
123 cd "$SAVED"
124fi
125
126# Set the default Groovy config if no specific one is mentioned.
127if [ -z "$GROOVY_CONF" ] ; then
128 GROOVY_CONF="$GROOVY_HOME/conf/groovy-starter.conf"
129fi
130STARTER_CLASSPATH="$GROOVY_HOME/lib/@GROOVYJAR@"
131
132# Create the final classpath. Setting a classpath using the -cp or -classpath option means not to use the
133# global classpath. Groovy behaves then the same as the java interpreter
134if [ -n "$CP" ] ; then
135 CP="$CP":.
136elif [ -n "$CLASSPATH" ] ; then
137 CP="$CLASSPATH":.
138else
139 CP=.
140fi
141
142# Determine the Java command to use to start the JVM.
143if [ -z "$JAVACMD" ] ; then
144 if [ -n "$JAVA_HOME" ] ; then
145 if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
146 # IBM's JDK on AIX uses strange locations for the executables
147 JAVACMD="$JAVA_HOME/jre/sh/java"
148 else
149 JAVACMD="$JAVA_HOME/bin/java"
150 fi
151 else
152 JAVACMD="java"
153 fi
154fi
155if [ ! -x "$JAVACMD" ] ; then
156 die "JAVA_HOME is not defined correctly, can not execute: $JAVACMD"
157fi
158if [ -z "$JAVA_HOME" ] ; then
159 warn "JAVA_HOME environment variable is not set"
160fi
161
162# Increase the maximum file descriptors if we can.
163if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
164 MAX_FD_LIMIT=`ulimit -H -n`
165 if [ $? -eq 0 ] ; then
166 if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
167 MAX_FD="$MAX_FD_LIMIT"
168 fi
169 ulimit -n $MAX_FD
170 if [ $? -ne 0 ] ; then
171 warn "Could not set maximum file descriptor limit: $MAX_FD"
172 fi
173 else
174 warn "Could not query businessSystem maximum file descriptor limit: $MAX_FD_LIMIT"
175 fi
176fi
177
178# Setup Profiler
179useprofiler=false
180if [ "$PROFILER" != "" ] ; then
181 if [ -r "$PROFILER" ] ; then
182 . $PROFILER
183 useprofiler=true
184 else
185 die "Profiler file not found: $PROFILER"
186 fi
187fi
188
189# For Darwin, use classes.jar for TOOLS_JAR
190TOOLS_JAR="$JAVA_HOME/lib/tools.jar"
191#if $darwin; then
192# TOOLS_JAR="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes/classes.jar"
193#fi
194
195# For Darwin, add GROOVY_APP_NAME to the JAVA_OPTS as -Xdock:name
196if $darwin; then
197 JAVA_OPTS="$JAVA_OPTS -Xdock:name=$GROOVY_APP_NAME -Xdock:icon=$GROOVY_HOME/bin/groovy.icns"
198fi
199
200# For Cygwin, switch paths to Windows format before running java
201if $cygwin ; then
202 GROOVY_HOME=`cygpath --mixed "$GROOVY_HOME"`
203 JAVA_HOME=`cygpath --mixed "$JAVA_HOME"`
204 GROOVY_CONF=`cygpath --mixed "$GROOVY_CONF"`
205 CP=`cygpath --path --mixed "$CP"`
206 TOOLS_JAR=`cygpath --mixed "$TOOLS_JAR"`
207 STARTER_CLASSPATH=`cygpath --path --mixed "$STARTER_CLASSPATH"`
208
209 # We build the pattern for arguments to be converted via cygpath
210 ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
211 SEP=""
212 for dir in $ROOTDIRSRAW ; do
213 ROOTDIRS="$ROOTDIRS$SEP$dir"
214 SEP="|"
215 done
216 OURCYGPATTERN="(^($ROOTDIRS))"
217 # Add a user-defined pattern to the cygpath arguments
218 if [ "$GROOVY_CYGPATTERN" != "" ] ; then
219 OURCYGPATTERN="$OURCYGPATTERN|($GROOVY_CYGPATTERN)"
220 fi
221 # Now convert the arguments - kludge to limit ourselves to /bin/sh
222 i=0
223 for arg in "$@" ; do
224 CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
225 if [ $CHECK -ne 0 ] ; then
226 eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
227 else
228 eval `echo args$i`="\"$arg\""
229 fi
230 i=`expr $i + 1`
231 done
232 case $i in
233 0) set -- ;;
234 1) set -- "$args0" ;;
235 2) set -- "$args0" "$args1" ;;
236 3) set -- "$args0" "$args1" "$args2" ;;
237 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
238 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
239 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
240 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
241 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
242 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
243 esac
244
245fi
246
247startGroovy ( ) {
248 CLASS=$1
249 shift
250 # Start the Profiler or the JVM
251 if $useprofiler ; then
252 runProfiler
253 else
254 exec "$JAVACMD" $JAVA_OPTS \
255 -classpath "$STARTER_CLASSPATH" \
256 -Dscript.name="$SCRIPT_PATH" \
257 -Dprogram.name="$PROGNAME" \
258 -Dgroovy.starter.conf="$GROOVY_CONF" \
259 -Dgroovy.home="$GROOVY_HOME" \
260 -Dtools.jar="$TOOLS_JAR" \
261 $STARTER_MAIN_CLASS \
262 --main $CLASS \
263 --conf "$GROOVY_CONF" \
264 --classpath "$CP" \
265 "$@"
266 fi
267}
268
269STARTER_MAIN_CLASS=org.codehaus.groovy.tools.GroovyStarter
270
271lateInit
0272
=== added directory '.pc/0002-ant-build.diff.patch'
=== added file '.pc/0002-ant-build.diff.patch/build.xml'
--- .pc/0002-ant-build.diff.patch/build.xml 1970-01-01 00:00:00 +0000
+++ .pc/0002-ant-build.diff.patch/build.xml 2011-02-24 17:57:34 +0000
@@ -0,0 +1,902 @@
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--
4Ant build script for Groovy.
5
6Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7compliance with the License. You may obtain a copy of the License at
8
9http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software distributed under the License is
12distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13implied. See the License for the specific language governing permissions and limitations under the License.
14
15This work is copyright by the author(s) and is part of a greater work collectively copyright by Codehaus on
16behalf of the Groovy community. See the NOTICE.txt file distributed with this work for additional information.
17
18Author : Russel Winder
19Author : Paul King
20$Revision: 20245 $ ($LastChangedBy: paulk $)
21$Date: 2010-06-07 02:45:33 +0200 (Mo, 07. Jun 2010) $
22-->
23
24<project name="Groovy" default="createJars" basedir=".">
25
26 <property file="local.build.properties"/>
27 <property file="build.properties"/>
28 <property name="ant.requiredVersion" value="1.6.5"/>
29
30 <!-- config/ant/build-maven.xml imports config/ant/build-setup.xml where all the paths are defined. -->
31 <import file="config/ant/build-maven.xml"/>
32 <import file="config/ant/build-checkstyle.xml"/>
33 <import file="config/ant/build-cobertura.xml"/>
34
35 <condition property="_skipTests_">
36 <or>
37 <equals arg1="${test}" arg2="false"/>
38 <istrue value="${skipTests}"/>
39 </or>
40 </condition>
41
42 <condition property="_skipExamples_">
43 <istrue value="${skipExamples}"/>
44 </condition>
45
46 <condition property="_skipDocs_">
47 <istrue value="${skipDocs}"/>
48 </condition>
49
50 <condition property="_skipOsgi_">
51 <istrue value="${skipOsgi}"/>
52 </condition>
53
54 <condition property="_skipFetch_">
55 <istrue value="${skipFetch}"/>
56 </condition>
57
58 <condition property="_skipEmbeddable_">
59 <istrue value="${skipEmbeddable}"/>
60 </condition>
61
62 <condition property="_forceServerSettings_">
63 <istrue value="${forceServerSettings}"/>
64 </condition>
65
66 <condition property="groovy.build.vm4">
67 <contains string="${ant.java.version}" substring="1.4"/>
68 </condition>
69
70 <condition property="groovy.build.vm6">
71 <contains string="${ant.java.version}" substring="1.6"/>
72 </condition>
73
74 <presetdef name="javac">
75 <javac memoryMaximumSize="500m"/>
76 </presetdef>
77
78 <target name="-initCoverage">
79 <condition property="_forceCoverage_">
80 <and>
81 <not>
82 <istrue value="${skipTests}"/>
83 </not>
84 <istrue value="${forceCoverage}"/>
85 </and>
86 </condition>
87 </target>
88
89 <target name="ensureGrammars" description="Ensure all the Antlr generated files are up to date.">
90 <mkdir dir="${groovyParserDirectory}"/>
91 <antlr target="${antlrDirectory}/groovy.g" outputdirectory="${groovyParserDirectory}">
92 <classpath refid="compilePath"/>
93 </antlr>
94 <antlr target="${javaParserDirectory}/java.g" outputdirectory="${javaParserDirectory}">
95 <classpath refid="compilePath"/>
96 </antlr>
97 </target>
98
99 <target name="-init" depends="-fetchDependencies"/>
100
101 <target name="-banner">
102 <echo message="Java Runtime Environment version: ${java.version}"/>
103 <echo message="Java Runtime Environment vendor: ${java.vendor}"/>
104 <echo message="Ant version: ${ant.version}"/>
105 <echo message="Operating system name: ${os.name}"/>
106 <echo message="Operating system architecture: ${os.arch}"/>
107 <echo message="Operating system version: ${os.version}"/>
108 <echo message="Base directory: ${basedir}"/>
109 <echo message="Java Home: ${java.home}"/>
110 </target>
111
112 <target name="-jvm14BuildWarning" if="groovy.build.vm4">
113 <fail>Aborting!
114
115================================================
116 ERROR: You must build Groovy with a 1.5+ JDK
117================================================
118 </fail>
119 </target>
120
121 <target name="-checkAntVersion" depends="-excludeLegacyAntVersion"
122 description="Check that we are running on the required version of Ant."/>
123
124 <target name="-excludeLegacyAntVersion">
125 <!-- antversion didn't exist in early versions of ant so we have
126 a legacy check to provide a nicer error message in this case -->
127 <fail message="You are using ant ${ant.version}, please build using ant ${ant.requiredVersion}+">
128 <condition>
129 <or>
130 <contains string="${ant.version}" substring="1.1"></contains>
131 <contains string="${ant.version}" substring="1.2"></contains>
132 <contains string="${ant.version}" substring="1.3"></contains>
133 <contains string="${ant.version}" substring="1.4"></contains>
134 <contains string="${ant.version}" substring="1.5"></contains>
135 <and>
136 <contains string="${ant.version}" substring="1.6"></contains>
137 <not>
138 <contains string="${ant.version}" substring="${ant.requiredVersion}"></contains>
139 </not>
140 </and>
141 </or>
142 </condition>
143 </fail>
144 </target>
145
146 <!-- add back in if we make 1.7+ minimal required version for build again
147 <target name="-ensureRequiredAntVersion">
148 <fail message="You are using ant ${ant.version}, please install using ant ${ant.requiredVersion}+"/>
149 <condition><not><antversion atleast="${ant.requiredVersion}"/></not></condition>
150 </fail>
151 </target>
152 -->
153
154 <target name="compileMain" depends="stagedcompile"
155 description="Compile the Java and Groovy code in the main source.">
156 </target>
157
158 <target name="stagedcompile" depends="-init,ensureGrammars,-jvm14BuildWarning" unless="uber">
159 <mkdir dir="${mainClassesDirectory}"/>
160 <mkdir dir="${toolsClassesDirectory}"/>
161 <mkdir dir="${mainClassesDirectory}/META-INF"/>
162
163 <javac srcdir="${mainSourceDirectory}" includeantruntime="false" destdir="${mainClassesDirectory}"
164 deprecation="on" debug="yes" source="1.5" target="1.5" fork="true" classpathref="compilePath">
165 <exclude name="groovy/ui/**/*.java"/>
166 </javac>
167 <java classname="org.codehaus.groovy.tools.DgmConverter"
168 fork="yes"
169 failonerror="true">
170 <classpath refid="compilePath"/>
171 <classpath path="${mainClassesDirectory}"/>
172 </java>
173 <antcall inheritrefs="true" target="-stagedcompile-groovy"/>
174 <antcall target="-includeResources"/>
175 </target>
176
177 <target name="-stagedcompile-groovy" depends="-initGroovyc">
178 <groovyc srcdir="${mainSourceDirectory}" destdir="${mainClassesDirectory}" fork="true"
179 memorymaximumsize="${groovycMain_mx}">
180 <classpath>
181 <pathelement path="${mainClassesDirectory}"/>
182 <path refid="compilePath"/>
183 </classpath>
184 <javac deprecation="on" debug="yes" source="1.5" target="1.5"/>
185 </groovyc>
186 </target>
187
188 <property name="vm5GroovySourceFiles" value="**/*.groovy"/>
189 <property name="vm5JavaSourceFiles" value="**/*.java"/>
190 <property name="vm6GroovySourceFiles" value="groovy/**/vm6/*Test.groovy,org/codehaus/groovy/**/vm6/*Test.groovy"/>
191
192 <target name="-initGroovyc">
193 <path id="groovyMainClasses">
194 <pathelement path="${mainClassesDirectory}"/>
195 <path refid="compilePath"/>
196 </path>
197 <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="groovyMainClasses"/>
198 </target>
199
200 <target name="compileTest" depends="compileMain,compileTestOnly"
201 description="Compile the Java and Groovy code in the test source."/>
202
203 <target name="-cleanTest">
204 <delete dir="${testClassesDirectory}"/>
205 </target>
206
207 <target name="compileTestOnly" unless="_skipTests_">
208 <mkdir dir="${testClassesDirectory}"/>
209 <antcall inheritrefs="true" target="-compileTest"/>
210 </target>
211
212 <target name="-compileTest" depends="-initGroovyc,-compileTest_vm6">
213 <groovyc srcdir="${testSourceDirectory}"
214 destdir="${testClassesDirectory}"
215 includes="${vm5GroovySourceFiles},${vm5JavaSourceFiles}"
216 excludes="${vm6GroovySourceFiles}"
217 fork="true"
218 memorymaximumsize="${groovycTest_mx}">
219 <classpath>
220 <pathelement path="${testClassesDirectory}"/>
221 <path refid="groovyMainClasses"/>
222 <path refid="testLibPath"/>
223 </classpath>
224 <javac source="1.5" target="1.5" nowarn="on"/>
225 </groovyc>
226 </target>
227
228 <target name="-compileTest_vm6" if="groovy.build.vm6">
229 <groovyc srcdir="${testSourceDirectory}"
230 destdir="${testClassesDirectory}"
231 includes="${vm6GroovySourceFiles}"
232 fork="true"
233 memorymaximumsize="${groovycTest_mx}">
234 <classpath>
235 <pathelement path="${testClassesDirectory}"/>
236 <path refid="groovyMainClasses"/>
237 <path refid="testLibPath"/>
238 </classpath>
239 <!-- currently not needed, add in if/when required -->
240 <!--<javac source="1.5" target="1.5" nowarn="on"/>-->
241 </groovyc>
242 </target>
243
244 <target name="compileExamples" depends="-init,-initGroovyc,compileMain,-includeExamplesResources"
245 unless="_skipExamples_"
246 description="Compile the Java and Groovy code in the examples source directory.">
247 <mkdir dir="${examplesClassesDirectory}"/>
248 <echo message="Compiling example code."/>
249
250 <groovyc srcdir="${examplesSourceDirectory}/webapps/groovlet-examples/WEB-INF/groovy"
251 destdir="${examplesClassesDirectory}"
252 fork="true"
253 memorymaximumsize="${groovycExamples_mx}">
254 <classpath>
255 <pathelement path="${mainClassesDirectory}"/>
256 <path refid="compilePath"/>
257 <path refid="examplesPath"/>
258 </classpath>
259 </groovyc>
260 <javac srcdir="${examplesSourceDirectory}"
261 destdir="${examplesClassesDirectory}"
262 source="1.5"
263 target="1.5"
264 fork="true">
265 <classpath>
266 <pathelement path="${mainClassesDirectory}"/>
267 <pathelement path="${examplesClassesDirectory}"/>
268 <path refid="compilePath"/>
269 <path refid="examplesPath"/>
270 </classpath>
271 </javac>
272 <groovyc srcdir="${examplesSourceDirectory}"
273 destdir="${examplesClassesDirectory}"
274 fork="true"
275 memorymaximumsize="${groovycExamples_mx}"
276 excludes="webapps/groovlet-examples/WEB-INF/groovy/**/*.groovy,org/codehaus/groovy/grails/compiler/injection/**/*.java">
277 <classpath>
278 <pathelement path="${mainClassesDirectory}"/>
279 <pathelement path="${examplesClassesDirectory}"/>
280 <path refid="compilePath"/>
281 <path refid="examplesPath"/>
282 </classpath>
283 <javac source="1.5" target="1.5"/>
284 </groovyc>
285
286 </target>
287
288 <target name="-initializeReports">
289 <mkdir dir="${reportsDirectory}"/>
290 </target>
291
292 <condition property="_shouldBeHeadless_">
293 <or>
294 <istrue value="${java.awt.headless}"/>
295 <!--<os name="Mac OS X"/>-->
296 </or>
297 </condition>
298
299 <target name="-testInit" depends="-initHeadless">
300 <property name="headlessArg" value=""/>
301 <property name="junitJvmArgs"
302 value="-Xms${groovyJUnit_ms} -XX:PermSize=${groovyJUnit_permSize} -XX:MaxPermSize=${groovyJUnit_maxPermSize} ${headlessArg} -Dgroovy.testdb.props=${groovy.testdb.props} -DjavadocAssertion.src.dir=./src/main"/>
303 </target>
304
305 <target name="-initHeadless" if="_shouldBeHeadless_">
306 <property name="headlessArg" value="-Djava.awt.headless=true"/>
307 <echo message="Setting headless mode ..."/>
308 </target>
309
310 <target name="test"
311 depends="-banner,-checkAntVersion,-initializeReports,compileTest,-coverageInstrument,-testInit,-testOne,-testAll,-reportTestFailed"
312 description="Compile and test all the classes (or just one class if testCase property is defined)."/>
313
314 <target name="clean-test" depends="clean,test"
315 description="Clean and compile and test all the classes (or just one class if testCase property is defined)."/>
316
317 <condition property="_testOne_">
318 <and>
319 <not>
320 <istrue value="${_skipTests_}"/>
321 </not>
322 <isset property="testCase"/>
323 </and>
324 </condition>
325
326 <target name="-testOne" if="_testOne_" depends="-initGroovyc">
327 <mkdir dir="${junitRawDirectory}"/>
328 <junit printsummary="true" fork="true" includeantruntime="false" failureproperty="testFailed"
329 maxmemory="${groovyJUnit_mx}" dir="${basedir}">
330 <sysproperty key="apple.awt.UIElement" value="true"/>
331 <!-- keeps the dock from showing the AWT startup -->
332 <jvmarg line="${junitJvmArgs}"/>
333 <test name="${testCase}" todir="${junitRawDirectory}"/>
334 <formatter type="brief" usefile="false"/>
335 <classpath>
336 <pathelement path="${instrumentedClassesDirectory}"/>
337 <pathelement path="src/test"/>
338 <path refid="groovyMainClasses"/>
339 <path refid="testLibPath"/>
340 <pathelement path="${testClassesDirectory}"/>
341 <path refid="coberturaPath"/>
342 </classpath>
343 <assertions>
344 <enable/>
345 </assertions>
346 </junit>
347 </target>
348
349 <condition property="_testAll_">
350 <and>
351 <not>
352 <istrue value="${_skipTests_}"/>
353 </not>
354 <not>
355 <isset property="_testOne_"/>
356 </not>
357 </and>
358 </condition>
359
360 <target name="-collectOptionalTests">
361 <condition property="networkTests.fileset.includes" value="groovy/grape/*Test.class" else="-nothing-">
362 <istrue value="${junit.network}"/>
363 </condition>
364 <fileset id="optionalTests.fileset" dir="${testClassesDirectory}" includes="${networkTests.fileset.includes}"/>
365 </target>
366
367 <target name="-collect15tests" unless="groovy.build.vm6">
368 <fileset id="ubertests.fileset" dir="${testClassesDirectory}" includes="UberTest*.class" excludes="Uber*VM6.class"/>
369 </target>
370
371 <target name="-collect16tests" if="groovy.build.vm6">
372 <fileset id="ubertests.fileset" dir="${testClassesDirectory}" includes="UberTest*.class"/>
373 </target>
374
375 <target name="-testAll" if="_testAll_" depends="-collect15tests,-collect16tests,-collectOptionalTests,-initGroovyc">
376 <mkdir dir="${junitRawDirectory}"/>
377 <junit printsummary="true" fork="true" includeantruntime="false" failureproperty="testFailed"
378 maxmemory="${groovyJUnit_mx}" dir="${basedir}">
379 <jvmarg line="${junitJvmArgs}"/>
380 <sysproperty key="apple.awt.UIElement" value="true"/>
381 <!-- keeps the dock from showing the AWT startup -->
382 <formatter type="xml"/>
383 <formatter type="plain" unless="noTextReports"/>
384 <batchtest todir="${junitRawDirectory}">
385 <fileset refid="ubertests.fileset"/>
386 <fileset refid="optionalTests.fileset"/>
387 </batchtest>
388 <classpath>
389 <pathelement path="${instrumentedClassesDirectory}"/>
390 <pathelement path="src/test"/>
391 <path refid="groovyMainClasses"/>
392 <path refid="testLibPath"/>
393 <pathelement path="${testClassesDirectory}"/>
394 <path refid="coberturaPath"/>
395 </classpath>
396 <assertions>
397 <enable/>
398 </assertions>
399 </junit>
400 <mkdir dir="${junitReportsDirectory}"/>
401 <junitreport tofile="${junitRawDirectory}/Results.xml">
402 <fileset dir="${junitRawDirectory}" includes="TEST-*.xml"/>
403 <report format="frames" todir="${junitReportsDirectory}"/>
404 </junitreport>
405 </target>
406
407 <target name="-reportTestFailed" depends="-coverageReport" if="testFailed">
408 <fail message="Test failed, not processing further targets."/>
409 </target>
410
411 <target name="-coverageInstrument" depends="-initCoverage,-coberturaInit" if="_forceCoverage_">
412 <mkdir dir="${instrumentedClassesDirectory}"/>
413 <coberturaInstrument classesDirectory="${mainClassesDirectory}"/>
414 </target>
415
416 <target name="-coverageReport" depends="-initCoverage" if="_forceCoverage_">
417 <coberturaReport reportDirectory="${reportsDirectory}/cobertura" sourceDirectory="${mainSourceDirectory}"/>
418 </target>
419
420 <target name="-actuallyCreateJars"
421 depends="-makeManifest,-initializeJars,-createBaseJar,-createEmbeddableJar"
422 unless="testFailed"/>
423
424 <target name="-makeManifest">
425 <mkdir dir="${mainClassesDirectory}/META-INF"/>
426 <copy todir="${mainClassesDirectory}/META-INF" file="LICENSE.txt"/>
427 <makeManifest file="${mainClassesDirectory}/META-INF/MANIFEST.MF"/>
428 </target>
429
430 <macrodef name="makeManifest">
431 <attribute name="file"/>
432 <attribute name="bundleEnvironment" default="J2SE-1.5"/>
433 <sequential>
434 <manifest file="@{file}">
435 <attribute name="Built-By" value="${user.name}"/>
436 <attribute name="Extension-Name" value="groovy"/>
437 <attribute name="Specification-Title" value="Groovy: a powerful, dynamic language for the JVM"/>
438 <attribute name="Specification-Version" value="${groovyVersion}"/>
439 <attribute name="Specification-Vendor" value="The Codehaus"/>
440 <attribute name="Implementation-Title" value="Groovy: a powerful, dynamic language for the JVM"/>
441 <attribute name="Implementation-Version" value="${groovyVersion}"/>
442 <attribute name="Implementation-Vendor" value="The Codehaus"/>
443 <attribute name="Bundle-ManifestVersion" value="2"/>
444 <attribute name="Bundle-Name" value="Groovy Runtime"/>
445 <attribute name="Bundle-Description" value="Groovy Runtime"/>
446 <attribute name="Bundle-Version" value="${groovyBundleVersion}"/>
447 <attribute name="Bundle-Vendor" value="The Codehaus"/>
448 <attribute name="Bundle-ClassPath" value="."/>
449 <attribute name="Bundle-RequiredExecutionEnvironment" value="@{bundleEnvironment}"/>
450 <attribute name="Eclipse-BuddyPolicy" value="dependent"/>
451 <attribute name="Eclipse-LazyStart" value="true"/>
452 <attribute name="DynamicImport-Package" value="*"/>
453 </manifest>
454 </sequential>
455 </macrodef>
456
457 <target name="-includeResources" depends="-includeGroovyDocTemplates">
458 <copy todir="${mainClassesDirectory}">
459 <fileset dir="${mainSourceDirectory}">
460 <include name="META-INF/services/*"/>
461 <include name="groovy/grape/*.xml"/>
462 <include name="groovy/ui/*.properties"/>
463 <include name="groovy/ui/**/*.png"/>
464 <include name="groovy/inspect/swingui/AstBrowserProperties.groovy"/>
465 <include name="org/codehaus/groovy/tools/shell/**/*.properties"/>
466 <include name="org/codehaus/groovy/tools/groovydoc/**/*.properties"/>
467 <include name="org/codehaus/groovy/tools/shell/**/*.xml"/>
468 <include name="org/codehaus/groovy/antlib.xml"/>
469 </fileset>
470 </copy>
471 <antcall target="-includeReleaseInfo"/>
472 </target>
473
474 <target name="-includeReleaseInfo">
475 <copy file="${mainSourceDirectory}/META-INF/groovy-release-info.properties"
476 todir="${mainClassesDirectory}/META-INF" overwrite="true">
477 </copy>
478 <tstamp>
479 <format property="release.date" pattern="dd-MMM-yyyy"/>
480 <format property="release.time" pattern="hh:mm aa"/>
481 </tstamp>
482 <replace file="${mainClassesDirectory}/META-INF/groovy-release-info.properties">
483 <replacefilter token="##ImplementationVersion##" value="${groovyVersion}"/>
484 <replacefilter token="##BundleVersion##" value="${groovyBundleVersion}"/>
485 <replacefilter token="##BuildDate##" value="${release.date}"/>
486 <replacefilter token="##BuildTime##" value="${release.time}"/>
487 </replace>
488 </target>
489
490 <target name="-includeExamplesResources" depends="-includeGroovyDocTemplates">
491 <copy todir="${examplesClassesDirectory}">
492 <fileset dir="${examplesSourceDirectory}">
493 <include name="/swing/binding/caricature/resources/*.gif"/>
494 </fileset>
495 </copy>
496 </target>
497
498 <target name="-includeGroovyDocTemplates">
499 <copy todir="${mainClassesDirectory}">
500 <fileset dir="${mainSourceDirectory}">
501 <include name="org/codehaus/groovy/tools/groovydoc/gstringTemplates/*/*.*"/>
502 </fileset>
503 <fileset dir="${toolsSourceDirectory}">
504 <include name="org/codehaus/groovy/tools/groovy.ico"/>
505 </fileset>
506 </copy>
507 </target>
508
509 <target name="-initializeJars" depends="test" unless="_skipDocs_">
510 <delete dir="${targetDistDirectory}" quiet="true"/>
511 <mkdir dir="${targetDistDirectory}"/>
512 </target>
513
514 <target name="-createBaseJar" unless="testFailed">
515 <jar destfile="${targetDistDirectory}/groovy.jar" basedir="${mainClassesDirectory}"
516 excludes="*.groovy" manifest="${mainClassesDirectory}/META-INF/MANIFEST.MF"/>
517 <jar destfile="${targetDistDirectory}/groovy-${groovyVersion}-sources.jar" basedir="${mainSourceDirectory}"/>
518 </target>
519
520 <target name="-jarjarInit" unless="_skipEmbeddable_">
521 <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpathref="toolsPath"/>
522 </target>
523
524 <target name="-createEmbeddableJar" depends="-jarjarInit,-actuallyCreateEmbeddableJar" unless="testFailed"/>
525
526 <target name="-actuallyCreateEmbeddableJar" unless="_skipEmbeddable_">
527 <delete dir="${stagingDirectory}" quiet="true"/>
528 <mkdir dir="${stagingDirectory}"/>
529 <unzip dest="${stagingDirectory}">
530 <fileset dir="${runtimeLibDirectory}">
531 <include name="antlr*.jar"/>
532 <include name="asm*.jar"/>
533 <exclude name="asm-attr*.jar"/>
534 <exclude name="asm-util*.jar"/>
535 <exclude name="asm-analysis*.jar"/>
536 </fileset>
537 </unzip>
538 <unzip dest="${stagingDirectory}">
539 <fileset dir="${targetDistDirectory}">
540 <include name="groovy.jar"/>
541 </fileset>
542 </unzip>
543 <copy toDir="${stagingDirectory}/META-INF">
544 <fileset dir="${basedir}/config/build">
545 <include name="*LICENSE.txt"/>
546 </fileset>
547 </copy>
548 <!-- add commons-cli -->
549 <unzip dest="${stagingDirectory}">
550 <patternset>
551 <!-- no need for the manifest file, we have our own -->
552 <exclude name="META-INF/MANIFEST.MF"/>
553 </patternset>
554 <globmapper from="META-INF/LICENSE.txt" to="META-INF/CLI-LICENSE.txt"/>
555 <fileset dir="${runtimeLibDirectory}">
556 <include name="commons-cli-*.jar"/>
557 </fileset>
558 </unzip>
559 <makeManifest file="${stagingDirectory}/META-INF/MANIFEST.MF"/>
560 <!-- TODO try to make use of jarjar keep ability -->
561 <jarjar jarfile="${targetDistDirectory}/groovy-all.jar"
562 manifest="${stagingDirectory}/META-INF/MANIFEST.MF">
563 <fileset dir="${stagingDirectory}"
564 excludes="groovy/util/CliBuilder*.class,groovy/util/OptionAccessor*.class,org/codehaus/groovy/tools/shell/util/HelpFormatter*.class"/>
565 <rule pattern="antlr.**" result="groovyjarjarantlr.@1"/>
566 <rule pattern="org.objectweb.**" result="groovyjarjarasm.@1"/>
567 <rule pattern="org.apache.commons.cli.**" result="groovyjarjarcommonscli.@1"/>
568 </jarjar>
569 <jar destfile="${targetDistDirectory}/groovy-all.jar" update="true"
570 basedir="${stagingDirectory}"
571 includes="groovy/util/CliBuilder*.class,groovy/util/OptionAccessor*.class,org/codehaus/groovy/tools/shell/util/HelpFormatter*.class"/>
572
573 <copy file="${targetDistDirectory}/groovy-${groovyVersion}-sources.jar"
574 tofile="${targetDistDirectory}/groovy-all-${groovyVersion}-sources.jar"/>
575 <delete dir="${stagingDirectory}" quiet="true"/>
576 </target>
577
578 <target name="createJars" depends="-checkAntVersion,test,-actuallyCreateJars"
579 description="Build Groovy and create the jarfiles."/>
580
581 <target name="updateJarsForOsgi" unless="_skipOsgi_">
582 <taskdef resource="aQute/bnd/ant/taskdef.properties" classpathref="toolsPath"/>
583 <copy todir="${targetDistDirectory}">
584 <fileset dir="config/bnd" includes="groovy*.bnd"/>
585 <filterset>
586 <filter token="GROOVY_BUNDLE_VERSION" value="${groovyBundleVersion}"/>
587 </filterset>
588 </copy>
589 <property name="jarsToWrap" value="groovy.jar,groovy-all.jar"/>
590 <property name="runtimeJars" refid="runtimePath"/>
591 <bndwrap definitions="${targetDistDirectory}" output="${targetDistDirectory}" failok="true"
592 classpath="${runtimeJars}">
593 <fileset dir="${targetDistDirectory}" includes="${jarsToWrap}"/>
594 </bndwrap>
595 <delete dir="${targetDistDirectory}" includes="${jarsToWrap}"/>
596 <move todir="${targetDistDirectory}">
597 <fileset dir="${targetDistDirectory}" includes="groovy*.bar"/>
598 <globmapper from="groovy*.bar" to="groovy*-${groovyVersion}.jar"/>
599 </move>
600 <delete dir="${targetDistDirectory}" includes="groovy*.bnd"/>
601 </target>
602
603 <target name="skipOsgi" if="_skipOsgi_">
604 <move todir="${targetDistDirectory}">
605 <fileset dir="${targetDistDirectory}" includes="groovy*.jar"/>
606 <globmapper from="groovy*.jar" to="groovy*-${groovyVersion}.jar"/>
607 </move>
608 </target>
609
610 <target name="install" depends="createJars,updateJarsForOsgi,skipOsgi" unless="testFailed"
611 description="Create an installation hierarchy in target/install.">
612
613 <!--
614 FIXME: It's not really a good idea to delete stuff, as it tends to negate Ant's (or other tools)
615 ability to run faster incremental builds.
616 -->
617 <delete dir="${installDirectory}" quiet="true"/>
618 <mkdir dir="${installDirectory}"/>
619
620 <!-- Install license files -->
621 <copy todir="${installDirectory}">
622 <fileset dir="${basedir}">
623 <include name="LICENSE.txt"/>
624 <include name="NOTICE.txt"/>
625 </fileset>
626 </copy>
627 <unzip dest="${installDirectory}">
628 <patternset>
629 <include name="META-INF/*-LICENSE.txt"/>
630 </patternset>
631 <mapper type="flatten"/>
632 <fileset file="${targetDistDirectory}/groovy-all-${groovyVersion}.jar"/>
633 </unzip>
634 <fixcrlf srcdir="${installDirectory}" eol="crlf" includes="*.txt"/>
635
636 <!-- Install generated artifacts and runtime dependencies -->
637 <mkdir dir="${installDirectory}/lib"/>
638 <copy todir="${installDirectory}/lib">
639 <fileset dir="${targetDistDirectory}" includes="groovy-${groovyVersion}.jar"/>
640 <fileset dir="${runtimeLibDirectory}" includes="*.jar"/>
641 </copy>
642
643 <!-- Install the embeddable bits -->
644 <mkdir dir="${installDirectory}/embeddable"/>
645 <copy todir="${installDirectory}/embeddable">
646 <fileset dir="${targetDistDirectory}" includes="groovy-all-${groovyVersion}.jar"/>
647 </copy>
648
649 <!-- Install configuration files -->
650 <mkdir dir="${installDirectory}/conf"/>
651 <copy toDir="${installDirectory}/conf">
652 <fileset dir="${sourceDirectory}/conf" includes="*"/>
653 </copy>
654
655 <!-- Install scripts -->
656 <mkdir dir="${installDirectory}/bin"/>
657 <copy toDir="${installDirectory}/bin">
658 <fileset dir="${sourceDirectory}/bin" includes="*"/>
659 <filterset>
660 <filter token="GROOVYJAR" value="groovy-${groovyVersion}.jar"/>
661 </filterset>
662 </copy>
663 <!-- icon -->
664 <copy todir="${installDirectory}/bin" flatten="true">
665 <fileset dir="${toolsSourceDirectory}">
666 <include name="org/codehaus/groovy/tools/groovy.ico"/>
667 </fileset>
668 </copy>
669
670 <!-- Tweak scripts for platform compatibility -->
671 <fixcrlf srcdir="${installDirectory}/bin" eol="lf" excludes="*.bat, *.icns"/>
672 <fixcrlf srcdir="${installDirectory}/bin" eol="crlf" includes="*.bat"/>
673 <chmod perm="ugo+x">
674 <fileset dir="${installDirectory}/bin" includes="*,*.*"/>
675 </chmod>
676 </target>
677
678 <target name="checkstyle" depends="-init,-initializeReports,-checkstyleInit"
679 description="Create the code style reports.">
680 <checkAndReport
681 reportDirectory="${reportsDirectory}/checkstyle"
682 sourceDirectory="${mainSourceDirectory}"
683 excludes="org/codehaus/groovy/antlr/parser/*,org/codehaus/groovy/antlr/java/*,org/codehaus/groovy/syntax/Types.java">
684 <path>
685 <pathelement path="${mainClassesDirectory}"/>
686 <path refid="testLibPath"/>
687 </path>
688 </checkAndReport>
689 </target>
690
691 <target name="-compileTools" depends="-initGroovyc,compileMain">
692 <groovyc srcdir="${toolsSourceDirectory}" destdir="${toolsClassesDirectory}" fork="true">
693 <classpath>
694 <path refid="toolsPath"/>
695 <pathelement path="${mainClassesDirectory}"/>
696 <path refid="compilePath"/>
697 </classpath>
698 </groovyc>
699 <copy todir="${toolsClassesDirectory}">
700 <fileset dir="${toolsSourceDirectory}">
701 <include name="**/*.html"/>
702 </fileset>
703 </copy>
704 </target>
705
706 <target name="cruiseReportExtras">
707 <mkdir dir="${cruiseReportRootDirectory}"/>
708 <copy todir="${cruiseReportRootDirectory}">
709 <fileset dir="cruise/html"/>
710 </copy>
711 </target>
712
713 <target name="cruiseInit">
714 <property name="noTextReports" value="true"/>
715 <property name="forceCoverage" value="true"/>
716 <delete dir="${reportsDirectory}" quiet="true" failonerror="false"/>
717 <delete dir="${junitRawDirectory}" quiet="true" failonerror="false"/>
718 </target>
719
720 <target name="cruise" depends="cruiseInit,fulldist,cruiseReportExtras"/>
721
722 <target name="-docInit">
723 <mkdir dir="${docsDirectory}"/>
724 <property name="docFooter" value="Copyright &amp;copy; 2003-2010 The Codehaus. All rights reserved."/>
725 <property name="title" value="Groovy ${groovyVersion}"/>
726 </target>
727
728 <target name="doc" depends="javadoc, groovydoc" description="Create the documentation."/>
729
730 <target name="javadoc" depends="-fetchDependencies,-docInit,-jvm14BuildWarning,ensureGrammars"
731 unless="_skipDocs_" description="Create the javadoc documentation.">
732 <javadoc destdir="${docsDirectory}/api" author="true" version="true"
733 windowtitle="${title}" doctitle="${title}"
734 encoding="ISO-8859-1" useexternalfile="true" source="1.5"
735 footer="${docFooter}"
736 overview="src/main/overviewj.html"
737 maxmemory="${javaDoc_mx}"
738 >
739 <classpath>
740 <path path="${mainClassesDirectory}"/>
741 <path refid="compilePath"/>
742 </classpath>
743 <fileset dir="${mainSourceDirectory}" includes="**/*.java"/>
744 <link href="http://java.sun.com/javase/6/docs/api"/>
745 <link href="http://www.dpml.net/api/ant/1.7.0"/>
746 <link href="http://junit.sourceforge.net/junit3.8.1/javadoc"/>
747 <link href="http://java.sun.com/j2ee/1.4/docs/api"/>
748 <link href="http://www.antlr2.org/javadoc"/>
749 <link href="http://commons.apache.org/cli/api-release"/>
750 </javadoc>
751 <mkdir dir="${targetDistDirectory}"/>
752 <jar basedir="${docsDirectory}/api" destfile="${targetDistDirectory}/groovy-${groovyVersion}-javadoc.jar"/>
753 <copy toFile="${targetDistDirectory}/groovy-all-${groovyVersion}-javadoc.jar">
754 <fileset file="${targetDistDirectory}/groovy-${groovyVersion}-javadoc.jar"/>
755 </copy>
756 </target>
757
758 <target name="groovydoc" depends="-fetchDependencies" unless="_skipDocs_">
759 <path id="groovydocpath">
760 <path path="${mainClassesDirectory}"/>
761 <path refid="runtimePath"/>
762 </path>
763 <antforked target="realgroovydoc" maxmemory="${groovyDoc_mx}" classpathref="groovydocpath"/>
764 </target>
765
766 <target name="realgroovydoc" depends="-fetchDependencies,-docInit,-includeGroovyDocTemplates,docGDK">
767 <taskdef name="groovydoc" classname="org.codehaus.groovy.ant.Groovydoc">
768 <classpath>
769 <path path="${mainClassesDirectory}"/>
770 <path refid="compilePath"/>
771 </classpath>
772 </taskdef>
773 <groovydoc
774 destdir="${docsDirectory}/gapi"
775 sourcepath="${mainSourceDirectory}"
776 packagenames="**.*"
777 use="true"
778 windowtitle="${title}"
779 doctitle="${title}"
780 header="${title}"
781 footer="${docFooter}"
782 overview="src/main/overview.html">
783 <link packages="javax.servlet.,javax.management." href="http://java.sun.com/j2ee/1.4/docs/api"/>
784 <link packages="java.,org.xml.,javax.,org.xml." href="http://java.sun.com/javase/6/docs/api"/>
785 <link packages="org.apache.ant.,org.apache.tools.ant." href="http://www.dpml.net/api/ant/1.7.0"/>
786 <link packages="org.junit.,junit." href="http://junit.sourceforge.net/junit3.8.1/javadoc"/>
787 <link packages="org.apache.commons.cli." href="http://commons.apache.org/cli/api-release"/>
788 <link packages="antlr." href="http://www.antlr2.org/javadoc"/>
789 </groovydoc>
790 </target>
791
792 <target name="docGDK" depends="-fetchDependencies,-compileTools" description="Create the GDK documentation">
793 <java classname="org.codehaus.groovy.tools.DocGenerator" fork="yes" failonerror="true">
794 <classpath>
795 <pathelement path="${toolsClassesDirectory}"/>
796 <path refid="toolsPath"/>
797 <pathelement path="${mainClassesDirectory}"/>
798 </classpath>
799 <arg value="org.codehaus.groovy.runtime.DefaultGroovyMethods"/>
800 <arg value="org.codehaus.groovy.runtime.SqlGroovyMethods"/>
801 <arg value="org.codehaus.groovy.runtime.SwingGroovyMethods"/>
802 <arg value="org.codehaus.groovy.runtime.XmlGroovyMethods"/>
803 <arg value="org.codehaus.groovy.runtime.EncodingGroovyMethods"/>
804 <arg value="org.codehaus.groovy.runtime.DateGroovyMethods"/>
805 <arg value="org.codehaus.groovy.runtime.DefaultGroovyStaticMethods"/>
806 <arg value="org.codehaus.groovy.vmplugin.v5.PluginDefaultGroovyMethods"/>
807 <arg value="org.codehaus.groovy.vmplugin.v6.PluginDefaultGroovyMethods"/>
808 </java>
809 <copy todir="target/html/groovy-jdk" file="src/tools/org/codehaus/groovy/tools/groovy.ico"/>
810 <copy todir="target/html/groovy-jdk" file="src/tools/org/codehaus/groovy/tools/stylesheet.css"/>
811 </target>
812
813 <target name="clean" description="Clean up build artifacts.">
814 <delete dir="${targetDirectory}" quiet="true"/>
815 <delete file="cobertura.ser" quiet="true" failonerror="false"/>
816 <delete quiet="true">
817 <fileset dir="." includes="**/*~"/>
818 <fileset dir="${groovyParserDirectory}" includes="Groovy*.*"/>
819 <fileset dir="${javaParserDirectory}"
820 includes="JavaLexer.java,JavaRecognizer.java,JavaTokenTypes.java,JavaTokenTypes.txt,*.smap"/>
821 </delete>
822 </target>
823
824 <target name="deploy" depends="-mavenDeployInit,install,doc,-deployDefault,-deployFromServer"
825 description="Deploy jars to maven repository."/>
826
827 <target name="-deployDefault" unless="_forceServerSettings_">
828 <mavenDeploy version="${groovyVersion}" prefix="groovy"/>
829 <mavenDeploy version="${groovyVersion}" prefix="groovy-all"/>
830 </target>
831
832 <target name="-deployFromServer" if="_forceServerSettings_">
833 <copy tofile="target/settings.xml">
834 <fileset file="config/maven/settings.xml"/>
835 <filterset>
836 <filter token="groovy.deploy.username" value="${groovy.deploy.username}"/>
837 <filter token="groovy.deploy.password" value="${groovy.deploy.password}"/>
838 </filterset>
839 </copy>
840 <mavenDeploySettings version="${groovyVersion}" prefix="groovy" settings="target/settings.xml"/>
841 <mavenDeploySettings version="${groovyVersion}" prefix="groovy-all" settings="target/settings.xml"/>
842 <delete file="target/settings.xml"/>
843 </target>
844
845 <target name="installRepo" depends="-mavenInit,install,doc"
846 description="Deploy artifacts to local maven repository.">
847 <mavenInstallRepo version="${groovyVersion}" prefix="groovy"/>
848 <mavenInstallRepo version="${groovyVersion}" prefix="groovy-all"/>
849 </target>
850
851 <target name="quality" depends="install,checkstyle" description="install plus checkstyle"/>
852
853 <target name="release" depends="deploy,compileExamples" description="deploy plus compileExamples"/>
854
855 <target name="fulldist" depends="dist,compileExamples,checkstyle" description="dist plus examples plus checkstyle"/>
856
857 <target name="dist" depends="install,doc" description="Create everything needed for a distribution.">
858 <zip destfile="${targetDistDirectory}/groovy-binary-${groovyVersion}.zip"
859 comment="The Groovy ${groovyVersion} binary distribution.">
860
861 <!-- Make unix scripts executable -->
862 <zipfileset dir="${installDirectory}" prefix="groovy-${groovyVersion}" filemode="775">
863 <include name="bin/*"/>
864 <exclude name="bin/*.*"/>
865 <exclude name="bin/startGroovy*"/>
866 </zipfileset>
867
868 <!-- Include the other scripts as is -->
869 <zipfileset dir="${installDirectory}" prefix="groovy-${groovyVersion}">
870 <include name="bin/*.*"/>
871 <include name="bin/startGroovy*"/>
872 </zipfileset>
873
874 <!-- Include everything else as is too -->
875 <zipfileset dir="${installDirectory}" prefix="groovy-${groovyVersion}">
876 <exclude name="bin/**"/>
877 <include name="**"/>
878 </zipfileset>
879 </zip>
880
881 <zip destfile="${targetDistDirectory}/groovy-docs-${groovyVersion}.zip"
882 comment="The Groovy ${groovyVersion} documentation distribution.">
883 <zipfileset dir="${wikiPdfDirectory}" includes="wiki-snapshot.pdf" prefix="groovy-${groovyVersion}/pdf"/>
884 <zipfileset dir="${docsDirectory}" prefix="groovy-${groovyVersion}/html"/>
885 </zip>
886
887 <zip destfile="${targetDistDirectory}/groovy-src-${groovyVersion}.zip"
888 comment="The Groovy ${groovyVersion} source distribution.">
889 <zipfileset dir="${basedir}" prefix="groovy-${groovyVersion}">
890 <!-- Exclude generated bits as well as any other bits that shouldn't make it in -->
891 <exclude name="${targetDirectory}/**"/>
892 <exclude name="classes/**"/>
893 <exclude name="cruise/**"/>
894 <exclude name=".clover/*"/>
895 <exclude name="local.build.properties"/>
896 <exclude name="cobertura.ser"/>
897 <exclude name="junitvmwatcher*.properties"/>
898 </zipfileset>
899 </zip>
900 </target>
901
902</project>
0903
=== added directory '.pc/0002-ant-build.diff.patch/config'
=== added directory '.pc/0002-ant-build.diff.patch/config/ant'
=== added file '.pc/0002-ant-build.diff.patch/config/ant/build-setup.xml'
--- .pc/0002-ant-build.diff.patch/config/ant/build-setup.xml 1970-01-01 00:00:00 +0000
+++ .pc/0002-ant-build.diff.patch/config/ant/build-setup.xml 2011-02-24 17:57:34 +0000
@@ -0,0 +1,78 @@
1<?xml version="1.0"?>
2
3<!--
4Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
5compliance with the License. You may obtain a copy of the License at
6
7http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software distributed under the License is
10distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
11implied. See the License for the specific language governing permissions and limitations under the License.
12
13This work is copyright by the author(s) and is part of a greater work collectively copyright by the
14Groovy community. See the NOTICE.txt file distributed with this work for additional information.
15
16Author : Paul King
17$Revision: 5519 $ ($LastChangedBy: paulk $)
18$Date: 2007-03-11 19:14:07 +1000 (Sun, 11 Mar 2007) $
19-->
20
21<project name="build-setup" default="" basedir="../..">
22
23 <property name="bootstrapDirectory" location="bootstrap"/>
24 <property name="sourceDirectory" value="src"/>
25 <property name="wikiPdfDirectory" value="src"/>
26 <property name="mainSourceDirectory" location="${sourceDirectory}/main"/>
27 <property name="testSourceDirectory" value="${sourceDirectory}/test"/>
28 <property name="toolsSourceDirectory" location="${sourceDirectory}/tools"/>
29 <property name="examplesSourceDirectory" location="${sourceDirectory}/examples"/>
30
31 <property name="targetDirectory" value="target"/>
32 <property name="installDirectory" value="${targetDirectory}/install"/>
33 <property name="cruiseReportRootDirectory" value="${targetDirectory}/root"/>
34 <property name="stagingDirectory" value="${targetDirectory}/staging"/>
35 <property name="docsDirectory" value="${targetDirectory}/html"/>
36 <property name="mainClassesDirectory" value="${targetDirectory}/classes"/>
37 <property name="testClassesDirectory" value="${targetDirectory}/test-classes"/>
38 <property name="toolsClassesDirectory" value="${targetDirectory}/tools-classes"/>
39 <property name="mainStubsDirectory" value="${targetDirectory}/stubs"/>
40 <property name="testStubsDirectory" value="${targetDirectory}/test-stubs"/>
41
42 <property name="examplesClassesDirectory" value="${targetDirectory}/examples-classes"/>
43 <property name="instrumentedClassesDirectory" value="${targetDirectory}/instrumented-classes"/>
44 <property name="reportsDirectory" value="${targetDirectory}/reports"/>
45 <property name="targetLibDirectory" value="${targetDirectory}/lib"/>
46 <property name="targetDistDirectory" value="${targetDirectory}/dist"/>
47
48 <property name="antlrDirectory" value="${mainSourceDirectory}/org/codehaus/groovy/antlr"/>
49 <property name="groovyParserDirectory" value="${antlrDirectory}/parser"/>
50 <property name="javaParserDirectory" value="${antlrDirectory}/java"/>
51
52 <property name="compileLibDirectory" value="${targetLibDirectory}/compile"/>
53 <property name="testLibDirectory" value="${targetLibDirectory}/test"/>
54 <property name="runtimeLibDirectory" value="${targetLibDirectory}/runtime"/>
55 <property name="toolsLibDirectory" value="${targetLibDirectory}/tools"/>
56 <property name="examplesLibDirectory" value="${targetLibDirectory}/examples"/>
57 <property name="extrasLibDirectory" value="${targetLibDirectory}/extras"/>
58 <property name="junitRawDirectory" value="${targetDirectory}/test-reports"/>
59 <property name="junitReportsDirectory" value="${reportsDirectory}/junit"/>
60 <property name="relativePathToRealBasedir" value="."/>
61
62 <macrodef name="antforked">
63 <attribute name="target"/>
64 <attribute name="maxmemory" default="256m"/>
65 <attribute name="classpathref" default="runtimePath"/>
66 <sequential>
67 <java classname="org.apache.tools.ant.launch.Launcher" fork="true" maxmemory="@{maxmemory}" failonerror="true">
68 <classpath refid="@{classpathref}"/>
69 <jvmarg value="-Duser.home=${user.home}" />
70 <arg value="@{target}"/>
71 <arg value="-DskipFetch=${skipFetch}"/>
72 <arg value="-DruntimeLibDirectory=${runtimeLibDirectory}"/>
73 <arg value="-DtoolsLibDirectory=${toolsLibDirectory}" />
74 </java>
75 </sequential>
76 </macrodef>
77
78</project>
079
=== added directory '.pc/0003-disable-bnd.diff.patch'
=== added file '.pc/0003-disable-bnd.diff.patch/build.xml'
--- .pc/0003-disable-bnd.diff.patch/build.xml 1970-01-01 00:00:00 +0000
+++ .pc/0003-disable-bnd.diff.patch/build.xml 2011-02-24 17:57:34 +0000
@@ -0,0 +1,910 @@
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--
4Ant build script for Groovy.
5
6Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7compliance with the License. You may obtain a copy of the License at
8
9http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software distributed under the License is
12distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13implied. See the License for the specific language governing permissions and limitations under the License.
14
15This work is copyright by the author(s) and is part of a greater work collectively copyright by Codehaus on
16behalf of the Groovy community. See the NOTICE.txt file distributed with this work for additional information.
17
18Author : Russel Winder
19Author : Paul King
20$Revision: 20245 $ ($LastChangedBy: paulk $)
21$Date: 2010-06-07 02:45:33 +0200 (Mo, 07. Jun 2010) $
22-->
23
24<project name="Groovy" default="createJars" basedir=".">
25
26 <property file="local.build.properties"/>
27 <property file="build.properties"/>
28 <property name="ant.requiredVersion" value="1.6.5"/>
29
30 <!-- config/ant/build-maven.xml imports config/ant/build-setup.xml where all the paths are defined. -->
31 <import file="config/ant/build-setup.xml"/>
32 <import file="config/ant/build-checkstyle.xml"/>
33 <import file="config/ant/build-cobertura.xml"/>
34
35 <path id="compilePath">
36 <path path="${java.class.path}" />
37 </path>
38 <path id="toolsPath">
39 <path path="${java.class.path}" />
40 </path>
41
42 <condition property="_skipTests_">
43 <or>
44 <equals arg1="${test}" arg2="false"/>
45 <istrue value="${skipTests}"/>
46 </or>
47 </condition>
48
49 <condition property="_skipExamples_">
50 <istrue value="${skipExamples}"/>
51 </condition>
52
53 <condition property="_skipDocs_">
54 <istrue value="${skipDocs}"/>
55 </condition>
56
57 <condition property="_skipOsgi_">
58 <istrue value="${skipOsgi}"/>
59 </condition>
60
61 <condition property="_skipFetch_">
62 <istrue value="${skipFetch}"/>
63 </condition>
64
65 <condition property="_skipEmbeddable_">
66 <istrue value="${skipEmbeddable}"/>
67 </condition>
68
69 <condition property="_forceServerSettings_">
70 <istrue value="${forceServerSettings}"/>
71 </condition>
72
73 <condition property="groovy.build.vm4">
74 <contains string="${ant.java.version}" substring="1.4"/>
75 </condition>
76
77 <condition property="groovy.build.vm6">
78 <contains string="${ant.java.version}" substring="1.6"/>
79 </condition>
80
81 <presetdef name="javac">
82 <javac memoryMaximumSize="500m"/>
83 </presetdef>
84
85 <target name="-initCoverage">
86 <condition property="_forceCoverage_">
87 <and>
88 <not>
89 <istrue value="${skipTests}"/>
90 </not>
91 <istrue value="${forceCoverage}"/>
92 </and>
93 </condition>
94 </target>
95
96 <target name="ensureGrammars" description="Ensure all the Antlr generated files are up to date.">
97 <mkdir dir="${groovyParserDirectory}"/>
98 <antlr target="${antlrDirectory}/groovy.g" outputdirectory="${groovyParserDirectory}">
99 <classpath refid="compilePath"/>
100 </antlr>
101 <antlr target="${javaParserDirectory}/java.g" outputdirectory="${javaParserDirectory}">
102 <classpath refid="compilePath"/>
103 </antlr>
104 </target>
105
106 <target name="-init">
107 <xslt in="pom.xml" out="${targetDirectory}/groovy-all.pom" style="config/maven/groovy-all.xsl"/>
108 </target>
109
110 <target name="-banner">
111 <echo message="Java Runtime Environment version: ${java.version}"/>
112 <echo message="Java Runtime Environment vendor: ${java.vendor}"/>
113 <echo message="Ant version: ${ant.version}"/>
114 <echo message="Operating system name: ${os.name}"/>
115 <echo message="Operating system architecture: ${os.arch}"/>
116 <echo message="Operating system version: ${os.version}"/>
117 <echo message="Base directory: ${basedir}"/>
118 <echo message="Java Home: ${java.home}"/>
119 </target>
120
121 <target name="-jvm14BuildWarning" if="groovy.build.vm4">
122 <fail>Aborting!
123
124================================================
125 ERROR: You must build Groovy with a 1.5+ JDK
126================================================
127 </fail>
128 </target>
129
130 <target name="-checkAntVersion" depends="-excludeLegacyAntVersion"
131 description="Check that we are running on the required version of Ant."/>
132
133 <target name="-excludeLegacyAntVersion">
134 <!-- antversion didn't exist in early versions of ant so we have
135 a legacy check to provide a nicer error message in this case -->
136 <fail message="You are using ant ${ant.version}, please build using ant ${ant.requiredVersion}+">
137 <condition>
138 <or>
139 <contains string="${ant.version}" substring="1.1"></contains>
140 <contains string="${ant.version}" substring="1.2"></contains>
141 <contains string="${ant.version}" substring="1.3"></contains>
142 <contains string="${ant.version}" substring="1.4"></contains>
143 <contains string="${ant.version}" substring="1.5"></contains>
144 <and>
145 <contains string="${ant.version}" substring="1.6"></contains>
146 <not>
147 <contains string="${ant.version}" substring="${ant.requiredVersion}"></contains>
148 </not>
149 </and>
150 </or>
151 </condition>
152 </fail>
153 </target>
154
155 <!-- add back in if we make 1.7+ minimal required version for build again
156 <target name="-ensureRequiredAntVersion">
157 <fail message="You are using ant ${ant.version}, please install using ant ${ant.requiredVersion}+"/>
158 <condition><not><antversion atleast="${ant.requiredVersion}"/></not></condition>
159 </fail>
160 </target>
161 -->
162
163 <target name="compileMain" depends="stagedcompile"
164 description="Compile the Java and Groovy code in the main source.">
165 </target>
166
167 <target name="stagedcompile" depends="-init,ensureGrammars,-jvm14BuildWarning" unless="uber">
168 <mkdir dir="${mainClassesDirectory}"/>
169 <mkdir dir="${toolsClassesDirectory}"/>
170 <mkdir dir="${mainClassesDirectory}/META-INF"/>
171
172 <javac srcdir="${mainSourceDirectory}" includeantruntime="false" destdir="${mainClassesDirectory}"
173 deprecation="on" debug="yes" source="1.5" target="1.5" fork="true" classpathref="compilePath">
174 <exclude name="groovy/ui/**/*.java"/>
175 </javac>
176 <java classname="org.codehaus.groovy.tools.DgmConverter"
177 fork="yes"
178 failonerror="true">
179 <classpath refid="compilePath"/>
180 <classpath path="${mainClassesDirectory}"/>
181 </java>
182 <antcall inheritrefs="true" target="-stagedcompile-groovy"/>
183 <antcall target="-includeResources"/>
184 </target>
185
186 <target name="-stagedcompile-groovy" depends="-initGroovyc">
187 <groovyc srcdir="${mainSourceDirectory}" destdir="${mainClassesDirectory}" fork="true"
188 memorymaximumsize="${groovycMain_mx}">
189 <classpath>
190 <pathelement path="${mainClassesDirectory}"/>
191 <path refid="compilePath"/>
192 </classpath>
193 <javac deprecation="on" debug="yes" source="1.5" target="1.5"/>
194 </groovyc>
195 </target>
196
197 <property name="vm5GroovySourceFiles" value="**/*.groovy"/>
198 <property name="vm5JavaSourceFiles" value="**/*.java"/>
199 <property name="vm6GroovySourceFiles" value="groovy/**/vm6/*Test.groovy,org/codehaus/groovy/**/vm6/*Test.groovy"/>
200
201 <target name="-initGroovyc">
202 <path id="groovyMainClasses">
203 <pathelement path="${mainClassesDirectory}"/>
204 <path refid="compilePath"/>
205 </path>
206 <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="groovyMainClasses"/>
207 </target>
208
209 <target name="compileTest" depends="compileMain,compileTestOnly"
210 description="Compile the Java and Groovy code in the test source."/>
211
212 <target name="-cleanTest">
213 <delete dir="${testClassesDirectory}"/>
214 </target>
215
216 <target name="compileTestOnly" unless="_skipTests_">
217 <mkdir dir="${testClassesDirectory}"/>
218 <antcall inheritrefs="true" target="-compileTest"/>
219 </target>
220
221 <target name="-compileTest" depends="-initGroovyc,-compileTest_vm6">
222 <groovyc srcdir="${testSourceDirectory}"
223 destdir="${testClassesDirectory}"
224 includes="${vm5GroovySourceFiles},${vm5JavaSourceFiles}"
225 excludes="${vm6GroovySourceFiles}"
226 fork="true"
227 memorymaximumsize="${groovycTest_mx}">
228 <classpath>
229 <pathelement path="${testClassesDirectory}"/>
230 <path refid="groovyMainClasses"/>
231 <path refid="testLibPath"/>
232 </classpath>
233 <javac source="1.5" target="1.5" nowarn="on"/>
234 </groovyc>
235 </target>
236
237 <target name="-compileTest_vm6" if="groovy.build.vm6">
238 <groovyc srcdir="${testSourceDirectory}"
239 destdir="${testClassesDirectory}"
240 includes="${vm6GroovySourceFiles}"
241 fork="true"
242 memorymaximumsize="${groovycTest_mx}">
243 <classpath>
244 <pathelement path="${testClassesDirectory}"/>
245 <path refid="groovyMainClasses"/>
246 <path refid="testLibPath"/>
247 </classpath>
248 <!-- currently not needed, add in if/when required -->
249 <!--<javac source="1.5" target="1.5" nowarn="on"/>-->
250 </groovyc>
251 </target>
252
253 <target name="compileExamples" depends="-init,-initGroovyc,compileMain,-includeExamplesResources"
254 unless="_skipExamples_"
255 description="Compile the Java and Groovy code in the examples source directory.">
256 <mkdir dir="${examplesClassesDirectory}"/>
257 <echo message="Compiling example code."/>
258
259 <groovyc srcdir="${examplesSourceDirectory}/webapps/groovlet-examples/WEB-INF/groovy"
260 destdir="${examplesClassesDirectory}"
261 fork="true"
262 memorymaximumsize="${groovycExamples_mx}">
263 <classpath>
264 <pathelement path="${mainClassesDirectory}"/>
265 <path refid="compilePath"/>
266 <path refid="examplesPath"/>
267 </classpath>
268 </groovyc>
269 <javac srcdir="${examplesSourceDirectory}"
270 destdir="${examplesClassesDirectory}"
271 source="1.5"
272 target="1.5"
273 fork="true">
274 <classpath>
275 <pathelement path="${mainClassesDirectory}"/>
276 <pathelement path="${examplesClassesDirectory}"/>
277 <path refid="compilePath"/>
278 <path refid="examplesPath"/>
279 </classpath>
280 </javac>
281 <groovyc srcdir="${examplesSourceDirectory}"
282 destdir="${examplesClassesDirectory}"
283 fork="true"
284 memorymaximumsize="${groovycExamples_mx}"
285 excludes="webapps/groovlet-examples/WEB-INF/groovy/**/*.groovy,org/codehaus/groovy/grails/compiler/injection/**/*.java">
286 <classpath>
287 <pathelement path="${mainClassesDirectory}"/>
288 <pathelement path="${examplesClassesDirectory}"/>
289 <path refid="compilePath"/>
290 <path refid="examplesPath"/>
291 </classpath>
292 <javac source="1.5" target="1.5"/>
293 </groovyc>
294
295 </target>
296
297 <target name="-initializeReports">
298 <mkdir dir="${reportsDirectory}"/>
299 </target>
300
301 <condition property="_shouldBeHeadless_">
302 <or>
303 <istrue value="${java.awt.headless}"/>
304 <!--<os name="Mac OS X"/>-->
305 </or>
306 </condition>
307
308 <target name="-testInit" depends="-initHeadless">
309 <property name="headlessArg" value=""/>
310 <property name="junitJvmArgs"
311 value="-Xms${groovyJUnit_ms} -XX:PermSize=${groovyJUnit_permSize} -XX:MaxPermSize=${groovyJUnit_maxPermSize} ${headlessArg} -Dgroovy.testdb.props=${groovy.testdb.props} -DjavadocAssertion.src.dir=./src/main"/>
312 </target>
313
314 <target name="-initHeadless" if="_shouldBeHeadless_">
315 <property name="headlessArg" value="-Djava.awt.headless=true"/>
316 <echo message="Setting headless mode ..."/>
317 </target>
318
319 <target name="test"
320 depends="-banner,-checkAntVersion,-initializeReports,compileTest,-coverageInstrument,-testInit,-testOne,-testAll,-reportTestFailed"
321 description="Compile and test all the classes (or just one class if testCase property is defined)."/>
322
323 <target name="clean-test" depends="clean,test"
324 description="Clean and compile and test all the classes (or just one class if testCase property is defined)."/>
325
326 <condition property="_testOne_">
327 <and>
328 <not>
329 <istrue value="${_skipTests_}"/>
330 </not>
331 <isset property="testCase"/>
332 </and>
333 </condition>
334
335 <target name="-testOne" if="_testOne_" depends="-initGroovyc">
336 <mkdir dir="${junitRawDirectory}"/>
337 <junit printsummary="true" fork="true" includeantruntime="false" failureproperty="testFailed"
338 maxmemory="${groovyJUnit_mx}" dir="${basedir}">
339 <sysproperty key="apple.awt.UIElement" value="true"/>
340 <!-- keeps the dock from showing the AWT startup -->
341 <jvmarg line="${junitJvmArgs}"/>
342 <test name="${testCase}" todir="${junitRawDirectory}"/>
343 <formatter type="brief" usefile="false"/>
344 <classpath>
345 <pathelement path="${instrumentedClassesDirectory}"/>
346 <pathelement path="src/test"/>
347 <path refid="groovyMainClasses"/>
348 <path refid="testLibPath"/>
349 <pathelement path="${testClassesDirectory}"/>
350 <path refid="coberturaPath"/>
351 </classpath>
352 <assertions>
353 <enable/>
354 </assertions>
355 </junit>
356 </target>
357
358 <condition property="_testAll_">
359 <and>
360 <not>
361 <istrue value="${_skipTests_}"/>
362 </not>
363 <not>
364 <isset property="_testOne_"/>
365 </not>
366 </and>
367 </condition>
368
369 <target name="-collectOptionalTests">
370 <condition property="networkTests.fileset.includes" value="groovy/grape/*Test.class" else="-nothing-">
371 <istrue value="${junit.network}"/>
372 </condition>
373 <fileset id="optionalTests.fileset" dir="${testClassesDirectory}" includes="${networkTests.fileset.includes}"/>
374 </target>
375
376 <target name="-collect15tests" unless="groovy.build.vm6">
377 <fileset id="ubertests.fileset" dir="${testClassesDirectory}" includes="UberTest*.class" excludes="Uber*VM6.class"/>
378 </target>
379
380 <target name="-collect16tests" if="groovy.build.vm6">
381 <fileset id="ubertests.fileset" dir="${testClassesDirectory}" includes="UberTest*.class"/>
382 </target>
383
384 <target name="-testAll" if="_testAll_" depends="-collect15tests,-collect16tests,-collectOptionalTests,-initGroovyc">
385 <mkdir dir="${junitRawDirectory}"/>
386 <junit printsummary="true" fork="true" includeantruntime="false" failureproperty="testFailed"
387 maxmemory="${groovyJUnit_mx}" dir="${basedir}">
388 <jvmarg line="${junitJvmArgs}"/>
389 <sysproperty key="apple.awt.UIElement" value="true"/>
390 <!-- keeps the dock from showing the AWT startup -->
391 <formatter type="xml"/>
392 <formatter type="plain" unless="noTextReports"/>
393 <batchtest todir="${junitRawDirectory}">
394 <fileset refid="ubertests.fileset"/>
395 <fileset refid="optionalTests.fileset"/>
396 </batchtest>
397 <classpath>
398 <pathelement path="${instrumentedClassesDirectory}"/>
399 <pathelement path="src/test"/>
400 <path refid="groovyMainClasses"/>
401 <path refid="testLibPath"/>
402 <pathelement path="${testClassesDirectory}"/>
403 <path refid="coberturaPath"/>
404 </classpath>
405 <assertions>
406 <enable/>
407 </assertions>
408 </junit>
409 <mkdir dir="${junitReportsDirectory}"/>
410 <junitreport tofile="${junitRawDirectory}/Results.xml">
411 <fileset dir="${junitRawDirectory}" includes="TEST-*.xml"/>
412 <report format="frames" todir="${junitReportsDirectory}"/>
413 </junitreport>
414 </target>
415
416 <target name="-reportTestFailed" depends="-coverageReport" if="testFailed">
417 <fail message="Test failed, not processing further targets."/>
418 </target>
419
420 <target name="-coverageInstrument" if="_forceCoverage_">
421 <mkdir dir="${instrumentedClassesDirectory}"/>
422 <!--coberturaInstrument classesDirectory="${mainClassesDirectory}"/-->
423 </target>
424
425 <target name="-coverageReport" depends="-initCoverage" if="_forceCoverage_">
426 <!--coberturaReport reportDirectory="${reportsDirectory}/cobertura" sourceDirectory="${mainSourceDirectory}"/-->
427 </target>
428
429 <target name="-actuallyCreateJars"
430 depends="-makeManifest,-initializeJars,-createBaseJar,-createEmbeddableJar"
431 unless="testFailed"/>
432
433 <target name="-makeManifest">
434 <mkdir dir="${mainClassesDirectory}/META-INF"/>
435 <copy todir="${mainClassesDirectory}/META-INF" file="LICENSE.txt"/>
436 <makeManifest file="${mainClassesDirectory}/META-INF/MANIFEST.MF"/>
437 </target>
438
439 <macrodef name="makeManifest">
440 <attribute name="file"/>
441 <attribute name="bundleEnvironment" default="J2SE-1.5"/>
442 <sequential>
443 <manifest file="@{file}">
444 <attribute name="Built-By" value="${user.name}"/>
445 <attribute name="Extension-Name" value="groovy"/>
446 <attribute name="Specification-Title" value="Groovy: a powerful, dynamic language for the JVM"/>
447 <attribute name="Specification-Version" value="${groovyVersion}"/>
448 <attribute name="Specification-Vendor" value="The Codehaus"/>
449 <attribute name="Implementation-Title" value="Groovy: a powerful, dynamic language for the JVM"/>
450 <attribute name="Implementation-Version" value="${groovyVersion}"/>
451 <attribute name="Implementation-Vendor" value="The Codehaus"/>
452 <attribute name="Bundle-ManifestVersion" value="2"/>
453 <attribute name="Bundle-Name" value="Groovy Runtime"/>
454 <attribute name="Bundle-Description" value="Groovy Runtime"/>
455 <attribute name="Bundle-Version" value="${groovyBundleVersion}"/>
456 <attribute name="Bundle-Vendor" value="The Codehaus"/>
457 <attribute name="Bundle-ClassPath" value="."/>
458 <attribute name="Bundle-RequiredExecutionEnvironment" value="@{bundleEnvironment}"/>
459 <attribute name="Eclipse-BuddyPolicy" value="dependent"/>
460 <attribute name="Eclipse-LazyStart" value="true"/>
461 <attribute name="DynamicImport-Package" value="*"/>
462 </manifest>
463 </sequential>
464 </macrodef>
465
466 <target name="-includeResources" depends="-includeGroovyDocTemplates">
467 <copy todir="${mainClassesDirectory}">
468 <fileset dir="${mainSourceDirectory}">
469 <include name="META-INF/services/*"/>
470 <include name="groovy/grape/*.xml"/>
471 <include name="groovy/ui/*.properties"/>
472 <include name="groovy/ui/**/*.png"/>
473 <include name="groovy/inspect/swingui/AstBrowserProperties.groovy"/>
474 <include name="org/codehaus/groovy/tools/shell/**/*.properties"/>
475 <include name="org/codehaus/groovy/tools/groovydoc/**/*.properties"/>
476 <include name="org/codehaus/groovy/tools/shell/**/*.xml"/>
477 <include name="org/codehaus/groovy/antlib.xml"/>
478 </fileset>
479 </copy>
480 <antcall target="-includeReleaseInfo"/>
481 </target>
482
483 <target name="-includeReleaseInfo">
484 <copy file="${mainSourceDirectory}/META-INF/groovy-release-info.properties"
485 todir="${mainClassesDirectory}/META-INF" overwrite="true">
486 </copy>
487 <tstamp>
488 <format property="release.date" pattern="dd-MMM-yyyy"/>
489 <format property="release.time" pattern="hh:mm aa"/>
490 </tstamp>
491 <replace file="${mainClassesDirectory}/META-INF/groovy-release-info.properties">
492 <replacefilter token="##ImplementationVersion##" value="${groovyVersion}"/>
493 <replacefilter token="##BundleVersion##" value="${groovyBundleVersion}"/>
494 <replacefilter token="##BuildDate##" value="${release.date}"/>
495 <replacefilter token="##BuildTime##" value="${release.time}"/>
496 </replace>
497 </target>
498
499 <target name="-includeExamplesResources" depends="-includeGroovyDocTemplates">
500 <copy todir="${examplesClassesDirectory}">
501 <fileset dir="${examplesSourceDirectory}">
502 <include name="/swing/binding/caricature/resources/*.gif"/>
503 </fileset>
504 </copy>
505 </target>
506
507 <target name="-includeGroovyDocTemplates">
508 <copy todir="${mainClassesDirectory}">
509 <fileset dir="${mainSourceDirectory}">
510 <include name="org/codehaus/groovy/tools/groovydoc/gstringTemplates/*/*.*"/>
511 </fileset>
512 <fileset dir="${toolsSourceDirectory}">
513 <include name="org/codehaus/groovy/tools/groovy.ico"/>
514 </fileset>
515 </copy>
516 </target>
517
518 <target name="-initializeJars" depends="test" unless="_skipDocs_">
519 <delete dir="${targetDistDirectory}" quiet="true"/>
520 <mkdir dir="${targetDistDirectory}"/>
521 </target>
522
523 <target name="-createBaseJar" unless="testFailed">
524 <jar destfile="${targetDistDirectory}/groovy.jar" basedir="${mainClassesDirectory}"
525 excludes="*.groovy" manifest="${mainClassesDirectory}/META-INF/MANIFEST.MF"/>
526 <jar destfile="${targetDistDirectory}/groovy-${groovyVersion}-sources.jar" basedir="${mainSourceDirectory}"/>
527 </target>
528
529 <target name="-jarjarInit" unless="_skipEmbeddable_">
530 <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpathref="toolsPath"/>
531 </target>
532
533 <target name="-createEmbeddableJar" depends="-jarjarInit,-actuallyCreateEmbeddableJar" unless="testFailed"/>
534
535 <target name="-actuallyCreateEmbeddableJar" unless="_skipEmbeddable_">
536 <delete dir="${stagingDirectory}" quiet="true"/>
537 <mkdir dir="${stagingDirectory}"/>
538 <unzip dest="${stagingDirectory}">
539 <fileset dir="/usr/share/java">
540 <include name="antlr.jar"/>
541 <include name="asm3.jar"/>
542 <include name="asm3-commons.jar"/>
543 <include name="asm3-tree.jar"/>
544 <include name="asm3-xml.jar"/>
545 </fileset>
546 </unzip>
547 <unzip dest="${stagingDirectory}">
548 <fileset dir="${targetDistDirectory}">
549 <include name="groovy.jar"/>
550 </fileset>
551 </unzip>
552 <copy toDir="${stagingDirectory}/META-INF">
553 <fileset dir="${basedir}/config/build">
554 <include name="*LICENSE.txt"/>
555 </fileset>
556 </copy>
557 <!-- add commons-cli -->
558 <unzip dest="${stagingDirectory}">
559 <patternset>
560 <!-- no need for the manifest file, we have our own -->
561 <exclude name="META-INF/MANIFEST.MF"/>
562 </patternset>
563 <globmapper from="META-INF/LICENSE.txt" to="META-INF/CLI-LICENSE.txt"/>
564 <fileset dir="/usr/share/java">
565 <include name="commons-cli.jar"/>
566 </fileset>
567 </unzip>
568 <makeManifest file="${stagingDirectory}/META-INF/MANIFEST.MF"/>
569 <!-- TODO try to make use of jarjar keep ability -->
570 <jarjar jarfile="${targetDistDirectory}/groovy-all.jar"
571 manifest="${stagingDirectory}/META-INF/MANIFEST.MF">
572 <fileset dir="${stagingDirectory}"
573 excludes="groovy/util/CliBuilder*.class,groovy/util/OptionAccessor*.class,org/codehaus/groovy/tools/shell/util/HelpFormatter*.class"/>
574 <rule pattern="antlr.**" result="groovyjarjarantlr.@1"/>
575 <rule pattern="org.objectweb.**" result="groovyjarjarasm.@1"/>
576 <rule pattern="org.apache.commons.cli.**" result="groovyjarjarcommonscli.@1"/>
577 </jarjar>
578 <jar destfile="${targetDistDirectory}/groovy-all.jar" update="true"
579 basedir="${stagingDirectory}"
580 includes="groovy/util/CliBuilder*.class,groovy/util/OptionAccessor*.class,org/codehaus/groovy/tools/shell/util/HelpFormatter*.class"/>
581
582 <copy file="${targetDistDirectory}/groovy-${groovyVersion}-sources.jar"
583 tofile="${targetDistDirectory}/groovy-all-${groovyVersion}-sources.jar"/>
584 <delete dir="${stagingDirectory}" quiet="true"/>
585 </target>
586
587 <target name="createJars" depends="-checkAntVersion,test,-actuallyCreateJars"
588 description="Build Groovy and create the jarfiles."/>
589
590 <target name="updateJarsForOsgi" unless="_skipOsgi_">
591 <taskdef resource="aQute/bnd/ant/taskdef.properties" classpath="/usr/share/java/bnd.jar"/>
592 <copy todir="${targetDistDirectory}">
593 <fileset dir="config/bnd" includes="groovy*.bnd"/>
594 <filterset>
595 <filter token="GROOVY_BUNDLE_VERSION" value="${groovyBundleVersion}"/>
596 </filterset>
597 </copy>
598 <property name="jarsToWrap" value="groovy.jar,groovy-all.jar"/>
599 <property name="runtimeJars" refid="runtimePath"/>
600 <bndwrap definitions="${targetDistDirectory}" output="${targetDistDirectory}" failok="true"
601 classpath="${runtimeJars}">
602 <fileset dir="${targetDistDirectory}" includes="${jarsToWrap}"/>
603 </bndwrap>
604 <delete dir="${targetDistDirectory}" includes="${jarsToWrap}"/>
605 <move todir="${targetDistDirectory}">
606 <fileset dir="${targetDistDirectory}" includes="groovy*.bar"/>
607 <globmapper from="groovy*.bar" to="groovy*-${groovyVersion}.jar"/>
608 </move>
609 <delete dir="${targetDistDirectory}" includes="groovy*.bnd"/>
610 </target>
611
612 <target name="skipOsgi" if="_skipOsgi_">
613 <move todir="${targetDistDirectory}">
614 <fileset dir="${targetDistDirectory}" includes="groovy*.jar"/>
615 <globmapper from="groovy*.jar" to="groovy*-${groovyVersion}.jar"/>
616 </move>
617 </target>
618
619 <target name="install" depends="createJars,updateJarsForOsgi,skipOsgi" unless="testFailed"
620 description="Create an installation hierarchy in target/install.">
621
622 <!--
623 FIXME: It's not really a good idea to delete stuff, as it tends to negate Ant's (or other tools)
624 ability to run faster incremental builds.
625 -->
626 <delete dir="${installDirectory}" quiet="true"/>
627 <mkdir dir="${installDirectory}"/>
628
629 <!-- Install license files -->
630 <copy todir="${installDirectory}">
631 <fileset dir="${basedir}">
632 <include name="LICENSE.txt"/>
633 <include name="NOTICE.txt"/>
634 </fileset>
635 </copy>
636 <unzip dest="${installDirectory}">
637 <patternset>
638 <include name="META-INF/*-LICENSE.txt"/>
639 </patternset>
640 <mapper type="flatten"/>
641 <fileset file="${targetDistDirectory}/groovy-all-${groovyVersion}.jar"/>
642 </unzip>
643 <fixcrlf srcdir="${installDirectory}" eol="crlf" includes="*.txt"/>
644
645 <!-- Install generated artifacts and runtime dependencies -->
646 <mkdir dir="${installDirectory}/lib"/>
647 <copy todir="${installDirectory}/lib">
648 <fileset dir="${targetDistDirectory}" includes="groovy-${groovyVersion}.jar"/>
649 </copy>
650
651 <!-- Install the embeddable bits -->
652 <mkdir dir="${installDirectory}/embeddable"/>
653 <copy todir="${installDirectory}/embeddable">
654 <fileset dir="${targetDistDirectory}" includes="groovy-all-${groovyVersion}.jar"/>
655 </copy>
656
657 <!-- Install configuration files -->
658 <mkdir dir="${installDirectory}/conf"/>
659 <copy toDir="${installDirectory}/conf">
660 <fileset dir="${sourceDirectory}/conf" includes="*"/>
661 </copy>
662
663 <!-- Install scripts -->
664 <mkdir dir="${installDirectory}/bin"/>
665 <copy toDir="${installDirectory}/bin">
666 <fileset dir="${sourceDirectory}/bin" includes="*"/>
667 <filterset>
668 <filter token="GROOVYJAR" value="groovy-${groovyVersion}.jar"/>
669 </filterset>
670 </copy>
671 <!-- icon -->
672 <copy todir="${installDirectory}/bin" flatten="true">
673 <fileset dir="${toolsSourceDirectory}">
674 <include name="org/codehaus/groovy/tools/groovy.ico"/>
675 </fileset>
676 </copy>
677
678 <!-- Tweak scripts for platform compatibility -->
679 <fixcrlf srcdir="${installDirectory}/bin" eol="lf" excludes="*.bat, *.icns"/>
680 <fixcrlf srcdir="${installDirectory}/bin" eol="crlf" includes="*.bat"/>
681 <chmod perm="ugo+x">
682 <fileset dir="${installDirectory}/bin" includes="*,*.*"/>
683 </chmod>
684 </target>
685
686 <target name="checkstyle" depends="-init,-initializeReports"
687 description="Create the code style reports.">
688 <checkAndReport
689 reportDirectory="${reportsDirectory}/checkstyle"
690 sourceDirectory="${mainSourceDirectory}"
691 excludes="org/codehaus/groovy/antlr/parser/*,org/codehaus/groovy/antlr/java/*,org/codehaus/groovy/syntax/Types.java">
692 <path>
693 <pathelement path="${mainClassesDirectory}"/>
694 <path refid="testLibPath"/>
695 </path>
696 </checkAndReport>
697 </target>
698
699 <target name="-compileTools" depends="-initGroovyc,compileMain">
700 <groovyc srcdir="${toolsSourceDirectory}" destdir="${toolsClassesDirectory}" fork="true">
701 <classpath>
702 <path refid="toolsPath"/>
703 <pathelement path="${mainClassesDirectory}"/>
704 <path refid="compilePath"/>
705 </classpath>
706 </groovyc>
707 <copy todir="${toolsClassesDirectory}">
708 <fileset dir="${toolsSourceDirectory}">
709 <include name="**/*.html"/>
710 </fileset>
711 </copy>
712 </target>
713
714 <target name="cruiseReportExtras">
715 <mkdir dir="${cruiseReportRootDirectory}"/>
716 <copy todir="${cruiseReportRootDirectory}">
717 <fileset dir="cruise/html"/>
718 </copy>
719 </target>
720
721 <target name="cruiseInit">
722 <property name="noTextReports" value="true"/>
723 <property name="forceCoverage" value="true"/>
724 <delete dir="${reportsDirectory}" quiet="true" failonerror="false"/>
725 <delete dir="${junitRawDirectory}" quiet="true" failonerror="false"/>
726 </target>
727
728 <target name="cruise" depends="cruiseInit,fulldist,cruiseReportExtras"/>
729
730 <target name="-docInit">
731 <mkdir dir="${docsDirectory}"/>
732 <property name="docFooter" value="Copyright &amp;copy; 2003-2010 The Codehaus. All rights reserved."/>
733 <property name="title" value="Groovy ${groovyVersion}"/>
734 </target>
735
736 <target name="doc" depends="javadoc, groovydoc" description="Create the documentation."/>
737
738 <target name="javadoc" depends="-docInit,-jvm14BuildWarning,ensureGrammars"
739 unless="_skipDocs_" description="Create the javadoc documentation.">
740 <javadoc destdir="${docsDirectory}/api" author="true" version="true"
741 windowtitle="${title}" doctitle="${title}"
742 encoding="ISO-8859-1" useexternalfile="true" source="1.5"
743 footer="${docFooter}"
744 overview="src/main/overviewj.html"
745 maxmemory="${javaDoc_mx}"
746 >
747 <classpath>
748 <path path="${mainClassesDirectory}"/>
749 <path refid="compilePath"/>
750 </classpath>
751 <fileset dir="${mainSourceDirectory}" includes="**/*.java"/>
752 <link href="http://java.sun.com/javase/6/docs/api"/>
753 <link href="http://www.dpml.net/api/ant/1.7.0"/>
754 <link href="http://junit.sourceforge.net/junit3.8.1/javadoc"/>
755 <link href="http://java.sun.com/j2ee/1.4/docs/api"/>
756 <link href="http://www.antlr2.org/javadoc"/>
757 <link href="http://commons.apache.org/cli/api-release"/>
758 </javadoc>
759 <mkdir dir="${targetDistDirectory}"/>
760 <jar basedir="${docsDirectory}/api" destfile="${targetDistDirectory}/groovy-${groovyVersion}-javadoc.jar"/>
761 <copy toFile="${targetDistDirectory}/groovy-all-${groovyVersion}-javadoc.jar">
762 <fileset file="${targetDistDirectory}/groovy-${groovyVersion}-javadoc.jar"/>
763 </copy>
764 </target>
765
766 <target name="groovydoc">
767 <path id="groovydocpath">
768 <path path="${mainClassesDirectory}"/>
769 <path refid="compilePath"/>
770 </path>
771 <antforked target="realgroovydoc" maxmemory="${groovyDoc_mx}" classpathref="groovydocpath"/>
772 </target>
773
774 <target name="realgroovydoc" depends="-docInit,-includeGroovyDocTemplates,docGDK">
775 <taskdef name="groovydoc" classname="org.codehaus.groovy.ant.Groovydoc">
776 <classpath>
777 <path path="${mainClassesDirectory}"/>
778 <path refid="compilePath"/>
779 </classpath>
780 </taskdef>
781 <groovydoc
782 destdir="${docsDirectory}/gapi"
783 sourcepath="${mainSourceDirectory}"
784 packagenames="**.*"
785 use="true"
786 windowtitle="${title}"
787 doctitle="${title}"
788 header="${title}"
789 footer="${docFooter}"
790 overview="src/main/overview.html">
791 <link packages="javax.servlet.,javax.management." href="http://java.sun.com/j2ee/1.4/docs/api"/>
792 <link packages="java.,org.xml.,javax.,org.xml." href="http://java.sun.com/javase/6/docs/api"/>
793 <link packages="org.apache.ant.,org.apache.tools.ant." href="http://www.dpml.net/api/ant/1.7.0"/>
794 <link packages="org.junit.,junit." href="http://junit.sourceforge.net/junit3.8.1/javadoc"/>
795 <link packages="org.apache.commons.cli." href="http://commons.apache.org/cli/api-release"/>
796 <link packages="antlr." href="http://www.antlr2.org/javadoc"/>
797 </groovydoc>
798 </target>
799
800 <target name="docGDK" depends="-compileTools" description="Create the GDK documentation">
801 <java classname="org.codehaus.groovy.tools.DocGenerator" fork="yes" failonerror="true">
802 <classpath>
803 <pathelement path="${toolsClassesDirectory}"/>
804 <path refid="toolsPath"/>
805 <pathelement path="${mainClassesDirectory}"/>
806 </classpath>
807 <arg value="org.codehaus.groovy.runtime.DefaultGroovyMethods"/>
808 <arg value="org.codehaus.groovy.runtime.SqlGroovyMethods"/>
809 <arg value="org.codehaus.groovy.runtime.SwingGroovyMethods"/>
810 <arg value="org.codehaus.groovy.runtime.XmlGroovyMethods"/>
811 <arg value="org.codehaus.groovy.runtime.EncodingGroovyMethods"/>
812 <arg value="org.codehaus.groovy.runtime.DateGroovyMethods"/>
813 <arg value="org.codehaus.groovy.runtime.DefaultGroovyStaticMethods"/>
814 <arg value="org.codehaus.groovy.vmplugin.v5.PluginDefaultGroovyMethods"/>
815 <arg value="org.codehaus.groovy.vmplugin.v6.PluginDefaultGroovyMethods"/>
816 </java>
817 <copy todir="target/html/groovy-jdk" file="src/tools/org/codehaus/groovy/tools/groovy.ico"/>
818 <copy todir="target/html/groovy-jdk" file="src/tools/org/codehaus/groovy/tools/stylesheet.css"/>
819 </target>
820
821 <target name="clean" description="Clean up build artifacts.">
822 <delete dir="${targetDirectory}" quiet="true"/>
823 <delete file="cobertura.ser" quiet="true" failonerror="false"/>
824 <delete quiet="true">
825 <fileset dir="." includes="**/*~"/>
826 <fileset dir="${groovyParserDirectory}" includes="Groovy*.*"/>
827 <fileset dir="${javaParserDirectory}"
828 includes="JavaLexer.java,JavaRecognizer.java,JavaTokenTypes.java,JavaTokenTypes.txt,*.smap"/>
829 </delete>
830 </target>
831
832 <target name="deploy" depends="install,doc"
833 description="Deploy jars to maven repository."/>
834
835 <target name="-deployDefault" unless="_forceServerSettings_">
836 <mavenDeploy version="${groovyVersion}" prefix="groovy"/>
837 <mavenDeploy version="${groovyVersion}" prefix="groovy-all"/>
838 </target>
839
840 <target name="-deployFromServer" if="_forceServerSettings_">
841 <copy tofile="target/settings.xml">
842 <fileset file="config/maven/settings.xml"/>
843 <filterset>
844 <filter token="groovy.deploy.username" value="${groovy.deploy.username}"/>
845 <filter token="groovy.deploy.password" value="${groovy.deploy.password}"/>
846 </filterset>
847 </copy>
848 <mavenDeploySettings version="${groovyVersion}" prefix="groovy" settings="target/settings.xml"/>
849 <mavenDeploySettings version="${groovyVersion}" prefix="groovy-all" settings="target/settings.xml"/>
850 <delete file="target/settings.xml"/>
851 </target>
852
853 <target name="installRepo" depends="install,doc"
854 description="Deploy artifacts to local maven repository.">
855 <mavenInstallRepo version="${groovyVersion}" prefix="groovy"/>
856 <mavenInstallRepo version="${groovyVersion}" prefix="groovy-all"/>
857 </target>
858
859 <target name="quality" depends="install,checkstyle" description="install plus checkstyle"/>
860
861 <target name="release" depends="deploy,compileExamples" description="deploy plus compileExamples"/>
862
863 <target name="fulldist" depends="dist,compileExamples,checkstyle" description="dist plus examples plus checkstyle"/>
864
865 <target name="dist" depends="install,doc" description="Create everything needed for a distribution.">
866 <zip destfile="${targetDistDirectory}/groovy-binary-${groovyVersion}.zip"
867 comment="The Groovy ${groovyVersion} binary distribution.">
868
869 <!-- Make unix scripts executable -->
870 <zipfileset dir="${installDirectory}" prefix="groovy-${groovyVersion}" filemode="775">
871 <include name="bin/*"/>
872 <exclude name="bin/*.*"/>
873 <exclude name="bin/startGroovy*"/>
874 </zipfileset>
875
876 <!-- Include the other scripts as is -->
877 <zipfileset dir="${installDirectory}" prefix="groovy-${groovyVersion}">
878 <include name="bin/*.*"/>
879 <include name="bin/startGroovy*"/>
880 </zipfileset>
881
882 <!-- Include everything else as is too -->
883 <zipfileset dir="${installDirectory}" prefix="groovy-${groovyVersion}">
884 <exclude name="bin/**"/>
885 <include name="**"/>
886 </zipfileset>
887 </zip>
888
889 <zip destfile="${targetDistDirectory}/groovy-docs-${groovyVersion}.zip"
890 comment="The Groovy ${groovyVersion} documentation distribution.">
891 <zipfileset dir="${wikiPdfDirectory}" includes="wiki-snapshot.pdf" prefix="groovy-${groovyVersion}/pdf"/>
892 <zipfileset dir="${docsDirectory}" prefix="groovy-${groovyVersion}/html"/>
893 </zip>
894
895 <zip destfile="${targetDistDirectory}/groovy-src-${groovyVersion}.zip"
896 comment="The Groovy ${groovyVersion} source distribution.">
897 <zipfileset dir="${basedir}" prefix="groovy-${groovyVersion}">
898 <!-- Exclude generated bits as well as any other bits that shouldn't make it in -->
899 <exclude name="${targetDirectory}/**"/>
900 <exclude name="classes/**"/>
901 <exclude name="cruise/**"/>
902 <exclude name=".clover/*"/>
903 <exclude name="local.build.properties"/>
904 <exclude name="cobertura.ser"/>
905 <exclude name="junitvmwatcher*.properties"/>
906 </zipfileset>
907 </zip>
908 </target>
909
910</project>
0911
=== removed directory '.pc/ant-build.diff'
=== removed file '.pc/ant-build.diff/build.xml'
--- .pc/ant-build.diff/build.xml 2010-02-26 16:39:51 +0000
+++ .pc/ant-build.diff/build.xml 1970-01-01 00:00:00 +0000
@@ -1,865 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--
4Ant build script for Groovy.
5
6Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7compliance with the License. You may obtain a copy of the License at
8
9http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software distributed under the License is
12distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13implied. See the License for the specific language governing permissions and limitations under the License.
14
15This work is copyright by the author(s) and is part of a greater work collectively copyright by Codehaus on
16behalf of the Groovy community. See the NOTICE.txt file distributed with this work for additional information.
17
18Author : Russel Winder
19Author : Paul King
20$Revision: 18555 $ ($LastChangedBy: paulk $)
21$Date: 2009-12-08 14:08:59 +0100 (Di, 08. Dez 2009) $
22-->
23
24<project name="Groovy" default="createJars" basedir=".">
25
26 <property file="local.build.properties"/>
27 <property file="build.properties"/>
28 <property name="ant.requiredVersion" value="1.6.5"/>
29
30 <!-- config/ant/build-maven.xml imports config/ant/build-setup.xml where all the paths are defined. -->
31 <import file="config/ant/build-maven.xml"/>
32 <import file="config/ant/build-checkstyle.xml"/>
33 <import file="config/ant/build-cobertura.xml"/>
34
35 <condition property="_skipTests_">
36 <or>
37 <equals arg1="${test}" arg2="false"/>
38 <istrue value="${skipTests}"/>
39 </or>
40 </condition>
41
42 <condition property="_skipExamples_">
43 <istrue value="${skipExamples}"/>
44 </condition>
45
46 <condition property="_skipOsgi_">
47 <istrue value="${skipOsgi}"/>
48 </condition>
49
50 <condition property="_skipFetch_">
51 <istrue value="${skipFetch}"/>
52 </condition>
53
54 <condition property="_skipEmbeddable_">
55 <istrue value="${skipEmbeddable}"/>
56 </condition>
57
58 <condition property="groovy.build.vm4">
59 <contains string="${ant.java.version}" substring="1.4"/>
60 </condition>
61
62 <condition property="groovy.build.vm6">
63 <contains string="${ant.java.version}" substring="1.6"/>
64 </condition>
65
66 <presetdef name="javac">
67 <javac memoryMaximumSize="500m"/>
68 </presetdef>
69
70 <target name="-initCoverage">
71 <condition property="_forceCoverage_">
72 <and>
73 <not>
74 <istrue value="${skipTests}"/>
75 </not>
76 <istrue value="${forceCoverage}"/>
77 </and>
78 </condition>
79 </target>
80
81 <target name="ensureGrammars" description="Ensure all the Antlr generated files are up to date.">
82 <mkdir dir="${groovyParserDirectory}"/>
83 <antlr target="${antlrDirectory}/groovy.g" outputdirectory="${groovyParserDirectory}">
84 <classpath refid="compilePath"/>
85 </antlr>
86 <antlr target="${javaParserDirectory}/java.g" outputdirectory="${javaParserDirectory}">
87 <classpath refid="compilePath"/>
88 </antlr>
89 </target>
90
91 <target name="updatePolicy">
92 <move file="security/groovy.policy" tofile="security/groovy.policy.template"/>
93 <copy tofile="security/groovy.policy">
94 <fileset file="security/groovy.policy.template"/>
95 <filterset>
96 <filter token="relativePathToRealBasedir" value="${relativePathToRealBasedir}"/>
97 </filterset>
98 </copy>
99 </target>
100
101 <target name="-init" depends="-fetchDependencies"/>
102
103 <target name="-banner">
104 <echo message="Java Runtime Environment version: ${java.version}"/>
105 <echo message="Java Runtime Environment vendor: ${java.vendor}"/>
106 <echo message="Ant version: ${ant.version}"/>
107 <echo message="Operating system name: ${os.name}"/>
108 <echo message="Operating system architecture: ${os.arch}"/>
109 <echo message="Operating system version: ${os.version}"/>
110 <echo message="Base directory: ${basedir}"/>
111 <echo message="Java Home: ${java.home}"/>
112 </target>
113
114 <target name="-jvm14BuildWarning" if="groovy.build.vm4">
115 <fail>Aborting!
116
117================================================
118 ERROR: You must build Groovy with a 1.5+ JDK
119================================================
120 </fail>
121 </target>
122
123 <target name="-checkAntVersion" depends="-excludeLegacyAntVersion"
124 description="Check that we are running on the required version of Ant."/>
125
126 <target name="-excludeLegacyAntVersion">
127 <!-- antversion didn't exist in early versions of ant so we have
128 a legacy check to provide a nicer error message in this case -->
129 <fail message="You are using ant ${ant.version}, please build using ant ${ant.requiredVersion}+">
130 <condition>
131 <or>
132 <contains string="${ant.version}" substring="1.1"></contains>
133 <contains string="${ant.version}" substring="1.2"></contains>
134 <contains string="${ant.version}" substring="1.3"></contains>
135 <contains string="${ant.version}" substring="1.4"></contains>
136 <contains string="${ant.version}" substring="1.5"></contains>
137 <and>
138 <contains string="${ant.version}" substring="1.6"></contains>
139 <not>
140 <contains string="${ant.version}" substring="${ant.requiredVersion}"></contains>
141 </not>
142 </and>
143 </or>
144 </condition>
145 </fail>
146 </target>
147
148 <!-- add back in if we make 1.7+ minimal required version for build again
149 <target name="-ensureRequiredAntVersion">
150 <fail message="You are using ant ${ant.version}, please install using ant ${ant.requiredVersion}+"/>
151 <condition><not><antversion atleast="${ant.requiredVersion}"/></not></condition>
152 </fail>
153 </target>
154 -->
155
156 <target name="dgmConvert" depends="stagedcompile">
157 <java classname="org.codehaus.groovy.tools.DgmConverter"
158 fork="yes"
159 failonerror="true">
160 <classpath refid="compilePath"/>
161 <classpath path="${mainClassesDirectory}"/>
162 </java>
163 </target>
164
165 <target name="compileMain" depends="stagedcompile,dgmConvert"
166 description="Compile the Java and Groovy code in the main source.">
167 </target>
168
169 <target name="stagedcompile" depends="-init,ensureGrammars,-jvm14BuildWarning" unless="uber">
170 <mkdir dir="${mainClassesDirectory}"/>
171 <mkdir dir="${toolsClassesDirectory}"/>
172
173 <javac srcdir="${mainSourceDirectory}" includeantruntime="false" destdir="${mainClassesDirectory}"
174 deprecation="on" debug="yes" source="1.5" target="1.5" fork="true" classpathref="compilePath">
175 <exclude name="groovy/ui/**/*.java"/>
176 </javac>
177 <antcall inheritrefs="true" target="-stagedcompile-groovy"/>
178 <antcall target="-includeResources"/>
179 </target>
180
181 <target name="-stagedcompile-groovy" depends="-initGroovyc">
182 <groovyc srcdir="${mainSourceDirectory}" destdir="${mainClassesDirectory}" fork="true" memorymaximumsize="${groovycMain_mx}">
183 <classpath>
184 <pathelement path="${mainClassesDirectory}"/>
185 <path refid="compilePath"/>
186 </classpath>
187 <javac deprecation="on" debug="yes" source="1.5" target="1.5"/>
188 </groovyc>
189 </target>
190
191 <property name="vm5GroovySourceFiles" value="**/*.groovy"/>
192 <property name="vm5JavaSourceFiles" value="**/*.java"/>
193 <property name="vm6GroovySourceFiles" value="groovy/**/vm6/*Test.groovy"/>
194
195 <target name="-initGroovyc">
196 <path id="groovyMainClasses">
197 <pathelement path="${mainClassesDirectory}"/>
198 <path refid="compilePath"/>
199 </path>
200 <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="groovyMainClasses"/>
201 </target>
202
203 <target name="compileTest" depends="compileMain,compileTestOnly"
204 description="Compile the Java and Groovy code in the test source."/>
205
206 <target name="-cleanTest">
207 <delete dir="${testClassesDirectory}"/>
208 </target>
209
210 <target name="compileTestOnly" unless="_skipTests_">
211 <mkdir dir="${testClassesDirectory}"/>
212 <antcall inheritrefs="true" target="-compileTest"/>
213 </target>
214
215 <target name="-compileTest" depends="-initGroovyc,-compileTest_vm6">
216 <groovyc srcdir="${testSourceDirectory}"
217 destdir="${testClassesDirectory}"
218 includes="${vm5GroovySourceFiles},${vm5JavaSourceFiles}"
219 excludes="${vm6GroovySourceFiles}"
220 fork="true"
221 memorymaximumsize="${groovycTest_mx}">
222 <classpath>
223 <pathelement path="${testClassesDirectory}"/>
224 <path refid="groovyMainClasses"/>
225 <path refid="testLibPath"/>
226 </classpath>
227 <javac source="1.5" target="1.5" nowarn="on"/>
228 </groovyc>
229 </target>
230
231 <target name="-compileTest_vm6" if="groovy.build.vm6">
232 <groovyc srcdir="${testSourceDirectory}"
233 destdir="${testClassesDirectory}"
234 includes="${vm6GroovySourceFiles}"
235 fork="true"
236 memorymaximumsize="${groovycTest_mx}">
237 <classpath>
238 <pathelement path="${testClassesDirectory}"/>
239 <path refid="groovyMainClasses"/>
240 <path refid="testLibPath"/>
241 </classpath>
242 <!-- currently not needed, add in if/when required -->
243 <!--<javac source="1.5" target="1.5" nowarn="on"/>-->
244 </groovyc>
245 </target>
246
247 <target name="compileExamples" depends="-init,-initGroovyc,compileMain,-includeExamplesResources" unless="_skipExamples_"
248 description="Compile the Java and Groovy code in the examples source directory.">
249 <mkdir dir="${examplesClassesDirectory}"/>
250 <echo message="Compiling example code."/>
251
252 <groovyc srcdir="${examplesSourceDirectory}/webapps/groovlet-examples/WEB-INF/groovy"
253 destdir="${examplesClassesDirectory}"
254 fork="true"
255 memorymaximumsize="${groovycExamples_mx}">
256 <classpath>
257 <pathelement path="${mainClassesDirectory}"/>
258 <path refid="compilePath"/>
259 <path refid="examplesPath"/>
260 </classpath>
261 </groovyc>
262 <javac srcdir="${examplesSourceDirectory}"
263 destdir="${examplesClassesDirectory}"
264 source="1.5"
265 target="1.5"
266 fork="true">
267 <classpath>
268 <pathelement path="${mainClassesDirectory}"/>
269 <pathelement path="${examplesClassesDirectory}"/>
270 <path refid="compilePath"/>
271 <path refid="examplesPath"/>
272 </classpath>
273 </javac>
274 <groovyc srcdir="${examplesSourceDirectory}"
275 destdir="${examplesClassesDirectory}"
276 fork="true"
277 memorymaximumsize="${groovycExamples_mx}"
278 excludes="webapps/groovlet-examples/WEB-INF/groovy/**/*.groovy,org/codehaus/groovy/grails/compiler/injection/**/*.java">
279 <classpath>
280 <pathelement path="${mainClassesDirectory}"/>
281 <pathelement path="${examplesClassesDirectory}"/>
282 <path refid="compilePath"/>
283 <path refid="examplesPath"/>
284 </classpath>
285 <javac source="1.5" target="1.5"/>
286 </groovyc>
287
288 </target>
289
290 <target name="-initializeReports">
291 <mkdir dir="${reportsDirectory}"/>
292 </target>
293
294 <condition property="_shouldBeHeadless_">
295 <or>
296 <istrue value="${java.awt.headless}"/>
297 <!--<os name="Mac OS X"/>-->
298 </or>
299 </condition>
300
301 <target name="-testInit" depends="-initHeadless">
302 <property name="headlessArg" value=""/>
303 <property name="junitJvmArgs"
304 value="-Xms${groovyJUnit_ms} -XX:PermSize=${groovyJUnit_permSize} -XX:MaxPermSize=${groovyJUnit_maxPermSize} ${headlessArg} -Dgroovy.testdb.props=${groovy.testdb.props}"/>
305 </target>
306
307 <target name="-initHeadless" if="_shouldBeHeadless_">
308 <property name="headlessArg" value="-Djava.awt.headless=true"/>
309 <echo message="Setting headless mode ..."/>
310 </target>
311
312 <target name="test"
313 depends="-banner,-checkAntVersion,-initializeReports,compileTest,-coverageInstrument,-testInit,-testOne,-testAll,-reportTestFailed"
314 description="Compile and test all the classes (or just one class if testCase property is defined)."/>
315
316 <target name="clean-test" depends="clean,test"
317 description="Clean and compile and test all the classes (or just one class if testCase property is defined)."/>
318
319 <condition property="_testOne_">
320 <and>
321 <not>
322 <istrue value="${_skipTests_}"/>
323 </not>
324 <isset property="testCase"/>
325 </and>
326 </condition>
327
328 <target name="-testOne" if="_testOne_" depends="-initGroovyc">
329 <mkdir dir="${junitRawDirectory}"/>
330 <junit printsummary="true" fork="true" includeantruntime="false" failureproperty="testFailed" maxmemory="${groovyJUnit_mx}" dir="${basedir}">
331 <sysproperty key="apple.awt.UIElement" value="true"/>
332 <!-- keeps the dock from showing the AWT startup -->
333 <jvmarg line="${junitJvmArgs}"/>
334 <test name="${testCase}" todir="${junitRawDirectory}"/>
335 <formatter type="brief" usefile="false"/>
336 <classpath>
337 <pathelement path="${instrumentedClassesDirectory}"/>
338 <pathelement path="src/test"/>
339 <path refid="groovyMainClasses"/>
340 <path refid="testLibPath"/>
341 <pathelement path="${testClassesDirectory}"/>
342 <path refid="coberturaPath"/>
343 </classpath>
344 <assertions>
345 <enable/>
346 </assertions>
347 </junit>
348 </target>
349
350 <condition property="_testAll_">
351 <and>
352 <not>
353 <istrue value="${_skipTests_}"/>
354 </not>
355 <not>
356 <isset property="_testOne_"/>
357 </not>
358 </and>
359 </condition>
360
361 <target name="-collectOptionalTests">
362 <condition property="networkTests.fileset.includes" value="groovy/grape/*Test.class" else="-nothing-">
363 <istrue value="${junit.network}"/>
364 </condition>
365 <fileset id="optionalTests.fileset" dir="${testClassesDirectory}" includes="${networkTests.fileset.includes}"/>
366 </target>
367
368 <target name="-collect15tests" unless="groovy.build.vm6">
369 <fileset id="ubertests.fileset" dir="${testClassesDirectory}" includes="UberTest*.class" excludes="Uber*VM6.class,groovy/grape/*Test.class"/>
370 </target>
371
372 <target name="-collect16tests" if="groovy.build.vm6">
373 <fileset id="ubertests.fileset" dir="${testClassesDirectory}" includes="UberTest*.class" excludes="groovy/grape/*Test.class"/>
374 </target>
375
376 <target name="-testAll" if="_testAll_" depends="-collect15tests,-collect16tests,-collectOptionalTests,-initGroovyc">
377 <mkdir dir="${junitRawDirectory}"/>
378 <junit printsummary="true" fork="true" includeantruntime="false" failureproperty="testFailed" maxmemory="${groovyJUnit_mx}" dir="${basedir}">
379 <jvmarg line="${junitJvmArgs}"/>
380 <sysproperty key="apple.awt.UIElement" value="true"/>
381 <!-- keeps the dock from showing the AWT startup -->
382 <formatter type="xml"/>
383 <formatter type="plain" unless="noTextReports"/>
384 <batchtest todir="${junitRawDirectory}">
385 <fileset refid="ubertests.fileset"/>
386 <fileset refid="optionalTests.fileset"/>
387 </batchtest>
388 <classpath>
389 <pathelement path="${instrumentedClassesDirectory}"/>
390 <pathelement path="src/test"/>
391 <path refid="groovyMainClasses"/>
392 <path refid="testLibPath"/>
393 <pathelement path="${testClassesDirectory}"/>
394 <path refid="coberturaPath"/>
395 </classpath>
396 <assertions>
397 <enable/>
398 </assertions>
399 </junit>
400 <mkdir dir="${junitReportsDirectory}"/>
401 <junitreport tofile="${junitRawDirectory}/Results.xml">
402 <fileset dir="${junitRawDirectory}" includes="TEST-*.xml"/>
403 <report format="frames" todir="${junitReportsDirectory}"/>
404 </junitreport>
405 </target>
406
407 <target name="-reportTestFailed" depends="-coverageReport" if="testFailed">
408 <fail message="Test failed, not processing further targets."/>
409 </target>
410
411 <target name="-coverageInstrument" depends="-initCoverage,-coberturaInit" if="_forceCoverage_">
412 <mkdir dir="${instrumentedClassesDirectory}"/>
413 <coberturaInstrument classesDirectory="${mainClassesDirectory}"/>
414 </target>
415
416 <target name="-coverageReport" depends="-initCoverage" if="_forceCoverage_">
417 <coberturaReport reportDirectory="${reportsDirectory}/cobertura" sourceDirectory="${mainSourceDirectory}"/>
418 </target>
419
420 <target name="-actuallyCreateJars"
421 depends="-makeManifest,-initializeJars,-createBaseJar,-createEmbeddableJar"
422 unless="testFailed"/>
423
424 <target name="-makeManifest">
425 <mkdir dir="${mainClassesDirectory}/META-INF"/>
426 <copy todir="${mainClassesDirectory}/META-INF" file="LICENSE.txt"/>
427 <makeManifest file="${mainClassesDirectory}/META-INF/MANIFEST.MF"/>
428 </target>
429
430 <macrodef name="makeManifest">
431 <attribute name="file"/>
432 <attribute name="bundleEnvironment" default="J2SE-1.5"/>
433 <sequential>
434 <manifest file="@{file}">
435 <attribute name="Built-By" value="${user.name}"/>
436 <attribute name="Extension-Name" value="groovy"/>
437 <attribute name="Specification-Title" value="Groovy: a powerful, dynamic language for the JVM"/>
438 <attribute name="Specification-Version" value="${groovyVersion}"/>
439 <attribute name="Specification-Vendor" value="The Codehaus"/>
440 <attribute name="Implementation-Title" value="Groovy: a powerful, dynamic language for the JVM"/>
441 <attribute name="Implementation-Version" value="${groovyVersion}"/>
442 <attribute name="Implementation-Vendor" value="The Codehaus"/>
443 <attribute name="Bundle-ManifestVersion" value="2" />
444 <attribute name="Bundle-Name" value="Groovy Runtime" />
445 <attribute name="Bundle-Description" value="Groovy Runtime" />
446 <attribute name="Bundle-Version" value="${groovyBundleVersion}" />
447 <attribute name="Bundle-Vendor" value="The Codehaus" />
448 <attribute name="Bundle-ClassPath" value="." />
449 <attribute name="Bundle-RequiredExecutionEnvironment" value="@{bundleEnvironment}" />
450 <attribute name="Eclipse-BuddyPolicy" value="dependent"/>
451 <attribute name="Eclipse-LazyStart" value="true"/>
452 <attribute name="DynamicImport-Package" value="*"/>
453 </manifest>
454 </sequential>
455 </macrodef>
456
457 <target name="-includeResources" depends="-includeGroovyDocTemplates">
458 <copy todir="${mainClassesDirectory}">
459 <fileset dir="${mainSourceDirectory}">
460 <include name="META-INF/services/*"/>
461 <include name="groovy/grape/*.xml"/>
462 <include name="groovy/ui/*.properties"/>
463 <include name="groovy/ui/**/*.png"/>
464 <include name="groovy/inspect/swingui/AstBrowserProperties.groovy"/>
465 <include name="org/codehaus/groovy/tools/shell/**/*.properties"/>
466 <include name="org/codehaus/groovy/tools/shell/**/*.xml"/>
467 <include name="org/codehaus/groovy/antlib.xml"/>
468 </fileset>
469 </copy>
470 <antcall target="-includeReleaseInfo"/>
471 </target>
472
473 <target name="-includeReleaseInfo">
474 <copy file="${mainSourceDirectory}/META-INF/groovy-release-info.properties"
475 todir="${mainClassesDirectory}/META-INF" overwrite="true">
476 </copy>
477 <tstamp>
478 <format property="release.date" pattern="dd-MMM-yyyy"/>
479 <format property="release.time" pattern="hh:mm aa"/>
480 </tstamp>
481 <replace file="${mainClassesDirectory}/META-INF/groovy-release-info.properties">
482 <replacefilter token="##ImplementationVersion##" value="${groovyVersion}"/>
483 <replacefilter token="##BundleVersion##" value="${groovyBundleVersion}"/>
484 <replacefilter token="##BuildDate##" value="${release.date}"/>
485 <replacefilter token="##BuildTime##" value="${release.time}"/>
486 </replace>
487 </target>
488
489 <target name="-includeExamplesResources" depends="-includeGroovyDocTemplates">
490 <copy todir="${examplesClassesDirectory}">
491 <fileset dir="${examplesSourceDirectory}">
492 <include name="/swing/binding/caricature/resources/*.gif"/>
493 </fileset>
494 </copy>
495 </target>
496
497 <target name="-includeGroovyDocTemplates">
498 <copy todir="${mainClassesDirectory}">
499 <fileset dir="${mainSourceDirectory}">
500 <include name="org/codehaus/groovy/tools/groovydoc/gstringTemplates/**/*.*"/>
501 </fileset>
502 <fileset dir="${toolsSourceDirectory}">
503 <include name="org/codehaus/groovy/tools/groovy.ico"/>
504 </fileset>
505 </copy>
506 </target>
507
508 <target name="-initializeJars" depends="test">
509 <delete dir="${targetDistDirectory}" quiet="true"/>
510 <mkdir dir="${targetDistDirectory}"/>
511 </target>
512
513 <target name="-createBaseJar" unless="testFailed">
514 <jar destfile="${targetDistDirectory}/groovy.jar" basedir="${mainClassesDirectory}"
515 excludes="*.groovy" manifest="${mainClassesDirectory}/META-INF/MANIFEST.MF"/>
516 <jar destfile="${targetDistDirectory}/groovy-${groovyVersion}-sources.jar" basedir="${mainSourceDirectory}"/>
517 </target>
518
519 <target name="-jarjarInit" unless="_skipEmbeddable_">
520 <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpathref="toolsPath"/>
521 </target>
522
523 <target name="-createEmbeddableJar" depends="-jarjarInit,-actuallyCreateEmbeddableJar" unless="testFailed"/>
524
525 <target name="-actuallyCreateEmbeddableJar" unless="_skipEmbeddable_">
526 <delete dir="${stagingDirectory}" quiet="true"/>
527 <mkdir dir="${stagingDirectory}"/>
528 <unzip dest="${stagingDirectory}">
529 <fileset dir="${runtimeLibDirectory}">
530 <include name="antlr*.jar"/>
531 <include name="asm*.jar"/>
532 <exclude name="asm-attr*.jar"/>
533 <exclude name="asm-util*.jar"/>
534 <exclude name="asm-analysis*.jar"/>
535 </fileset>
536 </unzip>
537 <unzip dest="${stagingDirectory}">
538 <fileset dir="${targetDistDirectory}">
539 <include name="groovy.jar"/>
540 </fileset>
541 </unzip>
542 <copy toDir="${stagingDirectory}/META-INF">
543 <fileset dir="${basedir}/config/build">
544 <include name="*LICENSE.txt"/>
545 </fileset>
546 </copy>
547 <!-- add commons-cli -->
548 <unzip dest="${stagingDirectory}">
549 <patternset>
550 <!-- no need for the manifest file, we have our own -->
551 <exclude name="META-INF/MANIFEST.MF"/>
552 </patternset>
553 <globmapper from="META-INF/LICENSE.txt" to="META-INF/CLI-LICENSE.txt"/>
554 <fileset dir="${runtimeLibDirectory}">
555 <include name="commons-cli-*.jar"/>
556 </fileset>
557 </unzip>
558 <makeManifest file="${stagingDirectory}/META-INF/MANIFEST.MF" />
559 <!-- TODO try to make use of jarjar keep ability -->
560 <jarjar jarfile="${targetDistDirectory}/groovy-all.jar"
561 manifest="${stagingDirectory}/META-INF/MANIFEST.MF">
562 <fileset dir="${stagingDirectory}" excludes="groovy/util/CliBuilder*.class,groovy/util/OptionAccessor*.class,org/codehaus/groovy/tools/shell/util/HelpFormatter*.class"/>
563 <rule pattern="antlr.**" result="groovyjarjarantlr.@1"/>
564 <rule pattern="org.objectweb.**" result="groovyjarjarasm.@1"/>
565 <rule pattern="org.apache.commons.cli.**" result="groovyjarjarcommonscli.@1"/>
566 </jarjar>
567 <jar destfile="${targetDistDirectory}/groovy-all.jar" update="true"
568 basedir="${stagingDirectory}" includes="groovy/util/CliBuilder*.class,groovy/util/OptionAccessor*.class,org/codehaus/groovy/tools/shell/util/HelpFormatter*.class"/>
569
570 <copy file="${targetDistDirectory}/groovy-${groovyVersion}-sources.jar"
571 tofile="${targetDistDirectory}/groovy-all-${groovyVersion}-sources.jar"/>
572 <delete dir="${stagingDirectory}" quiet="true"/>
573 </target>
574
575 <target name="createJars" depends="-checkAntVersion,test,-actuallyCreateJars"
576 description="Build Groovy and create the jarfiles."/>
577
578 <target name="updateJarsForOsgi" unless="_skipOsgi_">
579 <taskdef resource="aQute/bnd/ant/taskdef.properties" classpathref="toolsPath"/>
580 <copy todir="${targetDistDirectory}">
581 <fileset dir="config/bnd" includes="groovy*.bnd"/>
582 <filterset>
583 <filter token="GROOVY_BUNDLE_VERSION" value="${groovyBundleVersion}"/>
584 </filterset>
585 </copy>
586 <property name="jarsToWrap" value="groovy.jar,groovy-all.jar" />
587 <bndwrap definitions="${targetDistDirectory}" output="${targetDistDirectory}" failok="true">
588 <fileset dir="${targetDistDirectory}" includes="${jarsToWrap}"/>
589 </bndwrap>
590 <delete dir="${targetDistDirectory}" includes="${jarsToWrap}"/>
591 <move todir="${targetDistDirectory}">
592 <fileset dir="${targetDistDirectory}" includes="groovy*.bar"/>
593 <globmapper from="groovy*.bar" to="groovy*-${groovyVersion}.jar"/>
594 </move>
595 <delete dir="${targetDistDirectory}" includes="groovy*.bnd"/>
596 </target>
597
598 <target name="skipOsgi" if="_skipOsgi_">
599 <move todir="${targetDistDirectory}">
600 <fileset dir="${targetDistDirectory}" includes="groovy*.jar"/>
601 <globmapper from="groovy*.jar" to="groovy*-${groovyVersion}.jar"/>
602 </move>
603 </target>
604
605 <target name="install" depends="createJars,updateJarsForOsgi,skipOsgi" unless="testFailed"
606 description="Create an installation hierarchy in target/install.">
607
608 <!--
609 FIXME: It's not really a good idea to delete stuff, as it tends to negate Ant's (or other tools)
610 ability to run faster incremental builds.
611 -->
612 <delete dir="${installDirectory}" quiet="true"/>
613 <mkdir dir="${installDirectory}"/>
614
615 <!-- Install license files -->
616 <copy todir="${installDirectory}">
617 <fileset dir="${basedir}">
618 <include name="LICENSE.txt"/>
619 <include name="NOTICE.txt"/>
620 </fileset>
621 </copy>
622 <unzip dest="${installDirectory}">
623 <patternset>
624 <include name="META-INF/*-LICENSE.txt"/>
625 </patternset>
626 <mapper type="flatten"/>
627 <fileset file="${targetDistDirectory}/groovy-all-${groovyVersion}.jar"/>
628 </unzip>
629 <fixcrlf srcdir="${installDirectory}" eol="crlf" includes="*.txt"/>
630
631 <!-- Install generated artifacts and runtime dependencies -->
632 <mkdir dir="${installDirectory}/lib"/>
633 <copy todir="${installDirectory}/lib">
634 <fileset dir="${targetDistDirectory}" includes="groovy-${groovyVersion}.jar"/>
635 <fileset dir="${runtimeLibDirectory}" includes="*.jar"/>
636 </copy>
637
638 <!-- Install the embeddable bits -->
639 <mkdir dir="${installDirectory}/embeddable"/>
640 <copy todir="${installDirectory}/embeddable">
641 <fileset dir="${targetDistDirectory}" includes="groovy-all-${groovyVersion}.jar"/>
642 </copy>
643
644 <!-- Install configuration files -->
645 <mkdir dir="${installDirectory}/conf"/>
646 <copy toDir="${installDirectory}/conf">
647 <fileset dir="${sourceDirectory}/conf" includes="*"/>
648 </copy>
649
650 <!-- Install scripts -->
651 <mkdir dir="${installDirectory}/bin"/>
652 <copy toDir="${installDirectory}/bin">
653 <fileset dir="${sourceDirectory}/bin" includes="*"/>
654 <filterset>
655 <filter token="GROOVYJAR" value="groovy-${groovyVersion}.jar"/>
656 </filterset>
657 </copy>
658
659 <!-- Tweak scripts for platform compatibility -->
660 <fixcrlf srcdir="${installDirectory}/bin" eol="lf" excludes="*.bat"/>
661 <fixcrlf srcdir="${installDirectory}/bin" eol="crlf" includes="*.bat"/>
662 <chmod perm="ugo+x">
663 <fileset dir="${installDirectory}/bin" includes="*,*.*"/>
664 </chmod>
665 </target>
666
667 <target name="checkstyle" depends="-init,-initializeReports,-checkstyleInit"
668 description="Create the code style reports.">
669 <checkAndReport
670 reportDirectory="${reportsDirectory}/checkstyle"
671 sourceDirectory="${mainSourceDirectory}"
672 excludes="org/codehaus/groovy/antlr/parser/*,org/codehaus/groovy/antlr/java/*,org/codehaus/groovy/syntax/Types.java">
673 <path>
674 <pathelement path="${mainClassesDirectory}"/>
675 <path refid="testLibPath"/>
676 </path>
677 </checkAndReport>
678 </target>
679
680 <target name="-compileTools" depends="-initGroovyc,compileMain">
681 <groovyc srcdir="${toolsSourceDirectory}" destdir="${toolsClassesDirectory}" fork="true">
682 <classpath>
683 <path refid="toolsPath"/>
684 <pathelement path="${mainClassesDirectory}"/>
685 <path refid="compilePath"/>
686 </classpath>
687 </groovyc>
688 <copy todir="${toolsClassesDirectory}">
689 <fileset dir="${toolsSourceDirectory}">
690 <include name="**/*.html"/>
691 </fileset>
692 </copy>
693 </target>
694
695 <target name="cruiseReportExtras">
696 <mkdir dir="${cruiseReportRootDirectory}"/>
697 <copy todir="${cruiseReportRootDirectory}">
698 <fileset dir="cruise/html"/>
699 </copy>
700 </target>
701
702 <target name="cruiseInit">
703 <property name="noTextReports" value="true"/>
704 <property name="forceCoverage" value="true"/>
705 <delete dir="${reportsDirectory}" quiet="true" failonerror="false"/>
706 <delete dir="${junitRawDirectory}" quiet="true" failonerror="false"/>
707 </target>
708
709 <target name="cruise" depends="cruiseInit,fulldist,cruiseReportExtras"/>
710
711 <target name="-docInit">
712 <mkdir dir="${docsDirectory}"/>
713 <property name="docFooter" value="Copyright &amp;copy; 2003-2009 The Codehaus. All rights reserved."/>
714 <property name="title" value="Groovy ${groovyVersion}"/>
715 </target>
716
717 <target name="doc" depends="javadoc, groovydoc" description="Create the documentation."/>
718
719 <target name="javadoc" depends="-fetchDependencies,-docInit,-jvm14BuildWarning,ensureGrammars"
720 description="Create the javadoc documentation.">
721 <javadoc destdir="${docsDirectory}/api" author="true" version="true"
722 windowtitle="${title}" doctitle="${title}"
723 encoding="ISO-8859-1" useexternalfile="true" source="1.5"
724 footer="${docFooter}"
725 maxmemory="${javaDoc_mx}"
726 >
727 <classpath>
728 <path path="${mainClassesDirectory}"/>
729 <path refid="compilePath"/>
730 </classpath>
731 <fileset dir="${mainSourceDirectory}" includes="**/*.java"/>
732 <link href="http://java.sun.com/j2se/1.5.0/docs/api"/>
733 <link href="http://www.dpml.net/api/ant/1.7.0"/>
734 <link href="http://junit.sourceforge.net/junit3.8.1/javadoc/"/>
735 <link href="http://java.sun.com/j2ee/1.4/docs/api"/>
736 <link href="http://www.antlr2.org/javadoc"/>
737 </javadoc>
738 <mkdir dir="${targetDistDirectory}"/>
739 <jar basedir="${docsDirectory}/api" destfile="${targetDistDirectory}/groovy-${groovyVersion}-javadoc.jar"/>
740 <copy toFile="${targetDistDirectory}/groovy-all-${groovyVersion}-javadoc.jar">
741 <fileset file="${targetDistDirectory}/groovy-${groovyVersion}-javadoc.jar"/>
742 </copy>
743 </target>
744
745 <target name="groovydoc" depends="-fetchDependencies">
746 <path id="groovydocpath">
747 <path path="${mainClassesDirectory}"/>
748 <path refid="runtimePath"/>
749 <path path="${java.class.path}"/>
750 </path>
751 <antforked target="realgroovydoc" maxmemory="${groovyDoc_mx}" classpathref="groovydocpath"/>
752 </target>
753
754 <target name="realgroovydoc" depends="-fetchDependencies,-docInit,-includeGroovyDocTemplates,docGDK">
755 <taskdef name="groovydoc" classname="org.codehaus.groovy.ant.Groovydoc">
756 <classpath>
757 <path path="${mainClassesDirectory}"/>
758 <path refid="compilePath"/>
759 </classpath>
760 </taskdef>
761 <groovydoc
762 destdir="${docsDirectory}/gapi"
763 sourcepath="${mainSourceDirectory}"
764 packagenames="**.*"
765 use="true"
766 windowtitle="${title}"
767 doctitle="${title}"
768 header="${title}"
769 footer="${docFooter}"
770 overview="src/main/overview.html"
771 private="false">
772 <link packages="java.,org.xml.,javax.,org.xml." href="http://java.sun.com/j2se/1.5.0/docs/api"/>
773 <link packages="org.apache.ant.,org.apache.tools.ant." href="http://www.dpml.net/api/ant/1.7.0"/>
774 <link packages="org.junit.,junit.framework." href="http://junit.sourceforge.net/junit3.8.1/javadoc/"/>
775 <link packages="antlr." href="http://www.antlr2.org/javadoc/"/>
776 <link packages="javax.servlet.,javax.management." href="http://java.sun.com/j2ee/1.4/docs/api"/>
777 <link packages="groovy.,org.codehaus.groovy." href="http://groovy.codehaus.org/gapi/"/>
778 </groovydoc>
779 </target>
780
781 <target name="docGDK" depends="-fetchDependencies,-compileTools" description="Create the GDK documentation">
782 <java classname="org.codehaus.groovy.tools.DocGenerator" fork="yes" failonerror="true">
783 <classpath>
784 <pathelement path="${toolsClassesDirectory}"/>
785 <path refid="toolsPath"/>
786 <pathelement path="${mainClassesDirectory}"/>
787 </classpath>
788 <arg value="org.codehaus.groovy.runtime.DefaultGroovyMethods"/>
789 <arg value="org.codehaus.groovy.runtime.DefaultGroovyStaticMethods"/>
790 <arg value="org.codehaus.groovy.vmplugin.v5.PluginDefaultGroovyMethods"/>
791 </java>
792 <copy todir="target/html/groovy-jdk" file="src/tools/org/codehaus/groovy/tools/groovy.ico"/>
793 <copy todir="target/html/groovy-jdk" file="src/tools/org/codehaus/groovy/tools/stylesheet.css"/>
794 </target>
795
796 <target name="clean" description="Clean up build artifacts.">
797 <delete dir="${targetDirectory}" quiet="true"/>
798 <delete file="cobertura.ser" quiet="true" failonerror="false"/>
799 <delete quiet="true">
800 <fileset dir="." includes="**/*~"/>
801 <fileset dir="${groovyParserDirectory}" includes="Groovy*.*"/>
802 <fileset dir="${javaParserDirectory}" includes="JavaLexer.java,JavaRecognizer.java,JavaTokenTypes.java,JavaTokenTypes.txt,*.smap"/>
803 </delete>
804 </target>
805
806 <target name="deploy" depends="-mavenDeployInit,install,doc"
807 description="Deploy jars to maven repository.">
808 <mavenDeploy version="${groovyVersion}" prefix="groovy"/>
809 <mavenDeploy version="${groovyVersion}" prefix="groovy-all"/>
810 </target>
811
812 <target name="installRepo" depends="-mavenInit,install,doc"
813 description="Deploy artifacts to local maven repository.">
814 <mavenInstallRepo version="${groovyVersion}" prefix="groovy"/>
815 <mavenInstallRepo version="${groovyVersion}" prefix="groovy-all"/>
816 </target>
817
818 <target name="fulldist" depends="dist,compileExamples,checkstyle" description="dist plus examples plus checkstyle"/>
819
820 <target name="dist" depends="install,doc" description="Create everything needed for a distribution.">
821 <zip destfile="${targetDistDirectory}/groovy-binary-${groovyVersion}.zip"
822 comment="The Groovy ${groovyVersion} binary distribution.">
823
824 <!-- Make unix scripts executable -->
825 <zipfileset dir="${installDirectory}" prefix="groovy-${groovyVersion}" filemode="775">
826 <include name="bin/*"/>
827 <exclude name="bin/*.*"/>
828 <exclude name="bin/startGroovy*"/>
829 </zipfileset>
830
831 <!-- Include the other scripts as is -->
832 <zipfileset dir="${installDirectory}" prefix="groovy-${groovyVersion}">
833 <include name="bin/*.*"/>
834 <include name="bin/startGroovy*"/>
835 </zipfileset>
836
837 <!-- Include everything else as is too -->
838 <zipfileset dir="${installDirectory}" prefix="groovy-${groovyVersion}">
839 <exclude name="bin/**"/>
840 <include name="**"/>
841 </zipfileset>
842 </zip>
843
844 <zip destfile="${targetDistDirectory}/groovy-docs-${groovyVersion}.zip"
845 comment="The Groovy ${groovyVersion} documentation distribution.">
846 <zipfileset dir="${wikiPdfDirectory}" includes="wiki-snapshot.pdf" prefix="groovy-${groovyVersion}/pdf"/>
847 <zipfileset dir="${docsDirectory}" prefix="groovy-${groovyVersion}/html"/>
848 </zip>
849
850 <zip destfile="${targetDistDirectory}/groovy-src-${groovyVersion}.zip"
851 comment="The Groovy ${groovyVersion} source distribution.">
852 <zipfileset dir="${basedir}" prefix="groovy-${groovyVersion}">
853 <!-- Exclude generated bits as well as any other bits that shouldn't make it in -->
854 <exclude name="${targetDirectory}/**"/>
855 <exclude name="classes/**"/>
856 <exclude name="cruise/**"/>
857 <exclude name=".clover/*"/>
858 <exclude name="local.build.properties"/>
859 <exclude name="cobertura.ser"/>
860 <exclude name="junitvmwatcher*.properties"/>
861 </zipfileset>
862 </zip>
863 </target>
864
865</project>
8660
=== removed directory '.pc/ant-build.diff/config'
=== removed directory '.pc/ant-build.diff/config/ant'
=== removed file '.pc/ant-build.diff/config/ant/build-setup.xml'
--- .pc/ant-build.diff/config/ant/build-setup.xml 2010-02-26 16:39:51 +0000
+++ .pc/ant-build.diff/config/ant/build-setup.xml 1970-01-01 00:00:00 +0000
@@ -1,78 +0,0 @@
1<?xml version="1.0"?>
2
3<!--
4Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
5compliance with the License. You may obtain a copy of the License at
6
7http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software distributed under the License is
10distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
11implied. See the License for the specific language governing permissions and limitations under the License.
12
13This work is copyright by the author(s) and is part of a greater work collectively copyright by the
14Groovy community. See the NOTICE.txt file distributed with this work for additional information.
15
16Author : Paul King
17$Revision: 5519 $ ($LastChangedBy: paulk $)
18$Date: 2007-03-11 19:14:07 +1000 (Sun, 11 Mar 2007) $
19-->
20
21<project name="build-setup" default="" basedir="../..">
22
23 <property name="bootstrapDirectory" location="bootstrap"/>
24 <property name="sourceDirectory" value="src"/>
25 <property name="wikiPdfDirectory" value="src"/>
26 <property name="mainSourceDirectory" location="${sourceDirectory}/main"/>
27 <property name="testSourceDirectory" value="${sourceDirectory}/test"/>
28 <property name="toolsSourceDirectory" location="${sourceDirectory}/tools"/>
29 <property name="examplesSourceDirectory" location="${sourceDirectory}/examples"/>
30
31 <property name="targetDirectory" value="target"/>
32 <property name="installDirectory" value="${targetDirectory}/install"/>
33 <property name="cruiseReportRootDirectory" value="${targetDirectory}/root"/>
34 <property name="stagingDirectory" value="${targetDirectory}/staging"/>
35 <property name="docsDirectory" value="${targetDirectory}/html"/>
36 <property name="mainClassesDirectory" value="${targetDirectory}/classes"/>
37 <property name="testClassesDirectory" value="${targetDirectory}/test-classes"/>
38 <property name="toolsClassesDirectory" value="${targetDirectory}/tools-classes"/>
39 <property name="mainStubsDirectory" value="${targetDirectory}/stubs"/>
40 <property name="testStubsDirectory" value="${targetDirectory}/test-stubs"/>
41
42 <property name="examplesClassesDirectory" value="${targetDirectory}/examples-classes"/>
43 <property name="instrumentedClassesDirectory" value="${targetDirectory}/instrumented-classes"/>
44 <property name="reportsDirectory" value="${targetDirectory}/reports"/>
45 <property name="targetLibDirectory" value="${targetDirectory}/lib"/>
46 <property name="targetDistDirectory" value="${targetDirectory}/dist"/>
47
48 <property name="antlrDirectory" value="${mainSourceDirectory}/org/codehaus/groovy/antlr"/>
49 <property name="groovyParserDirectory" value="${antlrDirectory}/parser"/>
50 <property name="javaParserDirectory" value="${antlrDirectory}/java"/>
51
52 <property name="compileLibDirectory" value="${targetLibDirectory}/compile"/>
53 <property name="testLibDirectory" value="${targetLibDirectory}/test"/>
54 <property name="runtimeLibDirectory" value="${targetLibDirectory}/runtime"/>
55 <property name="toolsLibDirectory" value="${targetLibDirectory}/tools"/>
56 <property name="examplesLibDirectory" value="${targetLibDirectory}/examples"/>
57 <property name="extrasLibDirectory" value="${targetLibDirectory}/extras"/>
58 <property name="junitRawDirectory" value="${targetDirectory}/test-reports"/>
59 <property name="junitReportsDirectory" value="${reportsDirectory}/junit"/>
60 <property name="relativePathToRealBasedir" value="."/>
61
62 <macrodef name="antforked">
63 <attribute name="target"/>
64 <attribute name="maxmemory" default="256m"/>
65 <attribute name="classpathref" default="runtimePath"/>
66 <sequential>
67 <java classname="org.apache.tools.ant.launch.Launcher" fork="true" maxmemory="@{maxmemory}" failonerror="true">
68 <classpath refid="@{classpathref}"/>
69 <jvmarg value="-Duser.home=${user.home}" />
70 <arg value="@{target}"/>
71 <arg value="-DskipFetch=${skipFetch}"/>
72 <arg value="-DruntimeLibDirectory=${runtimeLibDirectory}"/>
73 <arg value="-DtoolsLibDirectory=${toolsLibDirectory}" />
74 </java>
75 </sequential>
76 </macrodef>
77
78</project>
790
=== modified file '.pc/applied-patches'
--- .pc/applied-patches 2010-02-26 16:39:51 +0000
+++ .pc/applied-patches 2011-02-24 17:57:34 +0000
@@ -1,3 +1,3 @@
1start-scripts.patch10001-start-scripts.patch
2ant-build.diff20002-ant-build.diff.patch
3disable-bnd.diff30003-disable-bnd.diff.patch
44
=== removed directory '.pc/disable-bnd.diff'
=== removed file '.pc/disable-bnd.diff/build.xml'
--- .pc/disable-bnd.diff/build.xml 2010-02-26 16:39:51 +0000
+++ .pc/disable-bnd.diff/build.xml 1970-01-01 00:00:00 +0000
@@ -1,872 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--
4Ant build script for Groovy.
5
6Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7compliance with the License. You may obtain a copy of the License at
8
9http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software distributed under the License is
12distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13implied. See the License for the specific language governing permissions and limitations under the License.
14
15This work is copyright by the author(s) and is part of a greater work collectively copyright by Codehaus on
16behalf of the Groovy community. See the NOTICE.txt file distributed with this work for additional information.
17
18Author : Russel Winder
19Author : Paul King
20$Revision: 18555 $ ($LastChangedBy: paulk $)
21$Date: 2009-12-08 14:08:59 +0100 (Di, 08. Dez 2009) $
22-->
23
24<project name="Groovy" default="createJars" basedir=".">
25
26 <property file="local.build.properties"/>
27 <property file="build.properties"/>
28 <property name="ant.requiredVersion" value="1.6.5"/>
29
30 <!-- config/ant/build-maven.xml imports config/ant/build-setup.xml where all the paths are defined. -->
31 <import file="config/ant/build-setup.xml"/>
32 <import file="config/ant/build-checkstyle.xml"/>
33 <import file="config/ant/build-cobertura.xml"/>
34
35 <path id="compilePath">
36 <path path="${java.class.path}" />
37 </path>
38 <path id="toolsPath">
39 <path path="${java.class.path}" />
40 </path>
41
42 <condition property="_skipTests_">
43 <or>
44 <equals arg1="${test}" arg2="false"/>
45 <istrue value="${skipTests}"/>
46 </or>
47 </condition>
48
49 <condition property="_skipExamples_">
50 <istrue value="${skipExamples}"/>
51 </condition>
52
53 <condition property="_skipOsgi_">
54 <istrue value="${skipOsgi}"/>
55 </condition>
56
57 <condition property="_skipFetch_">
58 <istrue value="${skipFetch}"/>
59 </condition>
60
61 <condition property="_skipEmbeddable_">
62 <istrue value="${skipEmbeddable}"/>
63 </condition>
64
65 <condition property="groovy.build.vm4">
66 <contains string="${ant.java.version}" substring="1.4"/>
67 </condition>
68
69 <condition property="groovy.build.vm6">
70 <contains string="${ant.java.version}" substring="1.6"/>
71 </condition>
72
73 <presetdef name="javac">
74 <javac memoryMaximumSize="500m"/>
75 </presetdef>
76
77 <target name="-initCoverage">
78 <condition property="_forceCoverage_">
79 <and>
80 <not>
81 <istrue value="${skipTests}"/>
82 </not>
83 <istrue value="${forceCoverage}"/>
84 </and>
85 </condition>
86 </target>
87
88 <target name="ensureGrammars" description="Ensure all the Antlr generated files are up to date.">
89 <mkdir dir="${groovyParserDirectory}"/>
90 <antlr target="${antlrDirectory}/groovy.g" outputdirectory="${groovyParserDirectory}">
91 <classpath refid="compilePath"/>
92 </antlr>
93 <antlr target="${javaParserDirectory}/java.g" outputdirectory="${javaParserDirectory}">
94 <classpath refid="compilePath"/>
95 </antlr>
96 </target>
97
98 <target name="updatePolicy">
99 <move file="security/groovy.policy" tofile="security/groovy.policy.template"/>
100 <copy tofile="security/groovy.policy">
101 <fileset file="security/groovy.policy.template"/>
102 <filterset>
103 <filter token="relativePathToRealBasedir" value="${relativePathToRealBasedir}"/>
104 </filterset>
105 </copy>
106 </target>
107
108 <target name="-init">
109 <xslt in="pom.xml" out="${targetDirectory}/groovy-all.pom" style="config/maven/groovy-all.xsl"/>
110 </target>
111
112 <target name="-banner">
113 <echo message="Java Runtime Environment version: ${java.version}"/>
114 <echo message="Java Runtime Environment vendor: ${java.vendor}"/>
115 <echo message="Ant version: ${ant.version}"/>
116 <echo message="Operating system name: ${os.name}"/>
117 <echo message="Operating system architecture: ${os.arch}"/>
118 <echo message="Operating system version: ${os.version}"/>
119 <echo message="Base directory: ${basedir}"/>
120 <echo message="Java Home: ${java.home}"/>
121 </target>
122
123 <target name="-jvm14BuildWarning" if="groovy.build.vm4">
124 <fail>Aborting!
125
126================================================
127 ERROR: You must build Groovy with a 1.5+ JDK
128================================================
129 </fail>
130 </target>
131
132 <target name="-checkAntVersion" depends="-excludeLegacyAntVersion"
133 description="Check that we are running on the required version of Ant."/>
134
135 <target name="-excludeLegacyAntVersion">
136 <!-- antversion didn't exist in early versions of ant so we have
137 a legacy check to provide a nicer error message in this case -->
138 <fail message="You are using ant ${ant.version}, please build using ant ${ant.requiredVersion}+">
139 <condition>
140 <or>
141 <contains string="${ant.version}" substring="1.1"></contains>
142 <contains string="${ant.version}" substring="1.2"></contains>
143 <contains string="${ant.version}" substring="1.3"></contains>
144 <contains string="${ant.version}" substring="1.4"></contains>
145 <contains string="${ant.version}" substring="1.5"></contains>
146 <and>
147 <contains string="${ant.version}" substring="1.6"></contains>
148 <not>
149 <contains string="${ant.version}" substring="${ant.requiredVersion}"></contains>
150 </not>
151 </and>
152 </or>
153 </condition>
154 </fail>
155 </target>
156
157 <!-- add back in if we make 1.7+ minimal required version for build again
158 <target name="-ensureRequiredAntVersion">
159 <fail message="You are using ant ${ant.version}, please install using ant ${ant.requiredVersion}+"/>
160 <condition><not><antversion atleast="${ant.requiredVersion}"/></not></condition>
161 </fail>
162 </target>
163 -->
164
165 <target name="dgmConvert" depends="stagedcompile">
166 <java classname="org.codehaus.groovy.tools.DgmConverter"
167 fork="yes"
168 failonerror="true">
169 <classpath refid="compilePath"/>
170 <classpath path="${mainClassesDirectory}"/>
171 </java>
172 </target>
173
174 <target name="compileMain" depends="stagedcompile,dgmConvert"
175 description="Compile the Java and Groovy code in the main source.">
176 </target>
177
178 <target name="stagedcompile" depends="-init,ensureGrammars,-jvm14BuildWarning" unless="uber">
179 <mkdir dir="${mainClassesDirectory}"/>
180 <mkdir dir="${toolsClassesDirectory}"/>
181
182 <javac srcdir="${mainSourceDirectory}" includeantruntime="false" destdir="${mainClassesDirectory}"
183 deprecation="on" debug="yes" source="1.5" target="1.5" fork="true" classpathref="compilePath">
184 <exclude name="groovy/ui/**/*.java"/>
185 </javac>
186 <antcall inheritrefs="true" target="-stagedcompile-groovy"/>
187 <antcall target="-includeResources"/>
188 </target>
189
190 <target name="-stagedcompile-groovy" depends="-initGroovyc">
191 <groovyc srcdir="${mainSourceDirectory}" destdir="${mainClassesDirectory}" fork="true" memorymaximumsize="${groovycMain_mx}">
192 <classpath>
193 <pathelement path="${mainClassesDirectory}"/>
194 <path refid="compilePath"/>
195 </classpath>
196 <javac deprecation="on" debug="yes" source="1.5" target="1.5"/>
197 </groovyc>
198 </target>
199
200 <property name="vm5GroovySourceFiles" value="**/*.groovy"/>
201 <property name="vm5JavaSourceFiles" value="**/*.java"/>
202 <property name="vm6GroovySourceFiles" value="groovy/**/vm6/*Test.groovy"/>
203
204 <target name="-initGroovyc">
205 <path id="groovyMainClasses">
206 <pathelement path="${mainClassesDirectory}"/>
207 <path refid="compilePath"/>
208 </path>
209 <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="groovyMainClasses"/>
210 </target>
211
212 <target name="compileTest" depends="compileMain,compileTestOnly"
213 description="Compile the Java and Groovy code in the test source."/>
214
215 <target name="-cleanTest">
216 <delete dir="${testClassesDirectory}"/>
217 </target>
218
219 <target name="compileTestOnly" unless="_skipTests_">
220 <mkdir dir="${testClassesDirectory}"/>
221 <antcall inheritrefs="true" target="-compileTest"/>
222 </target>
223
224 <target name="-compileTest" depends="-initGroovyc,-compileTest_vm6">
225 <groovyc srcdir="${testSourceDirectory}"
226 destdir="${testClassesDirectory}"
227 includes="${vm5GroovySourceFiles},${vm5JavaSourceFiles}"
228 excludes="${vm6GroovySourceFiles}"
229 fork="true"
230 memorymaximumsize="${groovycTest_mx}">
231 <classpath>
232 <pathelement path="${testClassesDirectory}"/>
233 <path refid="groovyMainClasses"/>
234 <path refid="testLibPath"/>
235 </classpath>
236 <javac source="1.5" target="1.5" nowarn="on"/>
237 </groovyc>
238 </target>
239
240 <target name="-compileTest_vm6" if="groovy.build.vm6">
241 <groovyc srcdir="${testSourceDirectory}"
242 destdir="${testClassesDirectory}"
243 includes="${vm6GroovySourceFiles}"
244 fork="true"
245 memorymaximumsize="${groovycTest_mx}">
246 <classpath>
247 <pathelement path="${testClassesDirectory}"/>
248 <path refid="groovyMainClasses"/>
249 <path refid="testLibPath"/>
250 </classpath>
251 <!-- currently not needed, add in if/when required -->
252 <!--<javac source="1.5" target="1.5" nowarn="on"/>-->
253 </groovyc>
254 </target>
255
256 <target name="compileExamples" depends="-init,-initGroovyc,compileMain,-includeExamplesResources" unless="_skipExamples_"
257 description="Compile the Java and Groovy code in the examples source directory.">
258 <mkdir dir="${examplesClassesDirectory}"/>
259 <echo message="Compiling example code."/>
260
261 <groovyc srcdir="${examplesSourceDirectory}/webapps/groovlet-examples/WEB-INF/groovy"
262 destdir="${examplesClassesDirectory}"
263 fork="true"
264 memorymaximumsize="${groovycExamples_mx}">
265 <classpath>
266 <pathelement path="${mainClassesDirectory}"/>
267 <path refid="compilePath"/>
268 <path refid="examplesPath"/>
269 </classpath>
270 </groovyc>
271 <javac srcdir="${examplesSourceDirectory}"
272 destdir="${examplesClassesDirectory}"
273 source="1.5"
274 target="1.5"
275 fork="true">
276 <classpath>
277 <pathelement path="${mainClassesDirectory}"/>
278 <pathelement path="${examplesClassesDirectory}"/>
279 <path refid="compilePath"/>
280 <path refid="examplesPath"/>
281 </classpath>
282 </javac>
283 <groovyc srcdir="${examplesSourceDirectory}"
284 destdir="${examplesClassesDirectory}"
285 fork="true"
286 memorymaximumsize="${groovycExamples_mx}"
287 excludes="webapps/groovlet-examples/WEB-INF/groovy/**/*.groovy,org/codehaus/groovy/grails/compiler/injection/**/*.java">
288 <classpath>
289 <pathelement path="${mainClassesDirectory}"/>
290 <pathelement path="${examplesClassesDirectory}"/>
291 <path refid="compilePath"/>
292 <path refid="examplesPath"/>
293 </classpath>
294 <javac source="1.5" target="1.5"/>
295 </groovyc>
296
297 </target>
298
299 <target name="-initializeReports">
300 <mkdir dir="${reportsDirectory}"/>
301 </target>
302
303 <condition property="_shouldBeHeadless_">
304 <or>
305 <istrue value="${java.awt.headless}"/>
306 <!--<os name="Mac OS X"/>-->
307 </or>
308 </condition>
309
310 <target name="-testInit" depends="-initHeadless">
311 <property name="headlessArg" value=""/>
312 <property name="junitJvmArgs"
313 value="-Xms${groovyJUnit_ms} -XX:PermSize=${groovyJUnit_permSize} -XX:MaxPermSize=${groovyJUnit_maxPermSize} ${headlessArg} -Dgroovy.testdb.props=${groovy.testdb.props}"/>
314 </target>
315
316 <target name="-initHeadless" if="_shouldBeHeadless_">
317 <property name="headlessArg" value="-Djava.awt.headless=true"/>
318 <echo message="Setting headless mode ..."/>
319 </target>
320
321 <target name="test"
322 depends="-banner,-checkAntVersion,-initializeReports,compileTest,-coverageInstrument,-testInit,-testOne,-testAll,-reportTestFailed"
323 description="Compile and test all the classes (or just one class if testCase property is defined)."/>
324
325 <target name="clean-test" depends="clean,test"
326 description="Clean and compile and test all the classes (or just one class if testCase property is defined)."/>
327
328 <condition property="_testOne_">
329 <and>
330 <not>
331 <istrue value="${_skipTests_}"/>
332 </not>
333 <isset property="testCase"/>
334 </and>
335 </condition>
336
337 <target name="-testOne" if="_testOne_" depends="-initGroovyc">
338 <mkdir dir="${junitRawDirectory}"/>
339 <junit printsummary="true" fork="true" includeantruntime="false" failureproperty="testFailed" maxmemory="${groovyJUnit_mx}" dir="${basedir}">
340 <sysproperty key="apple.awt.UIElement" value="true"/>
341 <!-- keeps the dock from showing the AWT startup -->
342 <jvmarg line="${junitJvmArgs}"/>
343 <test name="${testCase}" todir="${junitRawDirectory}"/>
344 <formatter type="brief" usefile="false"/>
345 <classpath>
346 <pathelement path="${instrumentedClassesDirectory}"/>
347 <pathelement path="src/test"/>
348 <path refid="groovyMainClasses"/>
349 <path refid="testLibPath"/>
350 <pathelement path="${testClassesDirectory}"/>
351 <path refid="coberturaPath"/>
352 </classpath>
353 <assertions>
354 <enable/>
355 </assertions>
356 </junit>
357 </target>
358
359 <condition property="_testAll_">
360 <and>
361 <not>
362 <istrue value="${_skipTests_}"/>
363 </not>
364 <not>
365 <isset property="_testOne_"/>
366 </not>
367 </and>
368 </condition>
369
370 <target name="-collectOptionalTests">
371 <condition property="networkTests.fileset.includes" value="groovy/grape/*Test.class" else="-nothing-">
372 <istrue value="${junit.network}"/>
373 </condition>
374 <fileset id="optionalTests.fileset" dir="${testClassesDirectory}" includes="${networkTests.fileset.includes}"/>
375 </target>
376
377 <target name="-collect15tests" unless="groovy.build.vm6">
378 <fileset id="ubertests.fileset" dir="${testClassesDirectory}" includes="UberTest*.class" excludes="Uber*VM6.class,groovy/grape/*Test.class"/>
379 </target>
380
381 <target name="-collect16tests" if="groovy.build.vm6">
382 <fileset id="ubertests.fileset" dir="${testClassesDirectory}" includes="UberTest*.class" excludes="groovy/grape/*Test.class"/>
383 </target>
384
385 <target name="-testAll" if="_testAll_" depends="-collect15tests,-collect16tests,-collectOptionalTests,-initGroovyc">
386 <mkdir dir="${junitRawDirectory}"/>
387 <junit printsummary="true" fork="true" includeantruntime="false" failureproperty="testFailed" maxmemory="${groovyJUnit_mx}" dir="${basedir}">
388 <jvmarg line="${junitJvmArgs}"/>
389 <sysproperty key="apple.awt.UIElement" value="true"/>
390 <!-- keeps the dock from showing the AWT startup -->
391 <formatter type="xml"/>
392 <formatter type="plain" unless="noTextReports"/>
393 <batchtest todir="${junitRawDirectory}">
394 <fileset refid="ubertests.fileset"/>
395 <fileset refid="optionalTests.fileset"/>
396 </batchtest>
397 <classpath>
398 <pathelement path="${instrumentedClassesDirectory}"/>
399 <pathelement path="src/test"/>
400 <path refid="groovyMainClasses"/>
401 <path refid="testLibPath"/>
402 <pathelement path="${testClassesDirectory}"/>
403 <path refid="coberturaPath"/>
404 </classpath>
405 <assertions>
406 <enable/>
407 </assertions>
408 </junit>
409 <mkdir dir="${junitReportsDirectory}"/>
410 <junitreport tofile="${junitRawDirectory}/Results.xml">
411 <fileset dir="${junitRawDirectory}" includes="TEST-*.xml"/>
412 <report format="frames" todir="${junitReportsDirectory}"/>
413 </junitreport>
414 </target>
415
416 <target name="-reportTestFailed" depends="-coverageReport" if="testFailed">
417 <fail message="Test failed, not processing further targets."/>
418 </target>
419
420 <target name="-coverageInstrument" if="_forceCoverage_">
421 <mkdir dir="${instrumentedClassesDirectory}"/>
422 <!--coberturaInstrument classesDirectory="${mainClassesDirectory}"/-->
423 </target>
424
425 <target name="-coverageReport" depends="-initCoverage" if="_forceCoverage_">
426 <!--coberturaReport reportDirectory="${reportsDirectory}/cobertura" sourceDirectory="${mainSourceDirectory}"/-->
427 </target>
428
429 <target name="-actuallyCreateJars"
430 depends="-makeManifest,-initializeJars,-createBaseJar,-createEmbeddableJar"
431 unless="testFailed"/>
432
433 <target name="-makeManifest">
434 <mkdir dir="${mainClassesDirectory}/META-INF"/>
435 <copy todir="${mainClassesDirectory}/META-INF" file="LICENSE.txt"/>
436 <makeManifest file="${mainClassesDirectory}/META-INF/MANIFEST.MF"/>
437 </target>
438
439 <macrodef name="makeManifest">
440 <attribute name="file"/>
441 <attribute name="bundleEnvironment" default="J2SE-1.5"/>
442 <sequential>
443 <manifest file="@{file}">
444 <attribute name="Built-By" value="${user.name}"/>
445 <attribute name="Extension-Name" value="groovy"/>
446 <attribute name="Specification-Title" value="Groovy: a powerful, dynamic language for the JVM"/>
447 <attribute name="Specification-Version" value="${groovyVersion}"/>
448 <attribute name="Specification-Vendor" value="The Codehaus"/>
449 <attribute name="Implementation-Title" value="Groovy: a powerful, dynamic language for the JVM"/>
450 <attribute name="Implementation-Version" value="${groovyVersion}"/>
451 <attribute name="Implementation-Vendor" value="The Codehaus"/>
452 <attribute name="Bundle-ManifestVersion" value="2" />
453 <attribute name="Bundle-Name" value="Groovy Runtime" />
454 <attribute name="Bundle-Description" value="Groovy Runtime" />
455 <attribute name="Bundle-Version" value="${groovyBundleVersion}" />
456 <attribute name="Bundle-Vendor" value="The Codehaus" />
457 <attribute name="Bundle-ClassPath" value="." />
458 <attribute name="Bundle-RequiredExecutionEnvironment" value="@{bundleEnvironment}" />
459 <attribute name="Eclipse-BuddyPolicy" value="dependent"/>
460 <attribute name="Eclipse-LazyStart" value="true"/>
461 <attribute name="DynamicImport-Package" value="*"/>
462 </manifest>
463 </sequential>
464 </macrodef>
465
466 <target name="-includeResources" depends="-includeGroovyDocTemplates">
467 <copy todir="${mainClassesDirectory}">
468 <fileset dir="${mainSourceDirectory}">
469 <include name="META-INF/services/*"/>
470 <include name="groovy/grape/*.xml"/>
471 <include name="groovy/ui/*.properties"/>
472 <include name="groovy/ui/**/*.png"/>
473 <include name="groovy/inspect/swingui/AstBrowserProperties.groovy"/>
474 <include name="org/codehaus/groovy/tools/shell/**/*.properties"/>
475 <include name="org/codehaus/groovy/tools/shell/**/*.xml"/>
476 <include name="org/codehaus/groovy/antlib.xml"/>
477 </fileset>
478 </copy>
479 <antcall target="-includeReleaseInfo"/>
480 </target>
481
482 <target name="-includeReleaseInfo">
483 <copy file="${mainSourceDirectory}/META-INF/groovy-release-info.properties"
484 todir="${mainClassesDirectory}/META-INF" overwrite="true">
485 </copy>
486 <tstamp>
487 <format property="release.date" pattern="dd-MMM-yyyy"/>
488 <format property="release.time" pattern="hh:mm aa"/>
489 </tstamp>
490 <replace file="${mainClassesDirectory}/META-INF/groovy-release-info.properties">
491 <replacefilter token="##ImplementationVersion##" value="${groovyVersion}"/>
492 <replacefilter token="##BundleVersion##" value="${groovyBundleVersion}"/>
493 <replacefilter token="##BuildDate##" value="${release.date}"/>
494 <replacefilter token="##BuildTime##" value="${release.time}"/>
495 </replace>
496 </target>
497
498 <target name="-includeExamplesResources" depends="-includeGroovyDocTemplates">
499 <copy todir="${examplesClassesDirectory}">
500 <fileset dir="${examplesSourceDirectory}">
501 <include name="/swing/binding/caricature/resources/*.gif"/>
502 </fileset>
503 </copy>
504 </target>
505
506 <target name="-includeGroovyDocTemplates">
507 <copy todir="${mainClassesDirectory}">
508 <fileset dir="${mainSourceDirectory}">
509 <include name="org/codehaus/groovy/tools/groovydoc/gstringTemplates/**/*.*"/>
510 </fileset>
511 <fileset dir="${toolsSourceDirectory}">
512 <include name="org/codehaus/groovy/tools/groovy.ico"/>
513 </fileset>
514 </copy>
515 </target>
516
517 <target name="-initializeJars" depends="test">
518 <delete dir="${targetDistDirectory}" quiet="true"/>
519 <mkdir dir="${targetDistDirectory}"/>
520 </target>
521
522 <target name="-createBaseJar" unless="testFailed">
523 <jar destfile="${targetDistDirectory}/groovy.jar" basedir="${mainClassesDirectory}"
524 excludes="*.groovy" manifest="${mainClassesDirectory}/META-INF/MANIFEST.MF"/>
525 <jar destfile="${targetDistDirectory}/groovy-${groovyVersion}-sources.jar" basedir="${mainSourceDirectory}"/>
526 </target>
527
528 <target name="-jarjarInit" unless="_skipEmbeddable_">
529 <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpathref="toolsPath"/>
530 </target>
531
532 <target name="-createEmbeddableJar" depends="-jarjarInit,-actuallyCreateEmbeddableJar" unless="testFailed"/>
533
534 <target name="-actuallyCreateEmbeddableJar" unless="_skipEmbeddable_">
535 <delete dir="${stagingDirectory}" quiet="true"/>
536 <mkdir dir="${stagingDirectory}"/>
537 <unzip dest="${stagingDirectory}">
538 <fileset dir="/usr/share/java">
539 <include name="antlr.jar"/>
540 <include name="asm3.jar"/>
541 <include name="asm3-commons.jar"/>
542 <include name="asm3-tree.jar"/>
543 <include name="asm3-xml.jar"/>
544 </fileset>
545 </unzip>
546 <unzip dest="${stagingDirectory}">
547 <fileset dir="${targetDistDirectory}">
548 <include name="groovy.jar"/>
549 </fileset>
550 </unzip>
551 <copy toDir="${stagingDirectory}/META-INF">
552 <fileset dir="${basedir}/config/build">
553 <include name="*LICENSE.txt"/>
554 </fileset>
555 </copy>
556 <!-- add commons-cli -->
557 <unzip dest="${stagingDirectory}">
558 <patternset>
559 <!-- no need for the manifest file, we have our own -->
560 <exclude name="META-INF/MANIFEST.MF"/>
561 </patternset>
562 <globmapper from="META-INF/LICENSE.txt" to="META-INF/CLI-LICENSE.txt"/>
563 <fileset dir="/usr/share/java">
564 <include name="commons-cli.jar"/>
565 </fileset>
566 </unzip>
567 <makeManifest file="${stagingDirectory}/META-INF/MANIFEST.MF" />
568 <!-- TODO try to make use of jarjar keep ability -->
569 <jarjar jarfile="${targetDistDirectory}/groovy-all.jar"
570 manifest="${stagingDirectory}/META-INF/MANIFEST.MF">
571 <fileset dir="${stagingDirectory}" excludes="groovy/util/CliBuilder*.class,groovy/util/OptionAccessor*.class,org/codehaus/groovy/tools/shell/util/HelpFormatter*.class"/>
572 <rule pattern="antlr.**" result="groovyjarjarantlr.@1"/>
573 <rule pattern="org.objectweb.**" result="groovyjarjarasm.@1"/>
574 <rule pattern="org.apache.commons.cli.**" result="groovyjarjarcommonscli.@1"/>
575 </jarjar>
576 <jar destfile="${targetDistDirectory}/groovy-all.jar" update="true"
577 basedir="${stagingDirectory}" includes="groovy/util/CliBuilder*.class,groovy/util/OptionAccessor*.class,org/codehaus/groovy/tools/shell/util/HelpFormatter*.class"/>
578
579 <copy file="${targetDistDirectory}/groovy-${groovyVersion}-sources.jar"
580 tofile="${targetDistDirectory}/groovy-all-${groovyVersion}-sources.jar"/>
581 <delete dir="${stagingDirectory}" quiet="true"/>
582 </target>
583
584 <target name="createJars" depends="-checkAntVersion,test,-actuallyCreateJars"
585 description="Build Groovy and create the jarfiles."/>
586
587 <target name="updateJarsForOsgi" unless="_skipOsgi_">
588 <taskdef resource="aQute/bnd/ant/taskdef.properties" classpath="/usr/share/java/bnd.jar"/>
589 <copy todir="${targetDistDirectory}">
590 <fileset dir="config/bnd" includes="groovy*.bnd"/>
591 <filterset>
592 <filter token="GROOVY_BUNDLE_VERSION" value="${groovyBundleVersion}"/>
593 </filterset>
594 </copy>
595 <property name="jarsToWrap" value="groovy.jar,groovy-all.jar" />
596 <bndwrap definitions="${targetDistDirectory}" output="${targetDistDirectory}" failok="true">
597 <fileset dir="${targetDistDirectory}" includes="${jarsToWrap}"/>
598 </bndwrap>
599 <delete dir="${targetDistDirectory}" includes="${jarsToWrap}"/>
600 <move todir="${targetDistDirectory}">
601 <fileset dir="${targetDistDirectory}" includes="groovy*.bar"/>
602 <globmapper from="groovy*.bar" to="groovy*-${groovyVersion}.jar"/>
603 </move>
604 <delete dir="${targetDistDirectory}" includes="groovy*.bnd"/>
605 </target>
606
607 <target name="skipOsgi" if="_skipOsgi_">
608 <move todir="${targetDistDirectory}">
609 <fileset dir="${targetDistDirectory}" includes="groovy*.jar"/>
610 <globmapper from="groovy*.jar" to="groovy*-${groovyVersion}.jar"/>
611 </move>
612 </target>
613
614 <target name="install" depends="createJars,updateJarsForOsgi,skipOsgi" unless="testFailed"
615 description="Create an installation hierarchy in target/install.">
616
617 <!--
618 FIXME: It's not really a good idea to delete stuff, as it tends to negate Ant's (or other tools)
619 ability to run faster incremental builds.
620 -->
621 <delete dir="${installDirectory}" quiet="true"/>
622 <mkdir dir="${installDirectory}"/>
623
624 <!-- Install license files -->
625 <copy todir="${installDirectory}">
626 <fileset dir="${basedir}">
627 <include name="LICENSE.txt"/>
628 <include name="NOTICE.txt"/>
629 </fileset>
630 </copy>
631 <unzip dest="${installDirectory}">
632 <patternset>
633 <include name="META-INF/*-LICENSE.txt"/>
634 </patternset>
635 <mapper type="flatten"/>
636 <fileset file="${targetDistDirectory}/groovy-all-${groovyVersion}.jar"/>
637 </unzip>
638 <fixcrlf srcdir="${installDirectory}" eol="crlf" includes="*.txt"/>
639
640 <!-- Install generated artifacts and runtime dependencies -->
641 <mkdir dir="${installDirectory}/lib"/>
642 <copy todir="${installDirectory}/lib">
643 <fileset dir="${targetDistDirectory}" includes="groovy-${groovyVersion}.jar"/>
644 </copy>
645
646 <!-- Install the embeddable bits -->
647 <mkdir dir="${installDirectory}/embeddable"/>
648 <copy todir="${installDirectory}/embeddable">
649 <fileset dir="${targetDistDirectory}" includes="groovy-all-${groovyVersion}.jar"/>
650 </copy>
651
652 <!-- Install configuration files -->
653 <mkdir dir="${installDirectory}/conf"/>
654 <copy toDir="${installDirectory}/conf">
655 <fileset dir="${sourceDirectory}/conf" includes="*"/>
656 </copy>
657
658 <!-- Install scripts -->
659 <mkdir dir="${installDirectory}/bin"/>
660 <copy toDir="${installDirectory}/bin">
661 <fileset dir="${sourceDirectory}/bin" includes="*"/>
662 <filterset>
663 <filter token="GROOVYJAR" value="groovy-${groovyVersion}.jar"/>
664 </filterset>
665 </copy>
666
667 <!-- Tweak scripts for platform compatibility -->
668 <fixcrlf srcdir="${installDirectory}/bin" eol="lf" excludes="*.bat"/>
669 <fixcrlf srcdir="${installDirectory}/bin" eol="crlf" includes="*.bat"/>
670 <chmod perm="ugo+x">
671 <fileset dir="${installDirectory}/bin" includes="*,*.*"/>
672 </chmod>
673 </target>
674
675 <target name="checkstyle" depends="-init,-initializeReports"
676 description="Create the code style reports.">
677 <checkAndReport
678 reportDirectory="${reportsDirectory}/checkstyle"
679 sourceDirectory="${mainSourceDirectory}"
680 excludes="org/codehaus/groovy/antlr/parser/*,org/codehaus/groovy/antlr/java/*,org/codehaus/groovy/syntax/Types.java">
681 <path>
682 <pathelement path="${mainClassesDirectory}"/>
683 <path refid="testLibPath"/>
684 </path>
685 </checkAndReport>
686 </target>
687
688 <target name="-compileTools" depends="-initGroovyc,compileMain">
689 <groovyc srcdir="${toolsSourceDirectory}" destdir="${toolsClassesDirectory}" fork="true">
690 <classpath>
691 <path refid="toolsPath"/>
692 <pathelement path="${mainClassesDirectory}"/>
693 <path refid="compilePath"/>
694 </classpath>
695 </groovyc>
696 <copy todir="${toolsClassesDirectory}">
697 <fileset dir="${toolsSourceDirectory}">
698 <include name="**/*.html"/>
699 </fileset>
700 </copy>
701 </target>
702
703 <target name="cruiseReportExtras">
704 <mkdir dir="${cruiseReportRootDirectory}"/>
705 <copy todir="${cruiseReportRootDirectory}">
706 <fileset dir="cruise/html"/>
707 </copy>
708 </target>
709
710 <target name="cruiseInit">
711 <property name="noTextReports" value="true"/>
712 <property name="forceCoverage" value="true"/>
713 <delete dir="${reportsDirectory}" quiet="true" failonerror="false"/>
714 <delete dir="${junitRawDirectory}" quiet="true" failonerror="false"/>
715 </target>
716
717 <target name="cruise" depends="cruiseInit,fulldist,cruiseReportExtras"/>
718
719 <target name="-docInit">
720 <mkdir dir="${docsDirectory}"/>
721 <property name="docFooter" value="Copyright &amp;copy; 2003-2009 The Codehaus. All rights reserved."/>
722 <property name="title" value="Groovy ${groovyVersion}"/>
723 </target>
724
725 <target name="doc" depends="javadoc, groovydoc" description="Create the documentation."/>
726
727 <target name="javadoc" depends="-docInit,-jvm14BuildWarning,ensureGrammars"
728 description="Create the javadoc documentation.">
729 <javadoc destdir="${docsDirectory}/api" author="true" version="true"
730 windowtitle="${title}" doctitle="${title}"
731 encoding="ISO-8859-1" useexternalfile="true" source="1.5"
732 footer="${docFooter}"
733 maxmemory="${javaDoc_mx}"
734 >
735 <classpath>
736 <path path="${mainClassesDirectory}"/>
737 <path refid="compilePath"/>
738 </classpath>
739 <fileset dir="${mainSourceDirectory}" includes="**/*.java"/>
740 <link href="http://java.sun.com/j2se/1.5.0/docs/api"/>
741 <link href="http://www.dpml.net/api/ant/1.7.0"/>
742 <link href="http://junit.sourceforge.net/junit3.8.1/javadoc/"/>
743 <link href="http://java.sun.com/j2ee/1.4/docs/api"/>
744 <link href="http://www.antlr2.org/javadoc"/>
745 </javadoc>
746 <mkdir dir="${targetDistDirectory}"/>
747 <jar basedir="${docsDirectory}/api" destfile="${targetDistDirectory}/groovy-${groovyVersion}-javadoc.jar"/>
748 <copy toFile="${targetDistDirectory}/groovy-all-${groovyVersion}-javadoc.jar">
749 <fileset file="${targetDistDirectory}/groovy-${groovyVersion}-javadoc.jar"/>
750 </copy>
751 </target>
752
753 <target name="groovydoc">
754 <path id="groovydocpath">
755 <path path="${mainClassesDirectory}"/>
756 <path path="${java.class.path}"/>
757 </path>
758 <antforked target="realgroovydoc" maxmemory="${groovyDoc_mx}" classpathref="groovydocpath"/>
759 </target>
760
761 <target name="realgroovydoc" depends="-docInit,-includeGroovyDocTemplates,docGDK">
762 <taskdef name="groovydoc" classname="org.codehaus.groovy.ant.Groovydoc">
763 <classpath>
764 <path path="${mainClassesDirectory}"/>
765 <path refid="compilePath"/>
766 </classpath>
767 </taskdef>
768 <groovydoc
769 destdir="${docsDirectory}/gapi"
770 sourcepath="${mainSourceDirectory}"
771 packagenames="**.*"
772 use="true"
773 windowtitle="${title}"
774 doctitle="${title}"
775 header="${title}"
776 footer="${docFooter}"
777 overview="src/main/overview.html"
778 private="false">
779 <link packages="java.,org.xml.,javax.,org.xml." href="http://java.sun.com/j2se/1.5.0/docs/api"/>
780 <link packages="org.apache.ant.,org.apache.tools.ant." href="http://www.dpml.net/api/ant/1.7.0"/>
781 <link packages="org.junit.,junit.framework." href="http://junit.sourceforge.net/junit3.8.1/javadoc/"/>
782 <link packages="antlr." href="http://www.antlr2.org/javadoc/"/>
783 <link packages="javax.servlet.,javax.management." href="http://java.sun.com/j2ee/1.4/docs/api"/>
784 <link packages="groovy.,org.codehaus.groovy." href="http://groovy.codehaus.org/gapi/"/>
785 </groovydoc>
786 </target>
787
788 <target name="docGDK" depends="-compileTools" description="Create the GDK documentation">
789 <java classname="org.codehaus.groovy.tools.DocGenerator" fork="yes" failonerror="true">
790 <classpath>
791 <pathelement path="${toolsClassesDirectory}"/>
792 <path refid="toolsPath"/>
793 <pathelement path="${mainClassesDirectory}"/>
794 </classpath>
795 <arg value="org.codehaus.groovy.runtime.DefaultGroovyMethods"/>
796 <arg value="org.codehaus.groovy.runtime.DefaultGroovyStaticMethods"/>
797 <arg value="org.codehaus.groovy.vmplugin.v5.PluginDefaultGroovyMethods"/>
798 </java>
799 <copy todir="target/html/groovy-jdk" file="src/tools/org/codehaus/groovy/tools/groovy.ico"/>
800 <copy todir="target/html/groovy-jdk" file="src/tools/org/codehaus/groovy/tools/stylesheet.css"/>
801 </target>
802
803 <target name="clean" description="Clean up build artifacts.">
804 <delete dir="${targetDirectory}" quiet="true"/>
805 <delete file="cobertura.ser" quiet="true" failonerror="false"/>
806 <delete quiet="true">
807 <fileset dir="." includes="**/*~"/>
808 <fileset dir="${groovyParserDirectory}" includes="Groovy*.*"/>
809 <fileset dir="${javaParserDirectory}" includes="JavaLexer.java,JavaRecognizer.java,JavaTokenTypes.java,JavaTokenTypes.txt,*.smap"/>
810 </delete>
811 </target>
812
813 <target name="deploy" depends="install,doc"
814 description="Deploy jars to maven repository.">
815 <mavenDeploy version="${groovyVersion}" prefix="groovy"/>
816 <mavenDeploy version="${groovyVersion}" prefix="groovy-all"/>
817 </target>
818
819 <target name="installRepo" depends="install,doc"
820 description="Deploy artifacts to local maven repository.">
821 <mavenInstallRepo version="${groovyVersion}" prefix="groovy"/>
822 <mavenInstallRepo version="${groovyVersion}" prefix="groovy-all"/>
823 </target>
824
825 <target name="fulldist" depends="dist,compileExamples,checkstyle" description="dist plus examples plus checkstyle"/>
826
827 <target name="dist" depends="install,doc" description="Create everything needed for a distribution.">
828 <zip destfile="${targetDistDirectory}/groovy-binary-${groovyVersion}.zip"
829 comment="The Groovy ${groovyVersion} binary distribution.">
830
831 <!-- Make unix scripts executable -->
832 <zipfileset dir="${installDirectory}" prefix="groovy-${groovyVersion}" filemode="775">
833 <include name="bin/*"/>
834 <exclude name="bin/*.*"/>
835 <exclude name="bin/startGroovy*"/>
836 </zipfileset>
837
838 <!-- Include the other scripts as is -->
839 <zipfileset dir="${installDirectory}" prefix="groovy-${groovyVersion}">
840 <include name="bin/*.*"/>
841 <include name="bin/startGroovy*"/>
842 </zipfileset>
843
844 <!-- Include everything else as is too -->
845 <zipfileset dir="${installDirectory}" prefix="groovy-${groovyVersion}">
846 <exclude name="bin/**"/>
847 <include name="**"/>
848 </zipfileset>
849 </zip>
850
851 <zip destfile="${targetDistDirectory}/groovy-docs-${groovyVersion}.zip"
852 comment="The Groovy ${groovyVersion} documentation distribution.">
853 <zipfileset dir="${wikiPdfDirectory}" includes="wiki-snapshot.pdf" prefix="groovy-${groovyVersion}/pdf"/>
854 <zipfileset dir="${docsDirectory}" prefix="groovy-${groovyVersion}/html"/>
855 </zip>
856
857 <zip destfile="${targetDistDirectory}/groovy-src-${groovyVersion}.zip"
858 comment="The Groovy ${groovyVersion} source distribution.">
859 <zipfileset dir="${basedir}" prefix="groovy-${groovyVersion}">
860 <!-- Exclude generated bits as well as any other bits that shouldn't make it in -->
861 <exclude name="${targetDirectory}/**"/>
862 <exclude name="classes/**"/>
863 <exclude name="cruise/**"/>
864 <exclude name=".clover/*"/>
865 <exclude name="local.build.properties"/>
866 <exclude name="cobertura.ser"/>
867 <exclude name="junitvmwatcher*.properties"/>
868 </zipfileset>
869 </zip>
870 </target>
871
872</project>
8730
=== removed directory '.pc/start-scripts.patch'
=== removed directory '.pc/start-scripts.patch/src'
=== removed directory '.pc/start-scripts.patch/src/bin'
=== removed file '.pc/start-scripts.patch/src/bin/startGroovy'
--- .pc/start-scripts.patch/src/bin/startGroovy 2010-02-26 16:39:51 +0000
+++ .pc/start-scripts.patch/src/bin/startGroovy 1970-01-01 00:00:00 +0000
@@ -1,272 +0,0 @@
1# -*- mode:sh -*-
2
3##############################################################################
4## ##
5## Groovy JVM Bootstrap for UN*X ##
6## ##
7##############################################################################
8
9##
10## $Revision: 14460 $
11## $Date: 2008-12-17 12:36:49 +0100 (Mi, 17. Dez 2008) $
12##
13
14PROGNAME=`basename "$0"`
15
16#DIRNAME=`dirname "$0"`
17
18SCRIPT_PATH="$0"
19
20# Use the maximum available, or set MAX_FD != -1 to use that value.
21MAX_FD="maximum"
22
23warn ( ) {
24 echo "${PROGNAME}: $*"
25}
26
27die ( ) {
28 warn "$*"
29 exit 1
30}
31
32earlyInit ( ) {
33 return
34}
35
36lateInit ( ) {
37 return
38}
39
40GROOVY_STARTUP="$HOME/.groovy/startup"
41if [ -r "$GROOVY_STARTUP" ] ; then
42 . "$GROOVY_STARTUP"
43fi
44
45earlyInit
46
47# OS specific support (must be 'true' or 'false').
48cygwin=false
49msys=false
50darwin=false
51case "`uname`" in
52 CYGWIN* )
53 cygwin=true
54 ;;
55 Darwin* )
56 darwin=true
57 ;;
58 MINGW* )
59 msys=true
60 ;;
61esac
62
63if [ "$1" = "-cp" -o "$1" = "-classpath" ] ; then
64 CP=$2
65 shift 2
66fi
67
68# Attempt to set JAVA_HOME if it's not already set.
69if [ -z "$JAVA_HOME" ] ; then
70 if $darwin ; then
71 [ -z "$JAVA_HOME" -a -d "/Library/Java/Home" ] && export JAVA_HOME="/Library/Java/Home"
72 [ -z "$JAVA_HOME" -a -d "/System/Library/Frameworks/JavaVM.framework/Home" ] && export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home"
73 else
74 javaExecutable="`which javac`"
75 [ -z "$javaExecutable" -o "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ] && die "JAVA_HOME not set and cannot find javac to deduce location, please set JAVA_HOME."
76 # readlink(1) is not available as standard on Solaris 10.
77 readLink=`which readlink`
78 [ `expr "$readLink" : '\([^ ]*\)'` = "no" ] && die "JAVA_HOME not set and readlink not available, please set JAVA_HOME."
79 javaExecutable="`readlink -f \"$javaExecutable\"`"
80 javaHome="`dirname \"$javaExecutable\"`"
81 javaHome=`expr "$javaHome" : '\(.*\)/bin'`
82 JAVA_HOME="$javaHome"
83 export JAVA_HOME
84
85 fi
86fi
87
88# For Cygwin, ensure paths are in UNIX format before anything is touched.
89if $cygwin ; then
90 [ -n "$GROOVY_HOME" ] && GROOVY_HOME=`cygpath --unix "$GROOVY_HOME"`
91 [ -n "$JAVACMD" ] && JAVACMD=`cygpath --unix "$JAVACMD"`
92 [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
93 [ -n "$CP" ] && CP=`cygpath --path --unix "$CP"`
94else
95 if [ -n "$GROOVY_HOME" -a `expr "$GROOVY_HOME":'\/$'` ] ; then
96 GROOVY_HOME=`echo $GROOVY_HOME | sed -e 's/\/$//'`
97 fi
98fi
99
100# For MSYS, ensure paths are in appropriate format.
101if $msys
102then
103 [ -n "$JAVA_HOME" ] && JAVA_HOME=`( cd "$JAVA_HOME" ; pwd )`
104fi
105
106# Attempt to set GROOVY_HOME if it is not already set.
107if [ -z "$GROOVY_HOME" -o ! -d "$GROOVY_HOME" ] ; then
108 # Resolve links: $0 may be a link to groovy's home.
109 PRG="$0"
110 # Need this for relative symlinks.
111 while [ -h "$PRG" ] ; do
112 ls=`ls -ld "$PRG"`
113 link=`expr "$ls" : '.*-> \(.*\)$'`
114 if expr "$link" : '/.*' > /dev/null; then
115 PRG="$link"
116 else
117 PRG=`dirname "$PRG"`"/$link"
118 fi
119 done
120 SAVED="`pwd`"
121 cd "`dirname \"$PRG\"`/.."
122 GROOVY_HOME="`pwd -P`"
123 cd "$SAVED"
124fi
125
126# Set the default Groovy config if no specific one is mentioned.
127if [ -z "$GROOVY_CONF" ] ; then
128 GROOVY_CONF="$GROOVY_HOME/conf/groovy-starter.conf"
129fi
130STARTER_CLASSPATH="$GROOVY_HOME/lib/@GROOVYJAR@"
131
132# Create the final classpath. Setting a classpath using the -cp or -classpath option means not to use the
133# global classpath. Groovy behaves then the same as the java interpreter
134if [ -n "$CP" ] ; then
135 CP="$CP":.
136elif [ -n "$CLASSPATH" ] ; then
137 CP="$CLASSPATH":.
138else
139 CP=.
140fi
141
142# Determine the Java command to use to start the JVM.
143if [ -z "$JAVACMD" ] ; then
144 if [ -n "$JAVA_HOME" ] ; then
145 if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
146 # IBM's JDK on AIX uses strange locations for the executables
147 JAVACMD="$JAVA_HOME/jre/sh/java"
148 else
149 JAVACMD="$JAVA_HOME/bin/java"
150 fi
151 else
152 JAVACMD="java"
153 fi
154fi
155if [ ! -x "$JAVACMD" ] ; then
156 die "JAVA_HOME is not defined correctly, can not execute: $JAVACMD"
157fi
158if [ -z "$JAVA_HOME" ] ; then
159 warn "JAVA_HOME environment variable is not set"
160fi
161
162# Increase the maximum file descriptors if we can.
163if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
164 MAX_FD_LIMIT=`ulimit -H -n`
165 if [ $? -eq 0 ] ; then
166 if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
167 MAX_FD="$MAX_FD_LIMIT"
168 fi
169 ulimit -n $MAX_FD
170 if [ $? -ne 0 ] ; then
171 warn "Could not set maximum file descriptor limit: $MAX_FD"
172 fi
173 else
174 warn "Could not query businessSystem maximum file descriptor limit: $MAX_FD_LIMIT"
175 fi
176fi
177
178# Setup Profiler
179useprofiler=false
180if [ "$PROFILER" != "" ] ; then
181 if [ -r "$PROFILER" ] ; then
182 . $PROFILER
183 useprofiler=true
184 else
185 die "Profiler file not found: $PROFILER"
186 fi
187fi
188
189# For Darwin, use classes.jar for TOOLS_JAR
190TOOLS_JAR="$JAVA_HOME/lib/tools.jar"
191#if $darwin; then
192# TOOLS_JAR="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes/classes.jar"
193#fi
194
195# For Darwin, add GROOVY_APP_NAME to the JAVA_OPTS as -Xdock:name
196if $darwin; then
197 JAVA_OPTS="$JAVA_OPTS -Xdock:name=$GROOVY_APP_NAME"
198# we may also want to set -Xdock:image
199fi
200
201# For Cygwin, switch paths to Windows format before running java
202if $cygwin ; then
203 GROOVY_HOME=`cygpath --mixed "$GROOVY_HOME"`
204 JAVA_HOME=`cygpath --mixed "$JAVA_HOME"`
205 GROOVY_CONF=`cygpath --mixed "$GROOVY_CONF"`
206 CP=`cygpath --path --mixed "$CP"`
207 TOOLS_JAR=`cygpath --mixed "$TOOLS_JAR"`
208 STARTER_CLASSPATH=`cygpath --path --mixed "$STARTER_CLASSPATH"`
209
210 # We build the pattern for arguments to be converted via cygpath
211 ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
212 SEP=""
213 for dir in $ROOTDIRSRAW ; do
214 ROOTDIRS="$ROOTDIRS$SEP$dir"
215 SEP="|"
216 done
217 OURCYGPATTERN="(^($ROOTDIRS))"
218 # Add a user-defined pattern to the cygpath arguments
219 if [ "$GROOVY_CYGPATTERN" != "" ] ; then
220 OURCYGPATTERN="$OURCYGPATTERN|($GROOVY_CYGPATTERN)"
221 fi
222 # Now convert the arguments - kludge to limit ourselves to /bin/sh
223 i=0
224 for arg in "$@" ; do
225 CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
226 if [ $CHECK -ne 0 ] ; then
227 eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
228 else
229 eval `echo args$i`="\"$arg\""
230 fi
231 i=`expr $i + 1`
232 done
233 case $i in
234 0) set -- ;;
235 1) set -- "$args0" ;;
236 2) set -- "$args0" "$args1" ;;
237 3) set -- "$args0" "$args1" "$args2" ;;
238 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
239 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
240 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
241 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
242 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
243 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
244 esac
245
246fi
247
248startGroovy ( ) {
249 CLASS=$1
250 shift
251 # Start the Profiler or the JVM
252 if $useprofiler ; then
253 runProfiler
254 else
255 exec "$JAVACMD" $JAVA_OPTS \
256 -classpath "$STARTER_CLASSPATH" \
257 -Dscript.name="$SCRIPT_PATH" \
258 -Dprogram.name="$PROGNAME" \
259 -Dgroovy.starter.conf="$GROOVY_CONF" \
260 -Dgroovy.home="$GROOVY_HOME" \
261 -Dtools.jar="$TOOLS_JAR" \
262 $STARTER_MAIN_CLASS \
263 --main $CLASS \
264 --conf "$GROOVY_CONF" \
265 --classpath "$CP" \
266 "$@"
267 fi
268}
269
270STARTER_MAIN_CLASS=org.codehaus.groovy.tools.GroovyStarter
271
272lateInit
2730
=== modified file 'build.properties'
--- build.properties 2010-06-09 11:11:04 +0000
+++ build.properties 2011-02-24 17:57:34 +0000
@@ -1,8 +1,6 @@
1groovyVersion = 1.7.01groovyVersion = 1.7.4
2groovyBundleVersion = 1.7.02# bundle version format: major('.'minor('.'micro('.'qualifier)?)?)? (first 3 only digits)
33groovyBundleVersion = 1.7.4
4# uncomment the following line to enable java5 elements in the build
5# groovy.build.vm5=true
64
7# Many people have reported problems testing UberTestCaseGroovySourceSubPackages, others have no difficulties with the default5# Many people have reported problems testing UberTestCaseGroovySourceSubPackages, others have no difficulties with the default
8# values ant junit task uses. The decision has been taken to provide the values to try and cause the least6# values ant junit task uses. The decision has been taken to provide the values to try and cause the least
97
=== modified file 'build.xml'
--- build.xml 2010-06-09 11:11:04 +0000
+++ build.xml 2011-02-24 17:57:34 +0000
@@ -17,8 +17,8 @@
1717
18Author : Russel Winder18Author : Russel Winder
19Author : Paul King19Author : Paul King
20$Revision: 18555 $ ($LastChangedBy: paulk $)20$Revision: 20245 $ ($LastChangedBy: paulk $)
21$Date: 2009-12-08 14:08:59 +0100 (Di, 08. Dez 2009) $21$Date: 2010-06-07 02:45:33 +0200 (Mo, 07. Jun 2010) $
22-->22-->
2323
24<project name="Groovy" default="createJars" basedir=".">24<project name="Groovy" default="createJars" basedir=".">
@@ -50,6 +50,10 @@
50 <istrue value="${skipExamples}"/>50 <istrue value="${skipExamples}"/>
51 </condition>51 </condition>
5252
53 <condition property="_skipDocs_">
54 <istrue value="${skipDocs}"/>
55 </condition>
56
53 <condition property="_skipOsgi_">57 <condition property="_skipOsgi_">
54 <istrue value="${skipOsgi}"/>58 <istrue value="${skipOsgi}"/>
55 </condition>59 </condition>
@@ -62,6 +66,10 @@
62 <istrue value="${skipEmbeddable}"/>66 <istrue value="${skipEmbeddable}"/>
63 </condition>67 </condition>
6468
69 <condition property="_forceServerSettings_">
70 <istrue value="${forceServerSettings}"/>
71 </condition>
72
65 <condition property="groovy.build.vm4">73 <condition property="groovy.build.vm4">
66 <contains string="${ant.java.version}" substring="1.4"/>74 <contains string="${ant.java.version}" substring="1.4"/>
67 </condition>75 </condition>
@@ -95,16 +103,6 @@
95 </antlr>103 </antlr>
96 </target>104 </target>
97105
98 <target name="updatePolicy">
99 <move file="security/groovy.policy" tofile="security/groovy.policy.template"/>
100 <copy tofile="security/groovy.policy">
101 <fileset file="security/groovy.policy.template"/>
102 <filterset>
103 <filter token="relativePathToRealBasedir" value="${relativePathToRealBasedir}"/>
104 </filterset>
105 </copy>
106 </target>
107
108 <target name="-init">106 <target name="-init">
109 <xslt in="pom.xml" out="${targetDirectory}/groovy-all.pom" style="config/maven/groovy-all.xsl"/>107 <xslt in="pom.xml" out="${targetDirectory}/groovy-all.pom" style="config/maven/groovy-all.xsl"/>
110 </target>108 </target>
@@ -162,33 +160,32 @@
162 </target>160 </target>
163 -->161 -->
164162
165 <target name="dgmConvert" depends="stagedcompile">163 <target name="compileMain" depends="stagedcompile"
166 <java classname="org.codehaus.groovy.tools.DgmConverter"
167 fork="yes"
168 failonerror="true">
169 <classpath refid="compilePath"/>
170 <classpath path="${mainClassesDirectory}"/>
171 </java>
172 </target>
173
174 <target name="compileMain" depends="stagedcompile,dgmConvert"
175 description="Compile the Java and Groovy code in the main source.">164 description="Compile the Java and Groovy code in the main source.">
176 </target>165 </target>
177166
178 <target name="stagedcompile" depends="-init,ensureGrammars,-jvm14BuildWarning" unless="uber">167 <target name="stagedcompile" depends="-init,ensureGrammars,-jvm14BuildWarning" unless="uber">
179 <mkdir dir="${mainClassesDirectory}"/>168 <mkdir dir="${mainClassesDirectory}"/>
180 <mkdir dir="${toolsClassesDirectory}"/>169 <mkdir dir="${toolsClassesDirectory}"/>
170 <mkdir dir="${mainClassesDirectory}/META-INF"/>
181171
182 <javac srcdir="${mainSourceDirectory}" includeantruntime="false" destdir="${mainClassesDirectory}"172 <javac srcdir="${mainSourceDirectory}" includeantruntime="false" destdir="${mainClassesDirectory}"
183 deprecation="on" debug="yes" source="1.5" target="1.5" fork="true" classpathref="compilePath">173 deprecation="on" debug="yes" source="1.5" target="1.5" fork="true" classpathref="compilePath">
184 <exclude name="groovy/ui/**/*.java"/>174 <exclude name="groovy/ui/**/*.java"/>
185 </javac>175 </javac>
176 <java classname="org.codehaus.groovy.tools.DgmConverter"
177 fork="yes"
178 failonerror="true">
179 <classpath refid="compilePath"/>
180 <classpath path="${mainClassesDirectory}"/>
181 </java>
186 <antcall inheritrefs="true" target="-stagedcompile-groovy"/>182 <antcall inheritrefs="true" target="-stagedcompile-groovy"/>
187 <antcall target="-includeResources"/>183 <antcall target="-includeResources"/>
188 </target>184 </target>
189185
190 <target name="-stagedcompile-groovy" depends="-initGroovyc">186 <target name="-stagedcompile-groovy" depends="-initGroovyc">
191 <groovyc srcdir="${mainSourceDirectory}" destdir="${mainClassesDirectory}" fork="true" memorymaximumsize="${groovycMain_mx}">187 <groovyc srcdir="${mainSourceDirectory}" destdir="${mainClassesDirectory}" fork="true"
188 memorymaximumsize="${groovycMain_mx}">
192 <classpath>189 <classpath>
193 <pathelement path="${mainClassesDirectory}"/>190 <pathelement path="${mainClassesDirectory}"/>
194 <path refid="compilePath"/>191 <path refid="compilePath"/>
@@ -199,7 +196,7 @@
199196
200 <property name="vm5GroovySourceFiles" value="**/*.groovy"/>197 <property name="vm5GroovySourceFiles" value="**/*.groovy"/>
201 <property name="vm5JavaSourceFiles" value="**/*.java"/>198 <property name="vm5JavaSourceFiles" value="**/*.java"/>
202 <property name="vm6GroovySourceFiles" value="groovy/**/vm6/*Test.groovy"/>199 <property name="vm6GroovySourceFiles" value="groovy/**/vm6/*Test.groovy,org/codehaus/groovy/**/vm6/*Test.groovy"/>
203200
204 <target name="-initGroovyc">201 <target name="-initGroovyc">
205 <path id="groovyMainClasses">202 <path id="groovyMainClasses">
@@ -253,7 +250,8 @@
253 </groovyc>250 </groovyc>
254 </target>251 </target>
255252
256 <target name="compileExamples" depends="-init,-initGroovyc,compileMain,-includeExamplesResources" unless="_skipExamples_"253 <target name="compileExamples" depends="-init,-initGroovyc,compileMain,-includeExamplesResources"
254 unless="_skipExamples_"
257 description="Compile the Java and Groovy code in the examples source directory.">255 description="Compile the Java and Groovy code in the examples source directory.">
258 <mkdir dir="${examplesClassesDirectory}"/>256 <mkdir dir="${examplesClassesDirectory}"/>
259 <echo message="Compiling example code."/>257 <echo message="Compiling example code."/>
@@ -269,10 +267,10 @@
269 </classpath>267 </classpath>
270 </groovyc>268 </groovyc>
271 <javac srcdir="${examplesSourceDirectory}"269 <javac srcdir="${examplesSourceDirectory}"
272 destdir="${examplesClassesDirectory}"270 destdir="${examplesClassesDirectory}"
273 source="1.5"271 source="1.5"
274 target="1.5"272 target="1.5"
275 fork="true">273 fork="true">
276 <classpath>274 <classpath>
277 <pathelement path="${mainClassesDirectory}"/>275 <pathelement path="${mainClassesDirectory}"/>
278 <pathelement path="${examplesClassesDirectory}"/>276 <pathelement path="${examplesClassesDirectory}"/>
@@ -281,7 +279,7 @@
281 </classpath>279 </classpath>
282 </javac>280 </javac>
283 <groovyc srcdir="${examplesSourceDirectory}"281 <groovyc srcdir="${examplesSourceDirectory}"
284 destdir="${examplesClassesDirectory}"282 destdir="${examplesClassesDirectory}"
285 fork="true"283 fork="true"
286 memorymaximumsize="${groovycExamples_mx}"284 memorymaximumsize="${groovycExamples_mx}"
287 excludes="webapps/groovlet-examples/WEB-INF/groovy/**/*.groovy,org/codehaus/groovy/grails/compiler/injection/**/*.java">285 excludes="webapps/groovlet-examples/WEB-INF/groovy/**/*.groovy,org/codehaus/groovy/grails/compiler/injection/**/*.java">
@@ -310,7 +308,7 @@
310 <target name="-testInit" depends="-initHeadless">308 <target name="-testInit" depends="-initHeadless">
311 <property name="headlessArg" value=""/>309 <property name="headlessArg" value=""/>
312 <property name="junitJvmArgs"310 <property name="junitJvmArgs"
313 value="-Xms${groovyJUnit_ms} -XX:PermSize=${groovyJUnit_permSize} -XX:MaxPermSize=${groovyJUnit_maxPermSize} ${headlessArg} -Dgroovy.testdb.props=${groovy.testdb.props}"/>311 value="-Xms${groovyJUnit_ms} -XX:PermSize=${groovyJUnit_permSize} -XX:MaxPermSize=${groovyJUnit_maxPermSize} ${headlessArg} -Dgroovy.testdb.props=${groovy.testdb.props} -DjavadocAssertion.src.dir=./src/main"/>
314 </target>312 </target>
315313
316 <target name="-initHeadless" if="_shouldBeHeadless_">314 <target name="-initHeadless" if="_shouldBeHeadless_">
@@ -336,7 +334,8 @@
336334
337 <target name="-testOne" if="_testOne_" depends="-initGroovyc">335 <target name="-testOne" if="_testOne_" depends="-initGroovyc">
338 <mkdir dir="${junitRawDirectory}"/>336 <mkdir dir="${junitRawDirectory}"/>
339 <junit printsummary="true" fork="true" includeantruntime="false" failureproperty="testFailed" maxmemory="${groovyJUnit_mx}" dir="${basedir}">337 <junit printsummary="true" fork="true" includeantruntime="false" failureproperty="testFailed"
338 maxmemory="${groovyJUnit_mx}" dir="${basedir}">
340 <sysproperty key="apple.awt.UIElement" value="true"/>339 <sysproperty key="apple.awt.UIElement" value="true"/>
341 <!-- keeps the dock from showing the AWT startup -->340 <!-- keeps the dock from showing the AWT startup -->
342 <jvmarg line="${junitJvmArgs}"/>341 <jvmarg line="${junitJvmArgs}"/>
@@ -375,16 +374,17 @@
375 </target>374 </target>
376375
377 <target name="-collect15tests" unless="groovy.build.vm6">376 <target name="-collect15tests" unless="groovy.build.vm6">
378 <fileset id="ubertests.fileset" dir="${testClassesDirectory}" includes="UberTest*.class" excludes="Uber*VM6.class,groovy/grape/*Test.class"/>377 <fileset id="ubertests.fileset" dir="${testClassesDirectory}" includes="UberTest*.class" excludes="Uber*VM6.class"/>
379 </target>378 </target>
380379
381 <target name="-collect16tests" if="groovy.build.vm6">380 <target name="-collect16tests" if="groovy.build.vm6">
382 <fileset id="ubertests.fileset" dir="${testClassesDirectory}" includes="UberTest*.class" excludes="groovy/grape/*Test.class"/>381 <fileset id="ubertests.fileset" dir="${testClassesDirectory}" includes="UberTest*.class"/>
383 </target>382 </target>
384383
385 <target name="-testAll" if="_testAll_" depends="-collect15tests,-collect16tests,-collectOptionalTests,-initGroovyc">384 <target name="-testAll" if="_testAll_" depends="-collect15tests,-collect16tests,-collectOptionalTests,-initGroovyc">
386 <mkdir dir="${junitRawDirectory}"/>385 <mkdir dir="${junitRawDirectory}"/>
387 <junit printsummary="true" fork="true" includeantruntime="false" failureproperty="testFailed" maxmemory="${groovyJUnit_mx}" dir="${basedir}">386 <junit printsummary="true" fork="true" includeantruntime="false" failureproperty="testFailed"
387 maxmemory="${groovyJUnit_mx}" dir="${basedir}">
388 <jvmarg line="${junitJvmArgs}"/>388 <jvmarg line="${junitJvmArgs}"/>
389 <sysproperty key="apple.awt.UIElement" value="true"/>389 <sysproperty key="apple.awt.UIElement" value="true"/>
390 <!-- keeps the dock from showing the AWT startup -->390 <!-- keeps the dock from showing the AWT startup -->
@@ -433,12 +433,12 @@
433 <target name="-makeManifest">433 <target name="-makeManifest">
434 <mkdir dir="${mainClassesDirectory}/META-INF"/>434 <mkdir dir="${mainClassesDirectory}/META-INF"/>
435 <copy todir="${mainClassesDirectory}/META-INF" file="LICENSE.txt"/>435 <copy todir="${mainClassesDirectory}/META-INF" file="LICENSE.txt"/>
436 <makeManifest file="${mainClassesDirectory}/META-INF/MANIFEST.MF"/>436 <makeManifest file="${mainClassesDirectory}/META-INF/MANIFEST.MF"/>
437 </target>437 </target>
438438
439 <macrodef name="makeManifest">439 <macrodef name="makeManifest">
440 <attribute name="file"/>440 <attribute name="file"/>
441 <attribute name="bundleEnvironment" default="J2SE-1.5"/>441 <attribute name="bundleEnvironment" default="J2SE-1.5"/>
442 <sequential>442 <sequential>
443 <manifest file="@{file}">443 <manifest file="@{file}">
444 <attribute name="Built-By" value="${user.name}"/>444 <attribute name="Built-By" value="${user.name}"/>
@@ -449,13 +449,13 @@
449 <attribute name="Implementation-Title" value="Groovy: a powerful, dynamic language for the JVM"/>449 <attribute name="Implementation-Title" value="Groovy: a powerful, dynamic language for the JVM"/>
450 <attribute name="Implementation-Version" value="${groovyVersion}"/>450 <attribute name="Implementation-Version" value="${groovyVersion}"/>
451 <attribute name="Implementation-Vendor" value="The Codehaus"/>451 <attribute name="Implementation-Vendor" value="The Codehaus"/>
452 <attribute name="Bundle-ManifestVersion" value="2" />452 <attribute name="Bundle-ManifestVersion" value="2"/>
453 <attribute name="Bundle-Name" value="Groovy Runtime" />453 <attribute name="Bundle-Name" value="Groovy Runtime"/>
454 <attribute name="Bundle-Description" value="Groovy Runtime" />454 <attribute name="Bundle-Description" value="Groovy Runtime"/>
455 <attribute name="Bundle-Version" value="${groovyBundleVersion}" />455 <attribute name="Bundle-Version" value="${groovyBundleVersion}"/>
456 <attribute name="Bundle-Vendor" value="The Codehaus" />456 <attribute name="Bundle-Vendor" value="The Codehaus"/>
457 <attribute name="Bundle-ClassPath" value="." />457 <attribute name="Bundle-ClassPath" value="."/>
458 <attribute name="Bundle-RequiredExecutionEnvironment" value="@{bundleEnvironment}" />458 <attribute name="Bundle-RequiredExecutionEnvironment" value="@{bundleEnvironment}"/>
459 <attribute name="Eclipse-BuddyPolicy" value="dependent"/>459 <attribute name="Eclipse-BuddyPolicy" value="dependent"/>
460 <attribute name="Eclipse-LazyStart" value="true"/>460 <attribute name="Eclipse-LazyStart" value="true"/>
461 <attribute name="DynamicImport-Package" value="*"/>461 <attribute name="DynamicImport-Package" value="*"/>
@@ -472,26 +472,27 @@
472 <include name="groovy/ui/**/*.png"/>472 <include name="groovy/ui/**/*.png"/>
473 <include name="groovy/inspect/swingui/AstBrowserProperties.groovy"/>473 <include name="groovy/inspect/swingui/AstBrowserProperties.groovy"/>
474 <include name="org/codehaus/groovy/tools/shell/**/*.properties"/>474 <include name="org/codehaus/groovy/tools/shell/**/*.properties"/>
475 <include name="org/codehaus/groovy/tools/groovydoc/**/*.properties"/>
475 <include name="org/codehaus/groovy/tools/shell/**/*.xml"/>476 <include name="org/codehaus/groovy/tools/shell/**/*.xml"/>
476 <include name="org/codehaus/groovy/antlib.xml"/>477 <include name="org/codehaus/groovy/antlib.xml"/>
477 </fileset>478 </fileset>
478 </copy>479 </copy>
479 <antcall target="-includeReleaseInfo"/>480 <antcall target="-includeReleaseInfo"/>
480 </target>481 </target>
481482
482 <target name="-includeReleaseInfo">483 <target name="-includeReleaseInfo">
483 <copy file="${mainSourceDirectory}/META-INF/groovy-release-info.properties" 484 <copy file="${mainSourceDirectory}/META-INF/groovy-release-info.properties"
484 todir="${mainClassesDirectory}/META-INF" overwrite="true">485 todir="${mainClassesDirectory}/META-INF" overwrite="true">
485 </copy>486 </copy>
486 <tstamp>487 <tstamp>
487 <format property="release.date" pattern="dd-MMM-yyyy"/>488 <format property="release.date" pattern="dd-MMM-yyyy"/>
488 <format property="release.time" pattern="hh:mm aa"/>489 <format property="release.time" pattern="hh:mm aa"/>
489 </tstamp>490 </tstamp>
490 <replace file="${mainClassesDirectory}/META-INF/groovy-release-info.properties">491 <replace file="${mainClassesDirectory}/META-INF/groovy-release-info.properties">
491 <replacefilter token="##ImplementationVersion##" value="${groovyVersion}"/> 492 <replacefilter token="##ImplementationVersion##" value="${groovyVersion}"/>
492 <replacefilter token="##BundleVersion##" value="${groovyBundleVersion}"/>493 <replacefilter token="##BundleVersion##" value="${groovyBundleVersion}"/>
493 <replacefilter token="##BuildDate##" value="${release.date}"/>494 <replacefilter token="##BuildDate##" value="${release.date}"/>
494 <replacefilter token="##BuildTime##" value="${release.time}"/>495 <replacefilter token="##BuildTime##" value="${release.time}"/>
495 </replace>496 </replace>
496 </target>497 </target>
497498
@@ -506,7 +507,7 @@
506 <target name="-includeGroovyDocTemplates">507 <target name="-includeGroovyDocTemplates">
507 <copy todir="${mainClassesDirectory}">508 <copy todir="${mainClassesDirectory}">
508 <fileset dir="${mainSourceDirectory}">509 <fileset dir="${mainSourceDirectory}">
509 <include name="org/codehaus/groovy/tools/groovydoc/gstringTemplates/**/*.*"/>510 <include name="org/codehaus/groovy/tools/groovydoc/gstringTemplates/*/*.*"/>
510 </fileset>511 </fileset>
511 <fileset dir="${toolsSourceDirectory}">512 <fileset dir="${toolsSourceDirectory}">
512 <include name="org/codehaus/groovy/tools/groovy.ico"/>513 <include name="org/codehaus/groovy/tools/groovy.ico"/>
@@ -514,7 +515,7 @@
514 </copy>515 </copy>
515 </target>516 </target>
516517
517 <target name="-initializeJars" depends="test">518 <target name="-initializeJars" depends="test" unless="_skipDocs_">
518 <delete dir="${targetDistDirectory}" quiet="true"/>519 <delete dir="${targetDistDirectory}" quiet="true"/>
519 <mkdir dir="${targetDistDirectory}"/>520 <mkdir dir="${targetDistDirectory}"/>
520 </target>521 </target>
@@ -564,23 +565,25 @@
564 <include name="commons-cli.jar"/>565 <include name="commons-cli.jar"/>
565 </fileset>566 </fileset>
566 </unzip>567 </unzip>
567 <makeManifest file="${stagingDirectory}/META-INF/MANIFEST.MF" />568 <makeManifest file="${stagingDirectory}/META-INF/MANIFEST.MF"/>
568 <!-- TODO try to make use of jarjar keep ability -->569 <!-- TODO try to make use of jarjar keep ability -->
569 <jarjar jarfile="${targetDistDirectory}/groovy-all.jar"570 <jarjar jarfile="${targetDistDirectory}/groovy-all.jar"
570 manifest="${stagingDirectory}/META-INF/MANIFEST.MF">571 manifest="${stagingDirectory}/META-INF/MANIFEST.MF">
571 <fileset dir="${stagingDirectory}" excludes="groovy/util/CliBuilder*.class,groovy/util/OptionAccessor*.class,org/codehaus/groovy/tools/shell/util/HelpFormatter*.class"/>572 <fileset dir="${stagingDirectory}"
573 excludes="groovy/util/CliBuilder*.class,groovy/util/OptionAccessor*.class,org/codehaus/groovy/tools/shell/util/HelpFormatter*.class"/>
572 <rule pattern="antlr.**" result="groovyjarjarantlr.@1"/>574 <rule pattern="antlr.**" result="groovyjarjarantlr.@1"/>
573 <rule pattern="org.objectweb.**" result="groovyjarjarasm.@1"/>575 <rule pattern="org.objectweb.**" result="groovyjarjarasm.@1"/>
574 <rule pattern="org.apache.commons.cli.**" result="groovyjarjarcommonscli.@1"/>576 <rule pattern="org.apache.commons.cli.**" result="groovyjarjarcommonscli.@1"/>
575 </jarjar>577 </jarjar>
576 <jar destfile="${targetDistDirectory}/groovy-all.jar" update="true"578 <jar destfile="${targetDistDirectory}/groovy-all.jar" update="true"
577 basedir="${stagingDirectory}" includes="groovy/util/CliBuilder*.class,groovy/util/OptionAccessor*.class,org/codehaus/groovy/tools/shell/util/HelpFormatter*.class"/>579 basedir="${stagingDirectory}"
580 includes="groovy/util/CliBuilder*.class,groovy/util/OptionAccessor*.class,org/codehaus/groovy/tools/shell/util/HelpFormatter*.class"/>
578581
579 <copy file="${targetDistDirectory}/groovy-${groovyVersion}-sources.jar"582 <copy file="${targetDistDirectory}/groovy-${groovyVersion}-sources.jar"
580 tofile="${targetDistDirectory}/groovy-all-${groovyVersion}-sources.jar"/>583 tofile="${targetDistDirectory}/groovy-all-${groovyVersion}-sources.jar"/>
581 <delete dir="${stagingDirectory}" quiet="true"/>584 <delete dir="${stagingDirectory}" quiet="true"/>
582 </target>585 </target>
583 586
584 <target name="createJars" depends="-checkAntVersion,test,-actuallyCreateJars"587 <target name="createJars" depends="-checkAntVersion,test,-actuallyCreateJars"
585 description="Build Groovy and create the jarfiles."/>588 description="Build Groovy and create the jarfiles."/>
586589
@@ -592,8 +595,10 @@
592 <filter token="GROOVY_BUNDLE_VERSION" value="${groovyBundleVersion}"/>595 <filter token="GROOVY_BUNDLE_VERSION" value="${groovyBundleVersion}"/>
593 </filterset>596 </filterset>
594 </copy>597 </copy>
595 <property name="jarsToWrap" value="groovy.jar,groovy-all.jar" />598 <property name="jarsToWrap" value="groovy.jar,groovy-all.jar"/>
596 <bndwrap definitions="${targetDistDirectory}" output="${targetDistDirectory}" failok="true">599 <property name="runtimeJars" refid="runtimePath"/>
600 <bndwrap definitions="${targetDistDirectory}" output="${targetDistDirectory}" failok="true"
601 classpath="${runtimeJars}">
597 <fileset dir="${targetDistDirectory}" includes="${jarsToWrap}"/>602 <fileset dir="${targetDistDirectory}" includes="${jarsToWrap}"/>
598 </bndwrap>603 </bndwrap>
599 <delete dir="${targetDistDirectory}" includes="${jarsToWrap}"/>604 <delete dir="${targetDistDirectory}" includes="${jarsToWrap}"/>
@@ -663,9 +668,15 @@
663 <filter token="GROOVYJAR" value="groovy-${groovyVersion}.jar"/>668 <filter token="GROOVYJAR" value="groovy-${groovyVersion}.jar"/>
664 </filterset>669 </filterset>
665 </copy>670 </copy>
671 <!-- icon -->
672 <copy todir="${installDirectory}/bin" flatten="true">
673 <fileset dir="${toolsSourceDirectory}">
674 <include name="org/codehaus/groovy/tools/groovy.ico"/>
675 </fileset>
676 </copy>
666677
667 <!-- Tweak scripts for platform compatibility -->678 <!-- Tweak scripts for platform compatibility -->
668 <fixcrlf srcdir="${installDirectory}/bin" eol="lf" excludes="*.bat"/>679 <fixcrlf srcdir="${installDirectory}/bin" eol="lf" excludes="*.bat, *.icns"/>
669 <fixcrlf srcdir="${installDirectory}/bin" eol="crlf" includes="*.bat"/>680 <fixcrlf srcdir="${installDirectory}/bin" eol="crlf" includes="*.bat"/>
670 <chmod perm="ugo+x">681 <chmod perm="ugo+x">
671 <fileset dir="${installDirectory}/bin" includes="*,*.*"/>682 <fileset dir="${installDirectory}/bin" includes="*,*.*"/>
@@ -718,30 +729,32 @@
718729
719 <target name="-docInit">730 <target name="-docInit">
720 <mkdir dir="${docsDirectory}"/>731 <mkdir dir="${docsDirectory}"/>
721 <property name="docFooter" value="Copyright &amp;copy; 2003-2009 The Codehaus. All rights reserved."/>732 <property name="docFooter" value="Copyright &amp;copy; 2003-2010 The Codehaus. All rights reserved."/>
722 <property name="title" value="Groovy ${groovyVersion}"/>733 <property name="title" value="Groovy ${groovyVersion}"/>
723 </target>734 </target>
724735
725 <target name="doc" depends="javadoc, groovydoc" description="Create the documentation."/>736 <target name="doc" depends="javadoc, groovydoc" description="Create the documentation."/>
726737
727 <target name="javadoc" depends="-docInit,-jvm14BuildWarning,ensureGrammars"738 <target name="javadoc" depends="-docInit,-jvm14BuildWarning,ensureGrammars"
728 description="Create the javadoc documentation.">739 unless="_skipDocs_" description="Create the javadoc documentation.">
729 <javadoc destdir="${docsDirectory}/api" author="true" version="true"740 <javadoc destdir="${docsDirectory}/api" author="true" version="true"
730 windowtitle="${title}" doctitle="${title}"741 windowtitle="${title}" doctitle="${title}"
731 encoding="ISO-8859-1" useexternalfile="true" source="1.5"742 encoding="ISO-8859-1" useexternalfile="true" source="1.5"
732 footer="${docFooter}"743 footer="${docFooter}"
744 overview="src/main/overviewj.html"
733 maxmemory="${javaDoc_mx}"745 maxmemory="${javaDoc_mx}"
734 >746 >
735 <classpath>747 <classpath>
736 <path path="${mainClassesDirectory}"/>748 <path path="${mainClassesDirectory}"/>
737 <path refid="compilePath"/>749 <path refid="compilePath"/>
738 </classpath>750 </classpath>
739 <fileset dir="${mainSourceDirectory}" includes="**/*.java"/>751 <fileset dir="${mainSourceDirectory}" includes="**/*.java"/>
740 <link href="http://java.sun.com/j2se/1.5.0/docs/api"/>752 <link href="http://java.sun.com/javase/6/docs/api"/>
741 <link href="http://www.dpml.net/api/ant/1.7.0"/>753 <link href="http://www.dpml.net/api/ant/1.7.0"/>
742 <link href="http://junit.sourceforge.net/junit3.8.1/javadoc/"/>754 <link href="http://junit.sourceforge.net/junit3.8.1/javadoc"/>
743 <link href="http://java.sun.com/j2ee/1.4/docs/api"/>755 <link href="http://java.sun.com/j2ee/1.4/docs/api"/>
744 <link href="http://www.antlr2.org/javadoc"/>756 <link href="http://www.antlr2.org/javadoc"/>
757 <link href="http://commons.apache.org/cli/api-release"/>
745 </javadoc>758 </javadoc>
746 <mkdir dir="${targetDistDirectory}"/>759 <mkdir dir="${targetDistDirectory}"/>
747 <jar basedir="${docsDirectory}/api" destfile="${targetDistDirectory}/groovy-${groovyVersion}-javadoc.jar"/>760 <jar basedir="${docsDirectory}/api" destfile="${targetDistDirectory}/groovy-${groovyVersion}-javadoc.jar"/>
@@ -753,7 +766,7 @@
753 <target name="groovydoc">766 <target name="groovydoc">
754 <path id="groovydocpath">767 <path id="groovydocpath">
755 <path path="${mainClassesDirectory}"/>768 <path path="${mainClassesDirectory}"/>
756 <path path="${java.class.path}"/>769 <path refid="compilePath"/>
757 </path>770 </path>
758 <antforked target="realgroovydoc" maxmemory="${groovyDoc_mx}" classpathref="groovydocpath"/>771 <antforked target="realgroovydoc" maxmemory="${groovyDoc_mx}" classpathref="groovydocpath"/>
759 </target>772 </target>
@@ -774,14 +787,13 @@
774 doctitle="${title}"787 doctitle="${title}"
775 header="${title}"788 header="${title}"
776 footer="${docFooter}"789 footer="${docFooter}"
777 overview="src/main/overview.html"790 overview="src/main/overview.html">
778 private="false">791 <link packages="javax.servlet.,javax.management." href="http://java.sun.com/j2ee/1.4/docs/api"/>
779 <link packages="java.,org.xml.,javax.,org.xml." href="http://java.sun.com/j2se/1.5.0/docs/api"/>792 <link packages="java.,org.xml.,javax.,org.xml." href="http://java.sun.com/javase/6/docs/api"/>
780 <link packages="org.apache.ant.,org.apache.tools.ant." href="http://www.dpml.net/api/ant/1.7.0"/>793 <link packages="org.apache.ant.,org.apache.tools.ant." href="http://www.dpml.net/api/ant/1.7.0"/>
781 <link packages="org.junit.,junit.framework." href="http://junit.sourceforge.net/junit3.8.1/javadoc/"/>794 <link packages="org.junit.,junit." href="http://junit.sourceforge.net/junit3.8.1/javadoc"/>
782 <link packages="antlr." href="http://www.antlr2.org/javadoc/"/>795 <link packages="org.apache.commons.cli." href="http://commons.apache.org/cli/api-release"/>
783 <link packages="javax.servlet.,javax.management." href="http://java.sun.com/j2ee/1.4/docs/api"/>796 <link packages="antlr." href="http://www.antlr2.org/javadoc"/>
784 <link packages="groovy.,org.codehaus.groovy." href="http://groovy.codehaus.org/gapi/"/>
785 </groovydoc>797 </groovydoc>
786 </target>798 </target>
787799
@@ -793,8 +805,14 @@
793 <pathelement path="${mainClassesDirectory}"/>805 <pathelement path="${mainClassesDirectory}"/>
794 </classpath>806 </classpath>
795 <arg value="org.codehaus.groovy.runtime.DefaultGroovyMethods"/>807 <arg value="org.codehaus.groovy.runtime.DefaultGroovyMethods"/>
808 <arg value="org.codehaus.groovy.runtime.SqlGroovyMethods"/>
809 <arg value="org.codehaus.groovy.runtime.SwingGroovyMethods"/>
810 <arg value="org.codehaus.groovy.runtime.XmlGroovyMethods"/>
811 <arg value="org.codehaus.groovy.runtime.EncodingGroovyMethods"/>
812 <arg value="org.codehaus.groovy.runtime.DateGroovyMethods"/>
796 <arg value="org.codehaus.groovy.runtime.DefaultGroovyStaticMethods"/>813 <arg value="org.codehaus.groovy.runtime.DefaultGroovyStaticMethods"/>
797 <arg value="org.codehaus.groovy.vmplugin.v5.PluginDefaultGroovyMethods"/>814 <arg value="org.codehaus.groovy.vmplugin.v5.PluginDefaultGroovyMethods"/>
815 <arg value="org.codehaus.groovy.vmplugin.v6.PluginDefaultGroovyMethods"/>
798 </java>816 </java>
799 <copy todir="target/html/groovy-jdk" file="src/tools/org/codehaus/groovy/tools/groovy.ico"/>817 <copy todir="target/html/groovy-jdk" file="src/tools/org/codehaus/groovy/tools/groovy.ico"/>
800 <copy todir="target/html/groovy-jdk" file="src/tools/org/codehaus/groovy/tools/stylesheet.css"/>818 <copy todir="target/html/groovy-jdk" file="src/tools/org/codehaus/groovy/tools/stylesheet.css"/>
@@ -806,22 +824,42 @@
806 <delete quiet="true">824 <delete quiet="true">
807 <fileset dir="." includes="**/*~"/>825 <fileset dir="." includes="**/*~"/>
808 <fileset dir="${groovyParserDirectory}" includes="Groovy*.*"/>826 <fileset dir="${groovyParserDirectory}" includes="Groovy*.*"/>
809 <fileset dir="${javaParserDirectory}" includes="JavaLexer.java,JavaRecognizer.java,JavaTokenTypes.java,JavaTokenTypes.txt,*.smap"/>827 <fileset dir="${javaParserDirectory}"
828 includes="JavaLexer.java,JavaRecognizer.java,JavaTokenTypes.java,JavaTokenTypes.txt,*.smap"/>
810 </delete>829 </delete>
811 </target>830 </target>
812831
813 <target name="deploy" depends="install,doc"832 <target name="deploy" depends="install,doc"
814 description="Deploy jars to maven repository.">833 description="Deploy jars to maven repository."/>
834
835 <target name="-deployDefault" unless="_forceServerSettings_">
815 <mavenDeploy version="${groovyVersion}" prefix="groovy"/>836 <mavenDeploy version="${groovyVersion}" prefix="groovy"/>
816 <mavenDeploy version="${groovyVersion}" prefix="groovy-all"/>837 <mavenDeploy version="${groovyVersion}" prefix="groovy-all"/>
817 </target>838 </target>
818839
840 <target name="-deployFromServer" if="_forceServerSettings_">
841 <copy tofile="target/settings.xml">
842 <fileset file="config/maven/settings.xml"/>
843 <filterset>
844 <filter token="groovy.deploy.username" value="${groovy.deploy.username}"/>
845 <filter token="groovy.deploy.password" value="${groovy.deploy.password}"/>
846 </filterset>
847 </copy>
848 <mavenDeploySettings version="${groovyVersion}" prefix="groovy" settings="target/settings.xml"/>
849 <mavenDeploySettings version="${groovyVersion}" prefix="groovy-all" settings="target/settings.xml"/>
850 <delete file="target/settings.xml"/>
851 </target>
852
819 <target name="installRepo" depends="install,doc"853 <target name="installRepo" depends="install,doc"
820 description="Deploy artifacts to local maven repository.">854 description="Deploy artifacts to local maven repository.">
821 <mavenInstallRepo version="${groovyVersion}" prefix="groovy"/>855 <mavenInstallRepo version="${groovyVersion}" prefix="groovy"/>
822 <mavenInstallRepo version="${groovyVersion}" prefix="groovy-all"/>856 <mavenInstallRepo version="${groovyVersion}" prefix="groovy-all"/>
823 </target>857 </target>
824858
859 <target name="quality" depends="install,checkstyle" description="install plus checkstyle"/>
860
861 <target name="release" depends="deploy,compileExamples" description="deploy plus compileExamples"/>
862
825 <target name="fulldist" depends="dist,compileExamples,checkstyle" description="dist plus examples plus checkstyle"/>863 <target name="fulldist" depends="dist,compileExamples,checkstyle" description="dist plus examples plus checkstyle"/>
826864
827 <target name="dist" depends="install,doc" description="Create everything needed for a distribution.">865 <target name="dist" depends="install,doc" description="Create everything needed for a distribution.">
828866
=== modified file 'config/ant/build-maven.xml'
--- config/ant/build-maven.xml 2010-06-09 11:11:04 +0000
+++ config/ant/build-maven.xml 2011-02-24 17:57:34 +0000
@@ -14,8 +14,8 @@
14Groovy community. See the NOTICE.txt file distributed with this work for additional information.14Groovy community. See the NOTICE.txt file distributed with this work for additional information.
1515
16Author : Paul King16Author : Paul King
17$Revision: 17603 $ ($LastChangedBy: paulk $)17$Revision: 20148 $ ($LastChangedBy: paulk $)
18$Date: 2009-09-11 14:06:51 +0200 (Fr, 11. Sep 2009) $18$Date: 2010-05-28 17:22:26 +0200 (Fr, 28. Mai 2010) $
19-->19-->
2020
21<project name="build-maven" default="" basedir="../.." xmlns:artifact="urn:maven-artifact-ant">21<project name="build-maven" default="" basedir="../.." xmlns:artifact="urn:maven-artifact-ant">
@@ -92,7 +92,7 @@
92 <fileset dir="${compileLibDirectory}" includes="**/*.jar"/>92 <fileset dir="${compileLibDirectory}" includes="**/*.jar"/>
93 </path>93 </path>
94 <path id="runtimePath">94 <path id="runtimePath">
95 <fileset dir="${runtimeLibDirectory}" includes="**/*.jar"/>95 <fileset dir="${runtimeLibDirectory}" includes="**/*.jar"/>
96 </path>96 </path>
97 <path id="testLibPath">97 <path id="testLibPath">
98 <fileset dir="${testLibDirectory}" includes="**/*.jar"/>98 <fileset dir="${testLibDirectory}" includes="**/*.jar"/>
@@ -103,9 +103,6 @@
103 <path id="examplesPath">103 <path id="examplesPath">
104 <fileset dir="${examplesLibDirectory}" includes="**/*.jar"/>104 <fileset dir="${examplesLibDirectory}" includes="**/*.jar"/>
105 </path>105 </path>
106 <path id="jdk14ExtrasPath">
107 <fileset dir="${extrasLibDirectory}" includes="**/*.jar"/>
108 </path>
109 </target>106 </target>
110107
111 <target name="-mavenDeployInit" depends="-mavenInit">108 <target name="-mavenDeployInit" depends="-mavenInit">
@@ -140,6 +137,19 @@
140 </sequential>137 </sequential>
141 </macrodef>138 </macrodef>
142139
140 <macrodef name="mavenDeploySettings">
141 <attribute name="version"/>
142 <attribute name="prefix"/>
143 <attribute name="settings"/>
144 <sequential>
145 <artifact:deploy file="${targetDistDirectory}/@{prefix}-@{version}.jar" settingsFile="@{settings}">
146 <pom refid="@{prefix}.pom"/>
147 <attach file="${targetDistDirectory}/@{prefix}-@{version}-sources.jar" classifier="sources"/>
148 <attach file="${targetDistDirectory}/@{prefix}-@{version}-javadoc.jar" classifier="javadoc"/>
149 </artifact:deploy>
150 </sequential>
151 </macrodef>
152
143 <macrodef name="mavenInstallRepo">153 <macrodef name="mavenInstallRepo">
144 <attribute name="version"/>154 <attribute name="version"/>
145 <attribute name="prefix"/>155 <attribute name="prefix"/>
146156
=== removed file 'config/bnd/groovy-all-jdk14.bnd'
--- config/bnd/groovy-all-jdk14.bnd 2009-05-06 14:05:59 +0000
+++ config/bnd/groovy-all-jdk14.bnd 1970-01-01 00:00:00 +0000
@@ -1,4 +0,0 @@
1version= @GROOVY_BUNDLE_VERSION@
2-nouses= true
3Export-Package= *;version=${version}
4Import-Package= *;resolution:=optional
50
=== removed file 'config/bnd/groovy-jdk14.bnd'
--- config/bnd/groovy-jdk14.bnd 2009-05-06 14:05:59 +0000
+++ config/bnd/groovy-jdk14.bnd 1970-01-01 00:00:00 +0000
@@ -1,4 +0,0 @@
1version= @GROOVY_BUNDLE_VERSION@
2-nouses= true
3Export-Package= *;version=${version}
4Import-Package= antlr, org.objectweb.asm, net.sf.retrotranslator.runtime.java.lang, *;resolution:=optional
50
=== added file 'config/checkstyle/codeHeader.txt'
--- config/checkstyle/codeHeader.txt 1970-01-01 00:00:00 +0000
+++ config/checkstyle/codeHeader.txt 2011-02-24 17:57:34 +0000
@@ -0,0 +1,15 @@
1^/\*$
2^ \* Copyright (\([cC]\) )?\d\d\d\d(-\d\d\d\d)? the original author or authors\.$
3^ \*$
4^ \* Licensed under the Apache License, Version 2\.0 \(the "License"\);$
5^ \* you may not use this file except in compliance with the License\.$
6^ \* You may obtain a copy of the License at$
7^ \*$
8^ \* http://www\.apache\.org/licenses/LICENSE-2\.0$
9^ \*$
10^ \* Unless required by applicable law or agreed to in writing, software$
11^ \* distributed under the License is distributed on an "AS IS" BASIS,$
12^ \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.$
13^ \* See the License for the specific language governing permissions and$
14^ \* limitations under the License\.$
15^ \*.*
0\ No newline at end of file16\ No newline at end of file
117
=== modified file 'config/checkstyle/config.xml'
--- config/checkstyle/config.xml 2009-10-27 15:04:33 +0000
+++ config/checkstyle/config.xml 2011-02-24 17:57:34 +0000
@@ -151,6 +151,9 @@
151 <!--</module>-->151 <!--</module>-->
152 <!-- add below in eventually for consistency -->152 <!-- add below in eventually for consistency -->
153 <!--<module name="ArrayTypeStyle"/>-->153 <!--<module name="ArrayTypeStyle"/>-->
154 <module name="RegexpHeader">
155 <property name="headerFile" value="config/checkstyle/codeHeader.txt"/>
156 </module>
154 </module>157 </module>
155 <module name="PackageHtml"/>158 <module name="PackageHtml"/>
156 <module name="au.com.redhillconsulting.simian.SimianCheck">159 <module name="au.com.redhillconsulting.simian.SimianCheck">
157160
=== modified file 'config/maven/groovy-tools.pom'
--- config/maven/groovy-tools.pom 2010-06-09 11:11:04 +0000
+++ config/maven/groovy-tools.pom 2011-02-24 17:57:34 +0000
@@ -34,7 +34,7 @@
34 <dependency>34 <dependency>
35 <groupId>net.sourceforge.cobertura</groupId>35 <groupId>net.sourceforge.cobertura</groupId>
36 <artifactId>cobertura</artifactId>36 <artifactId>cobertura</artifactId>
37 <version>1.9.3</version>37 <version>1.9.4.1</version>
38 <exclusions>38 <exclusions>
39 <exclusion>39 <exclusion>
40 <groupId>asm</groupId>40 <groupId>asm</groupId>
@@ -60,12 +60,12 @@
60 <dependency>60 <dependency>
61 <groupId>com.thoughtworks.qdox</groupId>61 <groupId>com.thoughtworks.qdox</groupId>
62 <artifactId>qdox</artifactId>62 <artifactId>qdox</artifactId>
63 <version>1.10</version>63 <version>1.12</version>
64 </dependency>64 </dependency>
65 <dependency>65 <dependency>
66 <groupId>biz.aQute</groupId>66 <groupId>biz.aQute</groupId>
67 <artifactId>bnd</artifactId>67 <artifactId>bnd</artifactId>
68 <version>0.0.379</version>68 <version>0.0.401</version>
69 </dependency>69 </dependency>
70 </dependencies>70 </dependencies>
71 <repositories>71 <repositories>
7272
=== added file 'config/maven/settings.xml'
--- config/maven/settings.xml 1970-01-01 00:00:00 +0000
+++ config/maven/settings.xml 2011-02-24 17:57:34 +0000
@@ -0,0 +1,10 @@
1<?xml version="1.0"?>
2<settings>
3 <servers>
4 <server>
5 <id>codehaus.org</id>
6 <username>@groovy.deploy.username@</username>
7 <password>@groovy.deploy.password@</password>
8 </server>
9 </servers>
10</settings>
0\ No newline at end of file11\ No newline at end of file
112
=== modified file 'debian/README.Debian'
--- debian/README.Debian 2009-08-02 23:12:29 +0000
+++ debian/README.Debian 2011-02-24 17:57:34 +0000
@@ -86,3 +86,22 @@
8686
87 -- Ludovic Claude <ludovic.claude@laposte.net> Fri, 17 Jul 2009 00:33:18 +010087 -- Ludovic Claude <ludovic.claude@laposte.net> Fri, 17 Jul 2009 00:33:18 +0100
8888
89I have used the same build.xml as before, only adjusted some of the supplied
90patches. The complete doc does fail, but javadoc is just fine.
91
92The jansi jar is needed for the build which I have installed manually.
93Groovy comes with several jars, I am not so sure which one should be
94supplied by this package or if there should be two conflicting ones
95prepared:
96
97target/dist/groovy-all-1.7.3-sources.jar
98target/dist/groovy-all.jar
99target/dist/groovy-1.7.3-javadoc.jar
100target/dist/groovy-all-1.7.3-javadoc.jar
101target/dist/groovy.jar
102target/dist/groovy-1.7.3-sources.jar
103
104Sorry of I could not do more, I am only debugging something else.
105
106 -- Steffen Moeller <moeller@debian.org> Wed, 21 Jul 2010 15:37:49 +0200
107
89108
=== modified file 'debian/changelog'
--- debian/changelog 2010-12-09 14:11:14 +0000
+++ debian/changelog 2011-02-24 17:57:34 +0000
@@ -1,17 +1,49 @@
1groovy (1.7.0-3ubuntu2) natty; urgency=low
2
3 * Updated debian/rules to include ant-nodeps to fix FTBFS (LP: #687974).
4
5 -- James Page <james.page@canonical.com> Thu, 09 Dec 2010 14:11:14 +0000
6
7groovy (1.7.0-3ubuntu1) maverick; urgency=low
8
9 * Merge from debian testing. Remaining changes:
10 - debian/control, debian/rules: (Build-)Depend on libservlet2.5-java
11 instead of libservlet2.4-java
12 - debian/control: Remove useless runtime dependency on libclassworlds-java
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: