-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an "unpack" task to the stager-maven-plugin (#1073)
Download an unpack an archive from a URL.
- Loading branch information
1 parent
5b67c5a
commit 53bd7fc
Showing
14 changed files
with
338 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
maven-plugins/stager-maven-plugin/src/it/projects/unpack/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<!-- | ||
Copyright (c) 2024 Oracle and/or its affiliates. | ||
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. | ||
--> | ||
|
||
<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> | ||
<groupId>io.helidon.build-tools.stager.tests</groupId> | ||
<artifactId>unpack</artifactId> | ||
<version>@project.version@</version> | ||
<name>Test Stager Unpack task</name> | ||
<packaging>pom</packaging> | ||
|
||
<build> | ||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>io.helidon.build-tools</groupId> | ||
<artifactId>helidon-stager-maven-plugin</artifactId> | ||
<version>${project.version}</version> | ||
<configuration> | ||
<directories> | ||
<directory target="${project.build.directory}/stage"> | ||
<unpacks> | ||
<unpack url="https://repo1.maven.org/maven2/io/helidon/helidon-project/{version}/helidon-project-{version}-site.jar" | ||
excludes="META-INF/**" | ||
target="docs/{version}"> | ||
<iterators> | ||
<variables> | ||
<variable name="version"> | ||
<value>3.2.10</value> | ||
<value>3.2.9</value> | ||
</variable> | ||
</variables> | ||
</iterators> | ||
</unpack> | ||
</unpacks> | ||
</directory> | ||
</directories> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>io.helidon.build-tools</groupId> | ||
<artifactId>helidon-stager-maven-plugin</artifactId> | ||
<version>${project.version}</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>stage</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
29 changes: 29 additions & 0 deletions
29
maven-plugins/stager-maven-plugin/src/it/projects/unpack/postbuild.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright (c) 2024 Oracle and/or its affiliates. | ||
* | ||
* 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. | ||
*/ | ||
|
||
import io.helidon.build.common.test.utils.JUnitLauncher | ||
import io.helidon.build.maven.stager.ProjectsTestIT | ||
|
||
//noinspection GroovyAssignabilityCheck,GrUnresolvedAccess | ||
JUnitLauncher.builder() | ||
.select(ProjectsTestIT.class, "testUnpack", String.class) | ||
.parameter("basedir", basedir.getAbsolutePath()) | ||
.reportsDir(basedir) | ||
.outputFile(new File(basedir, "test.log")) | ||
.suiteId("stager-unpack-it-test") | ||
.suiteDisplayName("Stager Unpack Integration Test") | ||
.build() | ||
.launch() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.