mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 15:06:36 +01:00
reduce java packages to java-archive and jenkins-plugin
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=Nom
|
||||
French=Fran\u00e7ais
|
||||
FrenchDescr=V\u00e9rifie qu'on dit bien hello en fran\u00e7ais
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
Your name.
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
Votre nom.
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
Use French?
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
Utiliser le français ?
|
||||
</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=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
|
||||
Reference in New Issue
Block a user