mirror of
https://github.com/anchore/syft.git
synced 2026-11-03 07:56:36 +01:00
add java cataloger
This commit is contained in:
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>plugin</artifactId>
|
||||
<version>3.50</version>
|
||||
<relativePath />
|
||||
</parent>
|
||||
<groupId>io.jenkins.plugins</groupId>
|
||||
<artifactId>example-jenkins-plugin</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>hpi</packaging>
|
||||
<properties>
|
||||
<!-- Baseline Jenkins version you use to build the plugin. Users must have this version or newer to run. -->
|
||||
<jenkins.version>2.164.3</jenkins.version>
|
||||
<java.level>8</java.level>
|
||||
<!-- Other properties you may want to use:
|
||||
~ jenkins-test-harness.version: Jenkins Test Harness version you use to test the plugin. For Jenkins version >= 1.580.1 use JTH 2.0 or higher.
|
||||
~ hpi-plugin.version: The HPI Maven Plugin version used by the plugin..
|
||||
~ stapler-plugin.version: The Stapler Maven plugin version required by the plugin.
|
||||
-->
|
||||
</properties>
|
||||
<name>TODO Plugin</name>
|
||||
<!-- The default licence for Jenkins OSS Plugins is MIT. Substitute for the applicable one if needed. -->
|
||||
<licenses>
|
||||
<license>
|
||||
<name>MIT License</name>
|
||||
<url>https://opensource.org/licenses/MIT</url>
|
||||
</license>
|
||||
</licenses>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<!-- Pick up common dependencies for 2.164.x: https://github.com/jenkinsci/bom#usage -->
|
||||
<groupId>io.jenkins.tools.bom</groupId>
|
||||
<artifactId>bom-2.164.x</artifactId>
|
||||
<version>3</version>
|
||||
<scope>import</scope>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>structs</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins.workflow</groupId>
|
||||
<artifactId>workflow-cps</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins.workflow</groupId>
|
||||
<artifactId>workflow-job</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins.workflow</groupId>
|
||||
<artifactId>workflow-basic-steps</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins.workflow</groupId>
|
||||
<artifactId>workflow-durable-task-step</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<!-- If you want this to appear on the wiki page:
|
||||
<developers>
|
||||
<developer>
|
||||
<id>bhacker</id>
|
||||
<name>Bob Q. Hacker</name>
|
||||
<email>bhacker@nowhere.net</email>
|
||||
</developer>
|
||||
</developers> -->
|
||||
|
||||
<!-- Assuming you want to host on @jenkinsci:
|
||||
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>
|
||||
<scm>
|
||||
<connection>scm:git:git://github.com/jenkinsci/${project.artifactId}-plugin.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:jenkinsci/${project.artifactId}-plugin.git</developerConnection>
|
||||
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>
|
||||
</scm>
|
||||
-->
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>repo.jenkins-ci.org</id>
|
||||
<url>https://repo.jenkins-ci.org/public/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>repo.jenkins-ci.org</id>
|
||||
<url>https://repo.jenkins-ci.org/public/</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
</project>
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
package io.jenkins.plugins.sample;
|
||||
|
||||
import hudson.Launcher;
|
||||
import hudson.Extension;
|
||||
import hudson.FilePath;
|
||||
import hudson.util.FormValidation;
|
||||
import hudson.model.AbstractProject;
|
||||
import hudson.model.Run;
|
||||
import hudson.model.TaskListener;
|
||||
import hudson.tasks.Builder;
|
||||
import hudson.tasks.BuildStepDescriptor;
|
||||
import org.kohsuke.stapler.DataBoundConstructor;
|
||||
import org.kohsuke.stapler.QueryParameter;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import java.io.IOException;
|
||||
import jenkins.tasks.SimpleBuildStep;
|
||||
import org.jenkinsci.Symbol;
|
||||
import org.kohsuke.stapler.DataBoundSetter;
|
||||
|
||||
public class HelloWorldBuilder extends Builder implements SimpleBuildStep {
|
||||
|
||||
private final String name;
|
||||
private boolean useFrench;
|
||||
|
||||
@DataBoundConstructor
|
||||
public HelloWorldBuilder(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public boolean isUseFrench() {
|
||||
return useFrench;
|
||||
}
|
||||
|
||||
@DataBoundSetter
|
||||
public void setUseFrench(boolean useFrench) {
|
||||
this.useFrench = useFrench;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void perform(Run<?, ?> run, FilePath workspace, Launcher launcher, TaskListener listener) throws InterruptedException, IOException {
|
||||
if (useFrench) {
|
||||
listener.getLogger().println("Bonjour, " + name + "!");
|
||||
} else {
|
||||
listener.getLogger().println("Hello, " + name + "!");
|
||||
}
|
||||
}
|
||||
|
||||
@Symbol("greet")
|
||||
@Extension
|
||||
public static final class DescriptorImpl extends BuildStepDescriptor<Builder> {
|
||||
|
||||
public FormValidation doCheckName(@QueryParameter String value, @QueryParameter boolean useFrench)
|
||||
throws IOException, ServletException {
|
||||
if (value.length() == 0)
|
||||
return FormValidation.error(Messages.HelloWorldBuilder_DescriptorImpl_errors_missingName());
|
||||
if (value.length() < 4)
|
||||
return FormValidation.warning(Messages.HelloWorldBuilder_DescriptorImpl_warnings_tooShort());
|
||||
if (!useFrench && value.matches(".*[éáàç].*")) {
|
||||
return FormValidation.warning(Messages.HelloWorldBuilder_DescriptorImpl_warnings_reallyFrench());
|
||||
}
|
||||
return FormValidation.ok();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isApplicable(Class<? extends AbstractProject> aClass) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
return Messages.HelloWorldBuilder_DescriptorImpl_DisplayName();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
<?jelly escape-by-default='true'?>
|
||||
<div>
|
||||
TODO
|
||||
</div>
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
<?jelly escape-by-default='true'?>
|
||||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
|
||||
<f:entry title="${%Name}" field="name">
|
||||
<f:textbox />
|
||||
</f:entry>
|
||||
<f:advanced>
|
||||
<f:entry title="${%French}" field="useFrench"
|
||||
description="${%FrenchDescr}">
|
||||
<f:checkbox />
|
||||
</f:entry>
|
||||
</f:advanced>
|
||||
</j:jelly>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
Name=Name
|
||||
French=French
|
||||
FrenchDescr=Check if we should say hello in French
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
Name=Name
|
||||
French=Franz\u00F6sisch
|
||||
FrenchDescr=Markieren f\u00FCr Begr\u00FC\u00DFung auf franz\u00F6sisch
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
Name=Nombre
|
||||
French=Franc\u00E9s
|
||||
FrenchDescr=Compruebe si debemos decir hola en franc\u00E9s
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
Name=Nom
|
||||
French=Fran\u00e7ais
|
||||
FrenchDescr=V\u00e9rifie qu'on dit bien hello en fran\u00e7ais
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
Name=Nome
|
||||
French=Francese
|
||||
FrenchDescr=Mostra il messagio in francese
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
Name=Nome
|
||||
French=Franc\u00EAs
|
||||
FrenchDescr=Marque se devemos falar ol\u00E1 em franc\u00EAs
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
Name=Namn
|
||||
French=Franska
|
||||
FrenchDescr=S\u00E4tt om vi ska s\u00E4ga hej p\u00E5 Franska
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
Name=\u0130sim
|
||||
French=Frans\u0131zca
|
||||
FrenchDescr=Frans\u0131zca olarak merhaba demeliyim diye sor
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
# 如果您希望在 Jenkins 组织当中托管您的插件,那我们推荐您将本地化文件提交到 https://github.com/jenkinsci/localization-zh-cn-plugin 中。
|
||||
# 如果您希望私有维护插件,可以参考本例子的方式放置中文的本地化文件。
|
||||
|
||||
Name=\u540d\u5b57
|
||||
French=\u6cd5\u8bed
|
||||
FrenchDescr=\u68c0\u67e5\u6211\u4eec\u662f\u5426\u5e94\u8be5\u7528\u6cd5\u8bed\u6253\u4e2a\u62db\u547c
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
Your name.
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
Geben Sie Ihren Namen ein.
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
Tu nombre.
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
Votre nom.
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
Nome di mostrare.
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
Seu nome.
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
Ditt namn.
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
İsmin.
|
||||
</div>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<!--如果您希望在 Jenkins 组织当中托管您的插件,那我们推荐您将本地化文件提交到 https://github.com/jenkinsci/localization-zh-cn-plugin 中。-->
|
||||
<!--如果您希望私有维护插件,可以参考本例子的方式放置中文的本地化文件。-->
|
||||
<div>
|
||||
你的名字。
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
Use French?
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
Ob die Begrüßung auf französisch angegeben werden soll.
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
¿Utilizar el francés?
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
Utiliser le français ?
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
Mostrare il messagio in francese.
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
Usar francês?
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
Använda Franska?
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
Fransızca göster?
|
||||
</div>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<!--如果您希望在 Jenkins 组织当中托管您的插件,那我们推荐您将本地化文件提交到 https://github.com/jenkinsci/localization-zh-cn-plugin 中。-->
|
||||
<!--如果您希望私有维护插件,可以参考本例子的方式放置中文的本地化文件。-->
|
||||
<div>
|
||||
使用法语 ?
|
||||
</div>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
HelloWorldBuilder.DescriptorImpl.errors.missingName=Please set a name
|
||||
HelloWorldBuilder.DescriptorImpl.warnings.tooShort=Isn't the name too short?
|
||||
HelloWorldBuilder.DescriptorImpl.warnings.reallyFrench=Are you actually French?
|
||||
|
||||
HelloWorldBuilder.DescriptorImpl.DisplayName=Say hello world
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
HelloWorldBuilder.DescriptorImpl.errors.missingName=Bitte geben Sie einen Namen an
|
||||
HelloWorldBuilder.DescriptorImpl.warnings.tooShort=Der Name ist zu kurz.
|
||||
HelloWorldBuilder.DescriptorImpl.warnings.reallyFrench=Sind Sie wirklich franz\u00F6sisch?
|
||||
|
||||
HelloWorldBuilder.DescriptorImpl.DisplayName=\u201EHallo Welt\u201C sagen
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
HelloWorldBuilder.DescriptorImpl.errors.missingName=Establecer un nombre
|
||||
HelloWorldBuilder.DescriptorImpl.warnings.tooShort=\u00BFNo es el nombre demasiado corto?
|
||||
HelloWorldBuilder.DescriptorImpl.warnings.reallyFrench=\u00BFEs usted realmente franc\u00E9s?
|
||||
|
||||
HelloWorldBuilder.DescriptorImpl.DisplayName=Di hola mundo
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
HelloWorldBuilder.DescriptorImpl.errors.missingName=Veuillez saisir un nom
|
||||
HelloWorldBuilder.DescriptorImpl.warnings.tooShort=Le nom n'est-il pas trop court ?
|
||||
HelloWorldBuilder.DescriptorImpl.warnings.reallyFrench=\u00CAtes vous vraiment fran\u00E7ais ?
|
||||
|
||||
HelloWorldBuilder.DescriptorImpl.DisplayName=Dis hello world
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
HelloWorldBuilder.DescriptorImpl.errors.missingName=Nome \u00E8 richiesto
|
||||
HelloWorldBuilder.DescriptorImpl.warnings.tooShort=Nome dev'essere al meno 4 charatteri
|
||||
HelloWorldBuilder.DescriptorImpl.warnings.reallyFrench=Vuole mostrare il messagio in francese?
|
||||
|
||||
HelloWorldBuilder.DescriptorImpl.DisplayName=Nome di mostrare
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
HelloWorldBuilder.DescriptorImpl.errors.missingName=Insira um nome
|
||||
HelloWorldBuilder.DescriptorImpl.warnings.tooShort=Este nome n\u00E3o \u00E9 muito curto?
|
||||
HelloWorldBuilder.DescriptorImpl.warnings.reallyFrench=Voc\u00EA \u00E9 realmente franc\u00EAs?
|
||||
|
||||
HelloWorldBuilder.DescriptorImpl.DisplayName=Diz ol\u00E1 mundo
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
HelloWorldBuilder.DescriptorImpl.errors.missingName=Ange ett namn
|
||||
HelloWorldBuilder.DescriptorImpl.warnings.tooShort=\u00C4r inte namnet lite f\u00F6r kort?
|
||||
HelloWorldBuilder.DescriptorImpl.warnings.reallyFrench=\u00C4r du egentligen Fransk?
|
||||
|
||||
HelloWorldBuilder.DescriptorImpl.DisplayName=S\u00E4g Hej V\u00E4rlden
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
HelloWorldBuilder.DescriptorImpl.errors.missingName=L\u00FCtfen bir isim girin
|
||||
HelloWorldBuilder.DescriptorImpl.warnings.tooShort=\u0130sminiz \u00E7ok k\u0131sa de\u011Fil mi?
|
||||
HelloWorldBuilder.DescriptorImpl.warnings.reallyFrench=Ger\u00E7ekten Frans\u0131z m\u0131s\u0131n\u0131z?
|
||||
|
||||
HelloWorldBuilder.DescriptorImpl.DisplayName=Merhaba d\u00FCnya de
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
# 如果您希望在 Jenkins 组织当中托管您的插件,那我们推荐您将本地化文件提交到 https://github.com/jenkinsci/localization-zh-cn-plugin 中。
|
||||
# 如果您希望私有维护插件,可以参考本例子的方式放置中文的本地化文件。
|
||||
|
||||
HelloWorldBuilder.DescriptorImpl.errors.missingName=\u8bf7\u586b\u5199\u540d\u5b57
|
||||
HelloWorldBuilder.DescriptorImpl.warnings.tooShort=\u540d\u5b57\u662f\u4e0d\u662f\u592a\u77ed\u4e86\uff1f
|
||||
HelloWorldBuilder.DescriptorImpl.warnings.reallyFrench=\u4f60\u771f\u7684\u662f\u6cd5\u56fd\u4eba\u5417\uff1f
|
||||
|
||||
HelloWorldBuilder.DescriptorImpl.DisplayName=\u8bf4\uff1a\u4f60\u597d\uff0c\u4e16\u754c
|
||||
Reference in New Issue
Block a user