This is an automated email from the ASF dual-hosted git repository. aw pushed a commit to branch YETUS-1034-release in repository https://gitbox.apache.org/repos/asf/yetus.git
commit af2efc19d4b773940a00003a9f2ce267aff04fe4 Author: Allen Wittenauer <[email protected]> AuthorDate: Thu Oct 29 07:13:52 2020 -0700 YETUS-1047. Replace yetus-minimaven-plugin with yetus-maven-plugin (#175) --- asf-site-src/pom.xml | 2 +- pom.xml | 4 +- precommit/pom.xml | 2 +- shelldocs/pom.xml | 2 +- yetus-dist/pom.xml | 2 +- yetus-maven-plugin/pom.xml | 55 --------- .../src/main/assemblies/yetus-maven-plugin.xml | 44 ------- .../maven/plugin/fileops/CreateSymLinkMojo.java | 0 .../yetus/maven/plugin/fileops/MakeBins4Libs.java | 0 .../org/apache/yetus/maven/plugin/utils/Utils.java | 137 --------------------- .../yetus/maven/plugin/utils/package-info.java | 22 ---- .../src/main/resources/licenses/ASL20.txt | 0 yetus-minimaven-plugin/pom.xml | 88 ------------- .../yetus/maven/plugin/fileops/package-info.java | 22 ---- 14 files changed, 5 insertions(+), 375 deletions(-) diff --git a/asf-site-src/pom.xml b/asf-site-src/pom.xml index 9b8dd90..fad41d9 100644 --- a/asf-site-src/pom.xml +++ b/asf-site-src/pom.xml @@ -42,7 +42,7 @@ <plugins> <plugin> <groupId>org.apache.yetus</groupId> - <artifactId>yetus-minimaven-plugin</artifactId> + <artifactId>yetus-maven-plugin</artifactId> <version>${project.version}</version> <executions> <!-- AUTOMATED_EDIT_BEGIN --> diff --git a/pom.xml b/pom.xml index a393054..da19571 100644 --- a/pom.xml +++ b/pom.xml @@ -64,7 +64,6 @@ <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> - <build-helper-maven-plugin.version>3.2.0</build-helper-maven-plugin.version> <checkstyle.version>8.36</checkstyle.version> <commons.io.version>2.6</commons.io.version> <exec-maven-plugin.version>3.0.0</exec-maven-plugin.version> @@ -322,15 +321,14 @@ </reporting> <modules> - <module>yetus-minimaven-plugin</module> <module>yetus-assemblies</module> <module>audience-annotations-component</module> + <module>yetus-maven-plugin</module> <module>precommit</module> <module>releasedocmaker</module> <module>shelldocs</module> <module>asf-site-src</module> <module>yetus-dist</module> - <module>yetus-maven-plugin</module> </modules> </project> diff --git a/precommit/pom.xml b/precommit/pom.xml index e612ab4..b4e96d0 100644 --- a/precommit/pom.xml +++ b/precommit/pom.xml @@ -116,7 +116,7 @@ <plugin> <groupId>org.apache.yetus</groupId> - <artifactId>yetus-minimaven-plugin</artifactId> + <artifactId>yetus-maven-plugin</artifactId> <version>${project.version}</version> <executions> <execution> diff --git a/shelldocs/pom.xml b/shelldocs/pom.xml index c44741d..e0b5654 100644 --- a/shelldocs/pom.xml +++ b/shelldocs/pom.xml @@ -91,7 +91,7 @@ <plugin> <groupId>org.apache.yetus</groupId> - <artifactId>yetus-minimaven-plugin</artifactId> + <artifactId>yetus-maven-plugin</artifactId> <version>${project.version}</version> <executions> <execution> diff --git a/yetus-dist/pom.xml b/yetus-dist/pom.xml index d01fb4c..a48c62a 100644 --- a/yetus-dist/pom.xml +++ b/yetus-dist/pom.xml @@ -62,7 +62,7 @@ </dependency> <dependency> <groupId>org.apache.yetus</groupId> - <artifactId>yetus-minimaven-plugin</artifactId> + <artifactId>yetus-maven-plugin</artifactId> <version>${project.version}</version> </dependency> </dependencies> diff --git a/yetus-maven-plugin/pom.xml b/yetus-maven-plugin/pom.xml index f3e2e47..68869fa 100644 --- a/yetus-maven-plugin/pom.xml +++ b/yetus-maven-plugin/pom.xml @@ -61,61 +61,6 @@ <build> <plugins> <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>${build-helper-maven-plugin.version}</version> - <executions> - <execution> - <id>add-source</id> - <phase>generate-sources</phase> - <goals> - <goal>add-source</goal> - </goals> - <configuration> - <sources> - <source>../yetus-minimaven-plugin/src/main/resources</source> - <source>../yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops</source> - </sources> - </configuration> - </execution> - <execution> - <id>add-resource</id> - <phase>generate-resources</phase> - <goals> - <goal>add-resource</goal> - </goals> - <configuration> - <resources> - <resource> - <directory>../yetus-minimaven-plugin/src/main/resources</directory> - </resource> - </resources> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <executions> - <execution> - <id>create-internal-zip</id> - <phase>prepare-package</phase> - <goals> - <goal>single</goal> - </goals> - <configuration> - <finalName>classes/yetus-bin</finalName> - <appendAssemblyId>false</appendAssemblyId> - <attach>false</attach> - <descriptors> - <descriptor>src/main/assemblies/yetus-maven-plugin.xml</descriptor> - </descriptors> - </configuration> - </execution> - </executions> - </plugin> - <plugin> <artifactId>maven-compiler-plugin</artifactId> </plugin> <plugin> diff --git a/yetus-maven-plugin/src/main/assemblies/yetus-maven-plugin.xml b/yetus-maven-plugin/src/main/assemblies/yetus-maven-plugin.xml deleted file mode 100644 index a67a7be..0000000 --- a/yetus-maven-plugin/src/main/assemblies/yetus-maven-plugin.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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 - - http://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. ---> -<assembly xmlns="https://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3" - xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="https://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 https://maven.apache.org/xsd/assembly-1.1.3.xsd"> - <id>yetus-maven-plugin</id> - <formats> - <format>zip</format> - </formats> - <includeBaseDirectory>false</includeBaseDirectory> - <fileSets> - <fileSet> - <directory>${project.build.directory}/../../releasedocmaker/target/dist/apache-yetus-${project.version}</directory> - <outputDirectory>.</outputDirectory> - <includes> - <include>**</include> - </includes> - </fileSet> - <fileSet> - <directory>${project.build.directory}/../../shelldocs/target/dist/apache-yetus-${project.version}</directory> - <outputDirectory>.</outputDirectory> - <includes> - <include>**</include> - </includes> - </fileSet> - </fileSets> -</assembly> \ No newline at end of file diff --git a/yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/CreateSymLinkMojo.java b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/CreateSymLinkMojo.java similarity index 100% rename from yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/CreateSymLinkMojo.java rename to yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/CreateSymLinkMojo.java diff --git a/yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/MakeBins4Libs.java b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/MakeBins4Libs.java similarity index 100% rename from yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/MakeBins4Libs.java rename to yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/MakeBins4Libs.java diff --git a/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/utils/Utils.java b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/utils/Utils.java deleted file mode 100644 index 651d6c3..0000000 --- a/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/utils/Utils.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Licensed 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 - * - * http://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.yetus.maven.plugin.utils; - -import java.io.IOException; -import java.io.OutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.util.Arrays; -import java.util.List; -import java.util.LinkedList; -import java.util.zip.ZipEntry; -import java.util.zip.ZipInputStream; - - -import org.apache.yetus.audience.InterfaceAudience; -import org.apache.yetus.audience.InterfaceStability; - - -/** - * Random utilities for running Yetus components. - */ [email protected] [email protected] -public final class Utils { - - /** - * Buffer size used while zipping and unzipping zip-ed archives. - */ - private static final int BUFFER_SIZE = 8192; - - - /** - * InputStream from the classpath that has our archive. - */ - private ZipInputStream zipFile; - - /** - * extracted dir+bin. - */ - private File binDir; - - - /** - * Constructor for generic utilities. - */ - @InterfaceAudience.Private - @InterfaceStability.Evolving - public Utils() { - this.zipFile = new ZipInputStream(this.getClass() - .getClassLoader() - .getResourceAsStream("yetus-bin.zip")); - } - - /** - * Execute the yetus command with the given parameters. - * @param cmd command to execute - * @param args to that command - * @throws IOException an error occurred - * @throws InterruptedException an error occurred - * @return int process return code - */ - @InterfaceAudience.Private - @InterfaceStability.Evolving - public int execCmd(final String cmd, final String... args) - throws IOException, InterruptedException { - File cmdFile = new File(binDir, cmd); - String realCmd = cmdFile.toString(); - - String[] params = args; - - List<String> list = new LinkedList<String>(Arrays.asList(args)); - list.add(0, realCmd); - params = list.toArray(new String[list.size()]); - - ProcessBuilder pb = new ProcessBuilder(params); - pb.inheritIO(); - Process p = pb.start(); - return p.waitFor(); - } - - /** - * Extract the yetus-bin file in the dest directory. - * @param destDir The unzip directory where to extractthe file. - * @throws IOException an error occurred - */ - @InterfaceAudience.Private - @InterfaceStability.Evolving - public void extractYetus(final File destDir) throws IOException { - this.binDir = new File(destDir, "bin"); - - if (binDir.isDirectory()) { - return; - } - try { - ZipEntry entry; - while ((entry = zipFile.getNextEntry()) != null) { - if (!entry.isDirectory()) { - File file = new File(destDir, entry.getName()); - if (!file.getParentFile().mkdirs()) { - if (!file.getParentFile().isDirectory()) { - throw new IOException("Mkdirs failed to create " - + file.getParentFile().toString()); - } - } - OutputStream out = new FileOutputStream(file); - try { - byte[] buffer = new byte[BUFFER_SIZE]; - int i; - while ((i = zipFile.read(buffer)) != -1) { - out.write(buffer, 0, i); - } - } finally { - out.close(); - } - file.setExecutable(true); - file.setReadable(true); - file.setWritable(true); - } - } - } finally { - zipFile.close(); - } - } - -} diff --git a/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/utils/package-info.java b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/utils/package-info.java deleted file mode 100644 index 8e04ace..0000000 --- a/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/utils/package-info.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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 - * - * http://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. - */ - -/** - * Utilities for running Yetus. - */ -package org.apache.yetus.maven.plugin.utils; diff --git a/yetus-minimaven-plugin/src/main/resources/licenses/ASL20.txt b/yetus-maven-plugin/src/main/resources/licenses/ASL20.txt similarity index 100% rename from yetus-minimaven-plugin/src/main/resources/licenses/ASL20.txt rename to yetus-maven-plugin/src/main/resources/licenses/ASL20.txt diff --git a/yetus-minimaven-plugin/pom.xml b/yetus-minimaven-plugin/pom.xml deleted file mode 100644 index a753664..0000000 --- a/yetus-minimaven-plugin/pom.xml +++ /dev/null @@ -1,88 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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 - - http://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. ---> -<project xmlns="https://maven.apache.org/POM/4.0.0" - xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 - https://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.yetus</groupId> - <artifactId>yetus-project</artifactId> - <version>0.13.0</version> - <relativePath>..</relativePath> - </parent> - <groupId>org.apache.yetus</groupId> - <artifactId>yetus-minimaven-plugin</artifactId> - <description>Apache Yetus Maven Build Tools</description> - <name>Apache Yetus - MiniMaven Plugin</name> - <packaging>maven-plugin</packaging> - - <dependencies> - <dependency> - <groupId>org.apache.maven</groupId> - <artifactId>maven-plugin-api</artifactId> - <version>${maven.plugin.api.version}</version> - </dependency> - <dependency> - <groupId>commons-io</groupId> - <artifactId>commons-io</artifactId> - <version>${commons.io.version}</version> - </dependency> - <dependency> - <groupId>org.apache.maven.plugin-tools</groupId> - <artifactId>maven-plugin-annotations</artifactId> - <version>${maven.api.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.yetus</groupId> - <artifactId>audience-annotations</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <artifactId>maven-compiler-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-plugin-plugin</artifactId> - <version>${maven.api.version}</version> - <executions> - <execution> - <id>default-descriptor</id> - <phase>compile</phase> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-deploy-plugin</artifactId> - <configuration> - <skip>true</skip> - </configuration> - </plugin> - - </plugins> - </build> - -</project> diff --git a/yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/package-info.java b/yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/package-info.java deleted file mode 100644 index b473904..0000000 --- a/yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/package-info.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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 - * - * http://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. - */ - -/** - * Mini-maven just has the bits necessary to build Apache Yetus. - */ -package org.apache.yetus.maven.plugin.fileops;
