This is an automated email from the ASF dual-hosted git repository. rfscholte pushed a commit to branch maven-sign-plugin in repository https://gitbox.apache.org/repos/asf/maven-studies.git
commit 9e8c0ac2a237255d7f09f8f7b18b938b7bea7ee9 Author: Slawomir Jaranowski <s.jaranow...@gmail.com> AuthorDate: Sun Oct 11 20:48:28 2020 +0200 Test signing big artifact 800MB --- src/it/big-artifact/invoker.properties | 23 +++++++++ src/it/big-artifact/pom.xml | 88 ++++++++++++++++++++++++++++++++++ src/it/big-artifact/setup.groovy | 32 +++++++++++++ 3 files changed, 143 insertions(+) diff --git a/src/it/big-artifact/invoker.properties b/src/it/big-artifact/invoker.properties new file mode 100644 index 0000000..a9f0e93 --- /dev/null +++ b/src/it/big-artifact/invoker.properties @@ -0,0 +1,23 @@ +# +# 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. +# + +invoker.goals = install --no-transfer-progress -Drevision=1.1.1-SNAPSHOT + +invoker.mavenOpts = -Dorg.slf4j.simpleLogger.showDateTime=true + diff --git a/src/it/big-artifact/pom.xml b/src/it/big-artifact/pom.xml new file mode 100644 index 0000000..5b74862 --- /dev/null +++ b/src/it/big-artifact/pom.xml @@ -0,0 +1,88 @@ +<?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="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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>test-group</groupId> + <artifactId>big-artifact</artifactId> + <version>${revision}</version> + <packaging>pom</packaging> + + <build> + <extensions> + <extension> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-sign-plugin</artifactId> + <version>@project.version@</version> + </extension> + </extensions> + + <plugins> + + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <version>3.2.0</version> + <executions> + <execution> + <id>attach-artifacts</id> + <phase>package</phase> + <goals> + <goal>attach-artifact</goal> + </goals> + <configuration> + <artifacts> + <artifact> + <file>test.dat</file> + <type>dat</type> + </artifact> + </artifacts> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-sign-plugin</artifactId> + <version>@project.version@</version> + <executions> + + <execution> + <goals> + <goal>sign</goal> + </goals> + <configuration> + <keyId>AC71B3E31C0C0D38</keyId> + <keyPassphrase>testPass</keyPassphrase> + <keyFile>@project.basedir@/src/test/resources/pgp-priv-key.asc</keyFile> + </configuration> + </execution> + + </executions> + </plugin> + + </plugins> + </build> +</project> diff --git a/src/it/big-artifact/setup.groovy b/src/it/big-artifact/setup.groovy new file mode 100644 index 0000000..276b2af --- /dev/null +++ b/src/it/big-artifact/setup.groovy @@ -0,0 +1,32 @@ +import java.security.SecureRandom + +/* + * 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. + * + */ + + +def random = new SecureRandom(); +def buf = new byte[ 800 * 1024 ]; + +new File( basedir, "test.dat" ).withOutputStream { out -> + 1024.times { + random.nextBytes(buf) + out.write(buf) + } +}