[Git][java-team/plexus-interactivity-api][upstream] New upstream version 1.1
Emmanuel Bourg (@ebourg)
gitlab at salsa.debian.org
Wed May 4 01:15:50 BST 2022
Emmanuel Bourg pushed to branch upstream at Debian Java Maintainers / plexus-interactivity-api
Commits:
1fc3423d by Emmanuel Bourg at 2022-05-04T01:54:03+02:00
New upstream version 1.1
- - - - -
20 changed files:
- + .github/workflows/codeql-analysis.yml
- + .gitignore
- + README.md
- + plexus-interactivity-api/pom.xml
- src/main/java/org/codehaus/plexus/components/interactivity/AbstractInputHandler.java → plexus-interactivity-api/src/main/java/org/codehaus/plexus/components/interactivity/AbstractInputHandler.java
- src/main/java/org/codehaus/plexus/components/interactivity/DefaultInputHandler.java → plexus-interactivity-api/src/main/java/org/codehaus/plexus/components/interactivity/DefaultInputHandler.java
- src/main/java/org/codehaus/plexus/components/interactivity/DefaultOutputHandler.java → plexus-interactivity-api/src/main/java/org/codehaus/plexus/components/interactivity/DefaultOutputHandler.java
- src/main/java/org/codehaus/plexus/components/interactivity/DefaultPrompter.java → plexus-interactivity-api/src/main/java/org/codehaus/plexus/components/interactivity/DefaultPrompter.java
- src/main/java/org/codehaus/plexus/components/interactivity/InputHandler.java → plexus-interactivity-api/src/main/java/org/codehaus/plexus/components/interactivity/InputHandler.java
- src/main/java/org/codehaus/plexus/components/interactivity/OutputHandler.java → plexus-interactivity-api/src/main/java/org/codehaus/plexus/components/interactivity/OutputHandler.java
- src/main/java/org/codehaus/plexus/components/interactivity/Prompter.java → plexus-interactivity-api/src/main/java/org/codehaus/plexus/components/interactivity/Prompter.java
- src/main/java/org/codehaus/plexus/components/interactivity/PrompterException.java → plexus-interactivity-api/src/main/java/org/codehaus/plexus/components/interactivity/PrompterException.java
- src/main/resources/META-INF/plexus/components.xml → plexus-interactivity-api/src/main/resources/META-INF/plexus/components.xml
- + plexus-interactivity-api/src/site/site.xml
- + plexus-interactivity-jline/pom.xml
- + plexus-interactivity-jline/src/main/java/org/codehaus/plexus/components/interactivity/jline/JLineInputHandler.java
- + plexus-interactivity-jline/src/main/resources/META-INF/plexus/components.xml
- + plexus-interactivity-jline/src/site/site.xml
- pom.xml
- + src/site/site.xml
Changes:
=====================================
.github/workflows/codeql-analysis.yml
=====================================
@@ -0,0 +1,67 @@
+# For most projects, this workflow file will not need changing; you simply need
+# to commit it to your repository.
+#
+# You may wish to alter this file to override the set of languages analyzed,
+# or to provide custom queries or build logic.
+#
+# ******** NOTE ********
+# We have attempted to detect the languages in your repository. Please check
+# the `language` matrix defined below to confirm you have the correct set of
+# supported CodeQL languages.
+#
+name: "CodeQL"
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ # The branches below must be a subset of the branches above
+ branches: [ master ]
+ schedule:
+ - cron: '33 3 * * 1'
+
+jobs:
+ analyze:
+ name: Analyze
+ runs-on: ubuntu-latest
+
+ strategy:
+ fail-fast: false
+ matrix:
+ language: [ 'java' ]
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
+ # Learn more:
+ # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout at v2
+
+ # Initializes the CodeQL tools for scanning.
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init at v1
+ with:
+ languages: ${{ matrix.language }}
+ # If you wish to specify custom queries, you can do so here or in a config file.
+ # By default, queries listed here will override any specified in a config file.
+ # Prefix the list here with "+" to use these queries and those in the config file.
+ # queries: ./path/to/local/query, your-org/your-repo/queries at main
+
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
+ # If this step fails, then you should remove it and run the build manually (see below)
+ - name: Autobuild
+ uses: github/codeql-action/autobuild at v1
+
+ # ℹ️ Command-line programs to run using the OS shell..
+ # 📚 https://git.io/JvXDl
+
+ # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
+ # and modify them (or add more) to build your code if your project
+ # uses a compiled language
+
+ #- run: |
+ # make bootstrap
+ # make release
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze at v1
=====================================
.gitignore
=====================================
@@ -0,0 +1,7 @@
+target/
+.project
+.classpath
+.settings/
+bin
+*.iml
+.idea
=====================================
README.md
=====================================
@@ -0,0 +1,8 @@
+Plexus-Interactivity
+===============
+
+[![Apache License, Version 2.0, January 2004](https://img.shields.io/github/license/codehaus-plexus/plexus-interactivity.svg?label=License)](http://www.apache.org/licenses/)
+[![Maven Central](https://img.shields.io/maven-central/v/org.codehaus.plexus/plexus-interactivity.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.codehaus.plexus/plexus-interactivity)
+[![Build Status](https://travis-ci.org/codehaus-plexus/plexus-interactivity.svg?branch=master)](https://travis-ci.org/codehaus-plexus/plexus-interactivity)
+
+The canonical git repository is located at https://github.com/codehaus-plexus/plexus-interactivity
=====================================
plexus-interactivity-api/pom.xml
=====================================
@@ -0,0 +1,24 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>plexus-interactivity</artifactId>
+ <groupId>org.codehaus.plexus</groupId>
+ <version>1.1</version>
+ </parent>
+
+ <artifactId>plexus-interactivity-api</artifactId>
+
+ <name>Plexus Default Interactivity Handler</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </dependency>
+ </dependencies>
+</project>
=====================================
src/main/java/org/codehaus/plexus/components/interactivity/AbstractInputHandler.java → plexus-interactivity-api/src/main/java/org/codehaus/plexus/components/interactivity/AbstractInputHandler.java
=====================================
@@ -34,7 +34,7 @@ import java.io.IOException;
* Base input handler, implements a default <code>readMultipleLines</code>.
*
* @author Brett Porter
- * @version $Id: AbstractInputHandler.java 2649 2005-10-10 16:51:51Z brett $
+ * @version $Id$
*/
public abstract class AbstractInputHandler
extends AbstractLogEnabled
=====================================
src/main/java/org/codehaus/plexus/components/interactivity/DefaultInputHandler.java → plexus-interactivity-api/src/main/java/org/codehaus/plexus/components/interactivity/DefaultInputHandler.java
=====================================
@@ -26,8 +26,6 @@ package org.codehaus.plexus.components.interactivity;
import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable;
-import org.codehaus.plexus.components.interactivity.AbstractInputHandler;
import java.io.BufferedReader;
import java.io.IOException;
@@ -37,11 +35,11 @@ import java.io.InputStreamReader;
* Default input handler, that uses the console.
*
* @author Brett Porter
- * @version $Id: DefaultInputHandler.java 2649 2005-10-10 16:51:51Z brett $
+ * @version $Id$
*/
public class DefaultInputHandler
extends AbstractInputHandler
- implements Initializable, Disposable
+ implements Initializable
{
private BufferedReader consoleReader;
@@ -62,16 +60,4 @@ public class DefaultInputHandler
{
consoleReader = new BufferedReader( new InputStreamReader( System.in ) );
}
-
- public void dispose()
- {
- try
- {
- consoleReader.close();
- }
- catch ( IOException e )
- {
- getLogger().error( "Error closing input stream must be ignored", e );
- }
- }
}
=====================================
src/main/java/org/codehaus/plexus/components/interactivity/DefaultOutputHandler.java → plexus-interactivity-api/src/main/java/org/codehaus/plexus/components/interactivity/DefaultOutputHandler.java
=====================================
@@ -35,10 +35,10 @@ import java.io.PrintWriter;
* Default output handler, that uses the console.
*
* @author Brett Porter
- * @version $Id: DefaultOutputHandler.java 2648 2005-10-10 16:41:24Z brett $
+ * @version $Id$
*/
public class DefaultOutputHandler
- implements Initializable, Disposable, OutputHandler
+ implements Initializable, OutputHandler
{
private PrintWriter consoleWriter;
@@ -48,11 +48,6 @@ public class DefaultOutputHandler
consoleWriter = new PrintWriter( System.out );
}
- public void dispose()
- {
- consoleWriter.close();
- }
-
public void write( String line )
throws IOException
{
=====================================
src/main/java/org/codehaus/plexus/components/interactivity/DefaultPrompter.java → plexus-interactivity-api/src/main/java/org/codehaus/plexus/components/interactivity/DefaultPrompter.java
=====================================
@@ -34,7 +34,7 @@ import java.util.List;
* Default prompter.
*
* @author Brett Porter
- * @version $Id: DefaultPrompter.java 2649 2005-10-10 16:51:51Z brett $
+ * @version $Id$
*/
public class DefaultPrompter
implements Prompter
@@ -121,6 +121,9 @@ public class DefaultPrompter
try
{
line = inputHandler.readLine();
+ if (line == null && defaultReply == null) {
+ throw new IOException("EOF");
+ }
}
catch ( IOException e )
{
=====================================
src/main/java/org/codehaus/plexus/components/interactivity/InputHandler.java → plexus-interactivity-api/src/main/java/org/codehaus/plexus/components/interactivity/InputHandler.java
=====================================
@@ -34,7 +34,7 @@ import java.io.IOException;
* @todo should this validate the input, reprompt if required?
* @todo readBoolean, readInt, readSingleChar - readLine's that parse the input
* @author <a href="mailto:brett at apache.org">Brett Porter</a>
- * @version $Id: InputHandler.java 2649 2005-10-10 16:51:51Z brett $
+ * @version $Id$
*/
public interface InputHandler
{
=====================================
src/main/java/org/codehaus/plexus/components/interactivity/OutputHandler.java → plexus-interactivity-api/src/main/java/org/codehaus/plexus/components/interactivity/OutputHandler.java
=====================================
@@ -30,7 +30,7 @@ import java.io.IOException;
* Manage user output to different sources.
*
* @author <a href="mailto:brett at apache.org">Brett Porter</a>
- * @version $Id: OutputHandler.java 2649 2005-10-10 16:51:51Z brett $
+ * @version $Id$
*/
public interface OutputHandler
{
=====================================
src/main/java/org/codehaus/plexus/components/interactivity/Prompter.java → plexus-interactivity-api/src/main/java/org/codehaus/plexus/components/interactivity/Prompter.java
=====================================
@@ -30,7 +30,7 @@ import java.util.List;
* Prompt the user for input.
*
* @author <a href="mailto:brett at apache.org">Brett Porter</a>
- * @version $Id: Prompter.java 2649 2005-10-10 16:51:51Z brett $
+ * @version $Id$
*/
public interface Prompter
{
=====================================
src/main/java/org/codehaus/plexus/components/interactivity/PrompterException.java → plexus-interactivity-api/src/main/java/org/codehaus/plexus/components/interactivity/PrompterException.java
=====================================
@@ -28,7 +28,7 @@ package org.codehaus.plexus.components.interactivity;
* Error while prompting.
*
* @author <a href="mailto:brett at apache.org">Brett Porter</a>
- * @version $Id: PrompterException.java 2649 2005-10-10 16:51:51Z brett $
+ * @version $Id$
*/
public class PrompterException
extends Exception
=====================================
src/main/resources/META-INF/plexus/components.xml → plexus-interactivity-api/src/main/resources/META-INF/plexus/components.xml
=====================================
=====================================
plexus-interactivity-api/src/site/site.xml
=====================================
@@ -0,0 +1,15 @@
+<project xmlns="http://maven.apache.org/DECORATION/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd">
+ <body>
+ <menu name="Overview">
+ <item name="Introduction" href="index.html"/>
+ <item name="JavaDocs" href="apidocs/index.html"/>
+ <item name="Source Xref" href="xref/index.html"/>
+ <!--item name="FAQ" href="faq.html"/-->
+ </menu>
+
+ <menu ref="parent"/>
+ <menu ref="reports"/>
+ </body>
+</project>
=====================================
plexus-interactivity-jline/pom.xml
=====================================
@@ -0,0 +1,30 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>plexus-interactivity</artifactId>
+ <groupId>org.codehaus.plexus</groupId>
+ <version>1.1</version>
+ </parent>
+
+ <artifactId>plexus-interactivity-jline</artifactId>
+
+ <name>Plexus JLine Interactivity Handler</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>jline</groupId>
+ <artifactId>jline</artifactId>
+ <version>0.9.94</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interactivity-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
=====================================
plexus-interactivity-jline/src/main/java/org/codehaus/plexus/components/interactivity/jline/JLineInputHandler.java
=====================================
@@ -0,0 +1,70 @@
+package org.codehaus.plexus.components.interactivity.jline;
+
+/*
+ * The MIT License
+ *
+ * Copyright (c) 2005, The Codehaus
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is furnished to do
+ * so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+import jline.ConsoleReader;
+import org.codehaus.plexus.components.interactivity.AbstractInputHandler;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
+
+import java.io.IOException;
+
+/**
+ * Default input handler, that uses the console.
+ *
+ * @author Brett Porter
+ * @version $Id$
+ */
+public class JLineInputHandler
+ extends AbstractInputHandler
+ implements Initializable
+{
+ private ConsoleReader consoleReader;
+
+ public String readLine()
+ throws IOException
+ {
+ return consoleReader.readLine();
+ }
+
+ public String readPassword()
+ throws IOException
+ {
+ return consoleReader.readLine( new Character( '*' ) );
+ }
+
+ public void initialize()
+ throws InitializationException
+ {
+ try
+ {
+ consoleReader = new ConsoleReader();
+ }
+ catch ( IOException e )
+ {
+ throw new InitializationException( "Cannot create console reader: ", e );
+ }
+ }
+}
=====================================
plexus-interactivity-jline/src/main/resources/META-INF/plexus/components.xml
=====================================
@@ -0,0 +1,10 @@
+<component-set>
+ <components>
+ <component>
+ <role>org.codehaus.plexus.components.inputhandler.InputHandler</role>
+ <role-hint>jline</role-hint>
+ <implementation>org.codehaus.plexus.components.interactivity.jline.JLineInputHandler</implementation>
+ <instantiation-strategy>per-lookup</instantiation-strategy>
+ </component>
+ </components>
+</component-set>
=====================================
plexus-interactivity-jline/src/site/site.xml
=====================================
@@ -0,0 +1,15 @@
+<project xmlns="http://maven.apache.org/DECORATION/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd">
+ <body>
+ <menu name="Overview">
+ <item name="Introduction" href="index.html"/>
+ <item name="JavaDocs" href="apidocs/index.html"/>
+ <item name="Source Xref" href="xref/index.html"/>
+ <!--item name="FAQ" href="faq.html"/-->
+ </menu>
+
+ <menu ref="parent"/>
+ <menu ref="reports"/>
+ </body>
+</project>
=====================================
pom.xml
=====================================
@@ -1,18 +1,55 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
<parent>
- <artifactId>plexus-interactivity</artifactId>
+ <artifactId>plexus-components</artifactId>
<groupId>org.codehaus.plexus</groupId>
- <version>1.0-alpha-6</version>
+ <version>6.5</version>
</parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>plexus-interactivity-api</artifactId>
- <name>Plexus Default Interactivity Handler</name>
- <version>1.0-alpha-6</version>
- <dependencies>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-utils</artifactId>
- <version>1.4</version>
- </dependency>
- </dependencies>
+
+ <artifactId>plexus-interactivity</artifactId>
+ <version>1.1</version>
+ <packaging>pom</packaging>
+
+ <name>Plexus Interactivity Handler Component</name>
+
+ <scm>
+ <connection>${scm.url}</connection>
+ <developerConnection>${scm.url}</developerConnection>
+ <url>https://github.com/codehaus-plexus/plexus-interactivity</url>
+ <tag>plexus-interactivity-1.1</tag>
+ </scm>
+ <issueManagement>
+ <system>github</system>
+ <url>https://github.com/codehaus-plexus/plexus-interactivity/issues</url>
+ </issueManagement>
+ <distributionManagement>
+ <site>
+ <id>github:gh-pages</id>
+ <url>${scm.url}</url>
+ </site>
+ </distributionManagement>
+
+ <properties>
+ <scm.url>scm:git:https://github.com/codehaus-plexus/plexus-interactivity.git</scm.url>
+ <project.build.outputTimestamp>2021-09-11T07:18:40Z</project.build.outputTimestamp>
+ </properties>
+
+ <modules>
+ <module>plexus-interactivity-api</module>
+ <module>plexus-interactivity-jline</module>
+ </modules>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <configuration>
+ <topSiteURL>${scm.url}</topSiteURL>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
=====================================
src/site/site.xml
=====================================
@@ -0,0 +1,8 @@
+<project xmlns="http://maven.apache.org/DECORATION/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd">
+ <body>
+ <menu ref="parent"/>
+ <menu ref="modules"/>
+ </body>
+</project>
View it on GitLab: https://salsa.debian.org/java-team/plexus-interactivity-api/-/commit/1fc3423d435b516d5ad0ba88b90867ff478d0d11
--
View it on GitLab: https://salsa.debian.org/java-team/plexus-interactivity-api/-/commit/1fc3423d435b516d5ad0ba88b90867ff478d0d11
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20220504/8465d7fa/attachment.htm>
More information about the pkg-java-commits
mailing list