The Apache Ant team currently maintains two lines of development. The 1. Both lines are based off of Ant 1. We recommend using 1. Apache AntUnit 1. This release fixes the antlib. This means that all its resources are removed or made read only and no further development will be done.
Deploy to Azure. Deploy to Google Kubernetes Engine. Containerized services. About service containers. PostgreSQL service containers. Redis service containers. Publishing packages. Packaging with GitHub Actions. Publishing Docker images. Java packages with Gradle.
Java packages with Maven. Managing issues and pull requests. Actions for project management. Adding labels to issues. Closing inactive issues. Add label to comment on issue. Move assigned issues. Remove label when adding card. Scheduling issue creation. Migrating to GitHub Actions. Migrate from Azure Pipelines.
Migrate from CircleCI. Migrate from Jenkins. Migrate from Travis CI. About monitoring and troubleshooting. Use the visualization graph. Add a status badge. View workflow run history. Using workflow run logs. Enabling debug logging. Hosting your own runners. About self-hosted runners.
You can extend your CI workflow to upload artifacts from a workflow run. We recommend that you have a basic understanding of Java and the Ant framework. For more information, see the Apache Ant Manual. GitHub provides an Ant starter workflow that will work for most Ant-based Java projects. For more information, see the Ant starter workflow. To get started quickly, you can choose the preconfigured Ant starter workflow when you create a new workflow.
For more information, see the " GitHub Actions quickstart. You can also add this workflow manually by creating a new file in the. The starter workflow configures jobs to run on Linux, using the GitHub-hosted ubuntu-latest runners. You can change the runs-on key to run your jobs on a different operating system. For example, you can use the GitHub-hosted Windows runners. You can also run jobs in Docker containers, or you can provide a self-hosted runner that runs on your own infrastructure.
For more information, see " Workflow syntax for GitHub Actions. If you want to use a different version of Java, or target a different architecture x64 or x86 , you can use the setup-java action to choose a different Java runtime environment. For example, to use version 11 of the JDK provided by Adoptium for the x64 platform, you can use the setup-java action and configure the java-version , distribution and architecture parameters to '11' , 'adopt' and x For more information, see the setup-java action.
The starter workflow will run the default target specified in your build. Your default target will commonly be set to build classes, run tests and package classes into their distributable format, for example, a JAR file. If you use different commands to build your project, or you want to run a different target, you can specify those. For example, you may want to run the jar target that's configured in your build-ci. After your build has succeeded and your tests have passed, you may want to upload the resulting Java packages as a build artifact.
This will store the built packages as part of the workflow run, and allow you to download them. Artifacts can help you test and debug pull requests in your local environment before they're merged. For more information, see " Persisting workflow data using artifacts.
You can upload the contents of that directory using the upload-artifact action. All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request. Or, learn how to contribute. GitHub Docs.
Learn GitHub Actions. Understanding GitHub Actions. Finding and customizing actions. Essential features. Managing complex workflows. You can only build a distributable when you have compiled first, so the distribute target depends on the compile target. Ant resolves these dependencies.
It should be noted, however, that Ant's depends attribute only specifies the order in which targets should be executed—it does not affect whether the target that specifies the dependency s gets executed if the dependent target s did not need to run.
A task can have multiple attributes or arguments, if you prefer. The value of an attribute might contain references to a property. These references will be resolved before the task is executed. There is a set of built-in tasks , but it is also very easy to write your own. All tasks can have a name attribute.
The value of this attribute will be used in the logging messages generated by Ant. You can refer to the corresponding task object in scripts or other tasks via this name. For example, in scripts you could do:. In another task written in Java , you can access the instance via project. Note 1: If task1 has not been run yet, then it has not been configured ie.
Note 2: Future versions of Ant will most likely not be backward-compatible with this behaviour, since there will likely be no task instances at all, only proxies. Properties are an important way to customize a build process or to just provide shortcuts for strings that are used repeatedly inside a buildfile.
In its most simple form properties are defined in the buildfile for example by the property task or might be set outside Ant. A property has a name and a value; the name is case-sensitive. Properties may be used in the value of task attributes or in the nested text of tasks that support them.
0コメント