Apache Ant What is it? ----------- Ant is a Java based build tool. In theory it is kind of like "make" without makes wrinkles and with the full portability of pure java code. Why? ---- Why another build tool when there is already make, gnumake, nmake, jam, and others? Because all of those tools have limitations that its original author couldn't live with when developing software across multiple platforms. Make-like tools are inherently shell based. They evaluate a set of dependencies and then execute commands not unlike what you would issue on a shell. This means that you can easily extend these tools by using or writing any program for the OS that you are working on. However, this also means that you limit yourself to the OS, or at least the OS type such as Unix, that you are working on. Makefiles are inherently evil as well. Anybody who has worked on them for any time has run into the dreaded tab problem. "Is my command not executing because I have a space in front of my tab!!!" said the original author of Ant way too many times. Tools like Jam took care of this to a great degree, but still use yet another format to use and remember. Ant is different. Instead a model where it is extended with shell based commands, it is extended using Java classes. Instead of writing shell commands, the configuration files are XML based calling out a target tree where various tasks get executed. Each task is run by an object which implements a particular Task interface. Granted, this removes some of the expressive power that is inherent by being able to construct a shell command such as `find . -name foo -exec rm {}` but it gives you the ability to be cross platform. To work anywhere and everywhere. And hey, if you really need to execute a shell command, Ant has an exec rule that allows different commands to be executed based on the OS that it is executing on. The Latest Version ------------------ Details of the latest version can be found on the Apache Ant Project web site <https://ant.apache.org/>. Documentation ------------- Documentation is available in HTML format, in the manual/ directory. For information about building and installing Ant, see manual/install.html The manual for the latest release of Ant is available online at <https://ant.apache.org/manual/index.html>. The latest version of the manual is available online at <https://rawgit.com/apache/ant/master/manual/index.html>. Licensing --------- This software is licensed under the terms you may find in the file named "LICENSE" in this directory. This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See <https://www.wassenaar.org/> for more information. The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this Apache Software Foundation distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code. The following provides more details on the included cryptographic software: For the SSH family of tasks (<sshexec> and <scp>) Ant requires the JSch <http://www.jcraft.com/jsch/index.html> library as well as the Java Cryptography extensions <https://www.oracle.com/technetwork/java/javase/tech/index-jsp-136007.html>. Ant does not include these libraries itself, but is designed to use them. Thanks for using Ant. The Apache Ant Project <https://ant.apache.org/>
Apache Ant is a Java-based build tool.
Overview
Comments
-
Use newer third party libraries
The initial aim was to avoid NPE when retrieving jasper and automate retrieval of ant-antunit (with exclusion of ant/ant-launcher).
Then I started wondering whether it could be possible to forgo JUnit 3 altogether and update JUnit 4 to 4.12; if there's a good reason for keeping things the way they were, I'd be happy to add automated downloads of both versions and removal of JUnit 3 classes in JUnit 4.
Finally, jakarta regex is updated to the final version 1.4; AFACS, both versions have the same version of bytecode.
-
JUnit 5 support - A new junitlauncher task
This is the initial working version of a new
junitlauncher
task that support using JUnit 5 framework for testing, within Ant build files. The commit in this PR is the initial set of goals that I had in mind for the first release of this task.The manual for this task can be (temporarily) found at https://home.apache.org/~jaikiran/temp_workspace/manual/Tasks/junitlauncher.html
The dev list discussion about this PR can be found at https://www.mail-archive.com/[email protected]/msg46656.html
-
Send FQDN instead of simple hostname in SMTP HELO command
Some SMTP servers block messages when HELO command contains a simple hostname instead of a fully qualified domain name.
This path fixes this by using getCanonicalHostName instead of getHostName
-
Make junitreport with Saxon
Previously the XSLT(s) used in
junitreport
were only compatible with Xalan 2. Whilst you could specify a differentTransformerFactory
, and that could be Saxon, it would fail as the XSL(s) use Xalan specific extensions.This PR adds compatibility with Saxon, so that if you specify Saxon as the
TransformerFactory
, then pure XSLT2 stylesheets are used without any vendor extensions. -
Fix rare ConcurrentModificationException when running with Parallel-Ant executor.
This resolves a rare race condition when running with the Parallel-Ant executor.
This seems to be triggered concurrently when a reference was being added to the project at the same time the references were being copied through Project.getCopyOfReferences(). The stack trace observed in this case was:
java.util.ConcurrentModificationException at java.util.Hashtable$Enumerator.next(Hashtable.java:1387) at java.util.HashMap.putMapEntries(HashMap.java:512) at java.util.HashMap.<init>(HashMap.java:490) at org.apache.tools.ant.Project.getCopyOfReferences(Project.java:2038) at org.apache.tools.ant.util.ScriptRunnerBase.bindToComponent(ScriptRunnerBase.java:307) at org.apache.tools.ant.util.ScriptRunnerHelper.getScriptRunner(ScriptRunnerHelper.java:66) at org.apache.tools.ant.taskdefs.optional.Script.execute(Script.java:53) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:435) at org.apache.tools.ant.Target.performTasks(Target.java:456) at org.codeaholics.tools.build.pant.AntWrapperImpl.executeTarget(Unknown Source) at org.codeaholics.tools.build.pant.DependencyGraphEntry.run(Unknown Source) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
-
Added tasks for JDK's jmod and jlink tools.
Support for the jmod and jlink tools present in the JDK since Java 9. Now that Java 11 has no standalone JRE, officially, these tools are the only way to distribute client-side Java applications.
-
[master] Fix BZ-58451 BZ-58833
The commit here fixes the issues reported in:
https://bz.apache.org/bugzilla/show_bug.cgi?id=58833 https://bz.apache.org/bugzilla/show_bug.cgi?id=58451
The
PumpStreamHandler
and theStreamPumper
work together for redirecting the streams (reading from inputstream and writing to a outputstream). When theStreamPumper
is asked to stop, it stops reading from the input stream and goes on to finish any (non-blocking) reads and finally a (potentially blocking) flush of whatever it has read so far. ThePumpStreamHandler
, which initiates thatstop
is a bit too impatient (mainly because of its inability to know what's going on inStreamPumper
after thestop
was invoked on it) and starts interrupting theStreamPumper
's thread very soon (as early as 200 milli seconds after stop). This triggers a bunch of issues inStreamPumper
, which either is in the middle of finishing the non-blocking reads or in the middle of actually flushing out whatever it's held on to and ultimately leads to a non-clean stop and thus corrupting/truncating the output stream as noted in those issues.The commit here introduces a way, through the
PostStopHandle
, forPumpStreamHandler
to be aware that uponstop
theStreamPumper
has respected the call tostop
and is doing certain post-stop finishing acts before actually being consideredfinished
. ThePumpStreamHandler
then allows a bit of time for the post-stop tasks to finish before actually trying to kill off theStreamPumper
using thread interrupts, if theStreamPumper
didn't finish after that grace period.The commit here intentionally does not introduce a configurable "grace period" for the post-stop activities and instead using a hard coded (maximum) 2 seconds for the following reasons:
-
The 2 seconds is the maxium amount of time to let the post-stop to complete, so it's not always going to wait that long
-
The cleaning up gracefully is an internal implementation detail and doesn't have to end up being configured by the user.
-
Finally, the
PumpStreamHandler
anyway falls back to the thread interrupts if the post-stop (flush() etc...) doesn't complete in those 2 seconds. So from a end user point of view, there isn't really any behaviour change, except that we now give theStreamPumper
a chance to gracefully stop.
This PR is against master branch. If this is approved I'll backport it to 1.9.x branch too.
-
-
[master] Changes for BZ-19516
As suggested in https://bz.apache.org/bugzilla/show_bug.cgi?id=19516, the change in this PR uses
java.io.BufferedInputStream
which can take an underlyingInputStream
and providemark
support on the input stream. This should prevent loading a large amount of data into memory, in certain cases, in theZip
task.If this PR is approved, I'll then backport this pretty straightforward change to 1.9.x branch too.
-
support to access local properties via propertyset
The fix here is to honor the local variables in propertyset within the local scope. Below is the bug related to the fix.
Bug 50179 - Properties declared as "local" are not accessible via propertyset.
-
Use commandline argument file for all options, but -J, for case javac…
Currently only java files are passed using commandline argument file for javac. There are times when classpath is longer than 8000 characters. on unix that works, but on windows it doesn't, see https://support.microsoft.com/en-us/help/830473/command-prompt-cmd-exe-command-line-string-limitation. That leads to exception like
at org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile(DefaultCompilerAdapter.java:601) at org.apache.tools.ant.taskdefs.compilers.JavacExternal.execute(JavacExternal.java:62) at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1395) at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:1121) ... Caused by: java.io.IOException: Cannot run program "c:\...\javac.exe" (in directory "..."): CreateProcess error=206, The filename or extension is too long at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at java.lang.Runtime.exec(Runtime.java:620) at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:58) at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:426) at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:440) at org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile(DefaultCompilerAdapter.java:598) ... 33 more Caused by: java.io.IOException: CreateProcess error=206, The filename or extension is too long at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.<init>(ProcessImpl.java:386) at java.lang.ProcessImpl.start(ProcessImpl.java:137) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 38 more
This pull requests puts all but -J options into commandline argument file. -J options can't be specified in commandline argument file as per documentation: https://docs.oracle.com/en/java/javase/11/tools/javac.html
-
JDK9 modules support for JUnitTask
Changes:
- Added modulepath and upgrademodulepath elements.
- When modulepath or upgrademodulepath is given VM fork is required.
- JUnit library required by Ant is searched both on classpath and modulepath.
As seen in JUnitTask + JDK9 question thread there are many ways how to write and execute unit test in the JDK9 involving several java options (
-addmods
,-Xpatch
,-XaddExports
,-XaddReads
).The JunitTask can
- Keep the responsibility on user to correctly specify these options. The disadvantage of these solution is the complexity of VM options.
- Automatically add the VM options. The disadvantage of these solution is that it’s impossible to cover all scenarios and there needs to be a way how to disable it. Also the options may change in time, for example if junit becomes a named module.
Currently the patch contains the 1st. solution. Thanks for comments!
-
Bump commons-net from 3.8.0 to 3.9.0 in /src/etc/poms/ant-commons-net
Bumps commons-net from 3.8.0 to 3.9.0.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)@dependabot use these labels
will set the current labels as the default for future PRs for this repo and language@dependabot use these reviewers
will set the current reviewers as the default for future PRs for this repo and language@dependabot use these assignees
will set the current assignees as the default for future PRs for this repo and language@dependabot use this milestone
will set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the Security Alerts page.
-
Add a Log4j2 build listener
This PR adds a Log4j2 build listener as a modern alternative to the obsolete Log4j 1.x listener.
The Log4j2 listener differs in some choices from the Log4j counterpart. Most notably:
- the name of the loggers follows the pattern
project_name.target_name.task_name
, - the class name of the Java object that performs the logging is recorded in the
className
property of the location info (%C
in the pattern layout of Log4j2 Core), - the name of the build file and the current line number are recorded in the corresponding properties of the location info (
%F
and%L
), VERBOSE
is not mapped toDEBUG
, but a custom level is used.
The Log4j2 listener can be used as
BuildLogger
, but the level change feature works only if the underlying Log4j2 API implementation is Log4j2 Core. - the name of the loggers follows the pattern
-
Bump xercesImpl from 2.12.0 to 2.12.2 in /src/etc/poms/ant
Bumps xercesImpl from 2.12.0 to 2.12.2.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)@dependabot use these labels
will set the current labels as the default for future PRs for this repo and language@dependabot use these reviewers
will set the current reviewers as the default for future PRs for this repo and language@dependabot use these assignees
will set the current assignees as the default for future PRs for this repo and language@dependabot use this milestone
will set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the Security Alerts page.
-
Bump xercesImpl from 2.12.0 to 2.12.2 in /src/etc/poms/ant-junit
Bumps xercesImpl from 2.12.0 to 2.12.2.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)@dependabot use these labels
will set the current labels as the default for future PRs for this repo and language@dependabot use these reviewers
will set the current reviewers as the default for future PRs for this repo and language@dependabot use these assignees
will set the current assignees as the default for future PRs for this repo and language@dependabot use this milestone
will set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the Security Alerts page.
-
junitlauncher - Added fork mode support
Context
I'm working on migration of Cassandra to JUnit5 (https://issues.apache.org/jira/browse/CASSANDRA-16630). Our test running code is heavily customized and relies onto forkMode property. Unfortunately, junitlauncher task does not have any equivalent. The purpose of this change is to introduce a way to run tests independently (in separate JVMs).
Behavior
This PR does not change any existing behavior. By default, the tests will be run in the same forked JVM (aka mode="once").
Summary of the changes
- Added
node
attribute tofork
element - Added logic to spin a JVM per test suite class into
JUnitLauncherTask
- Updated tests and documentation
I'm not sure
JUnitLauncherTaskTest
is run during./build clean test
, hence the test might be broken. - Added
A tool based on mysql-connector to simplify the use of databases, tables & columns
Description A tool based on mysql-connector to simplify the use of databases, tables & columns. This tool automatically creates the databases & tables
Hi, Spring fans! In this installment, we'll look at how to build tenancy-aware JDBC applications
Multitenant JDBC You'll need to spin up two separate PostgreSQL instances. Put this script into a file called postgres.sh: #!/usr/bin/env bash NAME=${
The Chronix Server implementation that is based on Apache Solr.
Chronix Server The Chronix Server is an implementation of the Chronix API that stores time series in Apache Solr. Chronix uses several techniques to o
HasorDB is a Full-featured database access tool, Providing object mapping,Richer type handling than Mybatis, Dynamic SQL
HasorDB is a Full-featured database access tool, Providing object mapping,Richer type handling than Mybatis, Dynamic SQL, stored procedures, more dialect 20+, nested transactions, multiple data sources, conditional constructors, INSERT strategies, multiple statements/multiple results. And compatible with Spring and MyBatis usage.
Free universal database tool and SQL client
DBeaver Free multi-platform database tool for developers, SQL programmers, database administrators and analysts. Supports any database which has JDBC
Database Subsetting and Relational Data Browsing Tool.
Jailer Database Tool Jailer is a tool for database subsetting and relational data browsing. The Subsetter exports consistent, referentially intact row
Apache Calcite
Apache Calcite Apache Calcite is a dynamic data management framework. It contains many of the pieces that comprise a typical database management syste
Apache Druid: a high performance real-time analytics database.
Website | Documentation | Developer Mailing List | User Mailing List | Slack | Twitter | Download Apache Druid Druid is a high performance real-time a
Apache Hive
Apache Hive (TM) The Apache Hive (TM) data warehouse software facilitates reading, writing, and managing large datasets residing in distributed storag
OrientDB is the most versatile DBMS supporting Graph, Document, Reactive, Full-Text, Geospatial and Key-Value models in one Multi-Model product. OrientDB can run distributed (Multi-Master), supports SQL, ACID Transactions, Full-Text indexing and Reactive Queries. OrientDB Community Edition is Open Source using a liberal Apache 2 license.
OrientDB | Develop branch: | 2.2.x branch: | Chat with the community: What is OrientDB? OrientDB is an Open Source Multi-Model NoSQL DBMS with the sup
Apache Pinot - A realtime distributed OLAP datastore
What is Apache Pinot? Features When should I use Pinot? Building Pinot Deploying Pinot to Kubernetes Join the Community Documentation License What is
Apache Aurora - A Mesos framework for long-running services, cron jobs, and ad-hoc jobs
NOTE: The Apache Aurora project has been moved into the Apache Attic. A fork led by members of the former Project Management Committee (PMC) can be fo
Apache Drill is a distributed MPP query layer for self describing data
Apache Drill Apache Drill is a distributed MPP query layer that supports SQL and alternative query languages against NoSQL and Hadoop data storage sys
Flink Connector for Apache Doris(incubating)
Flink Connector for Apache Doris (incubating) Flink Doris Connector More information about compilation and usage, please visit Flink Doris Connector L
HurricaneDB a real-time distributed OLAP engine, powered by Apache Pinot
HurricaneDB is a real-time distributed OLAP datastore, built to deliver scalable real-time analytics with low latency. It can ingest from batch data sources (such as Hadoop HDFS, Amazon S3, Azure ADLS, Google Cloud Storage) as well as stream data sources (such as Apache Kafka).
Redisson - Redis Java client with features of In-Memory Data Grid. Over 50 Redis based Java objects and services: Set, Multimap, SortedSet, Map, List, Queue, Deque, Semaphore, Lock, AtomicLong, Map Reduce, Publish / Subscribe, Bloom filter, Spring Cache, Tomcat, Scheduler, JCache API, Hibernate, MyBatis, RPC, local cache ...
Redisson - Redis Java client with features of In-Memory Data Grid Quick start | Documentation | Javadocs | Changelog | Code examples | FAQs | Report a
requery - modern SQL based query & persistence for Java / Kotlin / Android
A light but powerful object mapping and SQL generator for Java/Kotlin/Android with RxJava and Java 8 support. Easily map to or create databases, perfo
A Java library designed to make making decisions based on the current operating system easier.
Java OS Independence ...or JOSI for short, is a simple and lightweight Java library designed to make making decisions based on the current operating s
Time Series Metrics Engine based on Cassandra
Hawkular Metrics, a storage engine for metric data About Hawkular Metrics is the metric data storage engine part of Hawkular community. It relies on A