Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
Apache Ant Source Code Files
Apache Ant Source Code Files are inside the Apache Ant source package file like apache-ant-1.10.10-src.zip. Unzip the source package file and go to the "src/main" sub-directory, you will see source code files.
Here is the list of Java source code files of the Apache Ant 1.10.10 in \Users\fyicenter\apache-ant-1.10.10\src\main:
✍: FYIcenter.com
⏎ org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.tools.ant.taskdefs.optional.ccm; import java.io.File; import java.util.Vector; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.DirectoryScanner; import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.Execute; import org.apache.tools.ant.types.Commandline; import org.apache.tools.ant.types.FileSet; /** * Class common to all check commands (checkout, checkin,checkin default task); * @ant.task ignore="true" */ public class CCMCheck extends Continuus { /** * -comment flag -- comment to attach to the file */ public static final String FLAG_COMMENT = "/comment"; /** * -task flag -- associate checkout task with task */ public static final String FLAG_TASK = "/task"; private File file = null; private String comment = null; private String task = null; // CheckStyle:VisibilityModifier OFF - bc protected Vector<FileSet> filesets = new Vector<>(); // CheckStyle:VisibilityModifier ON /** * Get the value of file. * @return value of file. */ public File getFile() { return file; } /** * Sets the path to the file that the command will operate on. * @param v Value to assign to file. */ public void setFile(File v) { log("working file " + v, Project.MSG_VERBOSE); this.file = v; } /** * Get the value of comment. * @return value of comment. */ public String getComment() { return comment; } /** * Specifies a comment. * @param v Value to assign to comment. */ public void setComment(String v) { this.comment = v; } /** * Get the value of task. * @return value of task. */ public String getTask() { return task; } /** * Specifies the task number used to check * in the file (may use 'default'). * @param v Value to assign to task. */ public void setTask(String v) { this.task = v; } /** * Adds a set of files to copy. * @param set the set of files */ public void addFileset(FileSet set) { filesets.addElement(set); } /** * Executes the task. * <p> * Builds a command line to execute ccm and then calls Exec's run method * to execute the command line. * </p> * @throws BuildException on error */ @Override public void execute() throws BuildException { if (file == null && filesets.isEmpty()) { throw new BuildException( "Specify at least one source - a file or a fileset."); } if (file != null && file.exists() && file.isDirectory()) { throw new BuildException("CCMCheck cannot be generated for directories"); } if (file != null && !filesets.isEmpty()) { throw new BuildException("Choose between file and fileset !"); } if (getFile() != null) { doit(); return; } for (FileSet fs : filesets) { final File basedir = fs.getDir(getProject()); DirectoryScanner ds = fs.getDirectoryScanner(getProject()); for (String srcFile : ds.getIncludedFiles()) { setFile(new File(basedir, srcFile)); doit(); } } } /** * check the file given by getFile(). */ private void doit() { Commandline commandLine = new Commandline(); // build the command line from what we got the format is // ccm co /t .. files // as specified in the CCM.EXE help commandLine.setExecutable(getCcmCommand()); commandLine.createArgument().setValue(getCcmAction()); checkOptions(commandLine); int result = run(commandLine); if (Execute.isFailure(result)) { throw new BuildException("Failed executing: " + commandLine, getLocation()); } } /** * Check the command line options. */ private void checkOptions(Commandline cmd) { if (getComment() != null) { cmd.createArgument().setValue(FLAG_COMMENT); cmd.createArgument().setValue(getComment()); } if (getTask() != null) { cmd.createArgument().setValue(FLAG_TASK); cmd.createArgument().setValue(getTask()); } if (getFile() != null) { cmd.createArgument().setValue(file.getAbsolutePath()); } } }
⏎ org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java
Or download all of them as a single archive file:
File name: apache-ant-1.10.10-fyi.zip File size: 2392938 bytes Release date: 2021-04-17 Download
⇐ Download Apache Ant Source Package
2021-07-10, 110327👍, 0💬
Popular Posts:
How to display XML element type information with the jaxp\TypeInfoWriter.java provided in the Apache...
How to read XML document with DTD validation from socket connections with the socket\DelayedInput.ja.. .
JDK 11 java.xml.jmod is the JMOD file for JDK 11 XML (eXtensible Markup Language) module. JDK 11 XML...
Jackson is "the Java JSON library" or "the best JSON parser for Java". Or simply as "JSON for Java"....
jlGui is a music player for the Java platform. It is based on Java Sound 1.0 (i.e. JDK 1.3+). It sup...