This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sling-feature-launcher-maven-plugin.git
commit 4f40833e8ccf421709768c462582c94f36841e46 Author: Robert Munteanu <[email protected]> AuthorDate: Fri Jul 1 12:25:55 2022 +0200 SLING-11378 - Execution fails if no launcher arguments are defined Add an IT that verifies an empty config does not trigger any errors. --- src/it/empty-config-it/pom.xml | 84 ++++++++++++++++++++++ .../empty-config-it/src/main/features/model.json | 14 ++++ src/it/empty-config-it/verify.groovy | 21 ++++++ 3 files changed, 119 insertions(+) diff --git a/src/it/empty-config-it/pom.xml b/src/it/empty-config-it/pom.xml new file mode 100644 index 0000000..4ec73dd --- /dev/null +++ b/src/it/empty-config-it/pom.xml @@ -0,0 +1,84 @@ +<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.apache.sling</groupId> + <artifactId>empty-config-it</artifactId> + <version>1.0-SNAPSHOT</version> + + <description>An IT verifying that passing an empty config triggers no errors.</description> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <build> + <plugins> + <plugin> + <groupId>org.apache.sling</groupId> + <artifactId>slingfeature-maven-plugin</artifactId> + <version>1.3.6</version> + <extensions>true</extensions> + <!-- TODO - seems we can't attach non-aggregates --> + <configuration> + <aggregates> + <aggregate> + <classifier>main</classifier> + <filesInclude>model.json</filesInclude> + </aggregate> + </aggregates> + </configuration> + <executions> + <execution> + <goals> + <goal>attach-features</goal> + <goal>aggregate-features</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>@project.groupId@</groupId> + <artifactId>@project.artifactId@</artifactId> + <version>@project.version@</version> + <configuration> + <launches> + <launch> + <id>model</id> + <feature> + <groupId>org.apache.sling</groupId> + <artifactId>empty-config-it</artifactId> + <version>1.0-SNAPSHOT</version> + <classifier>main</classifier> + <type>slingosgifeature</type> + </feature> + <startTimeoutSeconds>180</startTimeoutSeconds> + </launch> + </launches> + <toLaunch> + </toLaunch> + </configuration> + <executions> + <execution> + <goals> + <goal>start</goal> + <goal>stop</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> diff --git a/src/it/empty-config-it/src/main/features/model.json b/src/it/empty-config-it/src/main/features/model.json new file mode 100644 index 0000000..ee05e71 --- /dev/null +++ b/src/it/empty-config-it/src/main/features/model.json @@ -0,0 +1,14 @@ +{ + "id":"${project.groupId}:${project.artifactId}:model:${project.version}", + "bundles": [ + "org.apache.felix/org.apache.felix.scr/2.1.20", + "org.apache.felix/org.apache.felix.log/1.2.2", + "org.apache.felix/org.apache.felix.configadmin/1.9.16", + "org.osgi/org.osgi.util.promise/1.1.1", + "org.osgi/org.osgi.util.function/1.1.0", + "org.osgi/org.osgi.util.converter/1.0.1", + "org.apache.commons/commons-lang3/3.9", + "org.apache.felix/org.apache.felix.http.jetty/4.0.16", + "org.apache.felix/org.apache.felix.http.servlet-api/1.1.2" + ] +} \ No newline at end of file diff --git a/src/it/empty-config-it/verify.groovy b/src/it/empty-config-it/verify.groovy new file mode 100644 index 0000000..e9b7465 --- /dev/null +++ b/src/it/empty-config-it/verify.groovy @@ -0,0 +1,21 @@ +/* + * 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. + */ +File touchFile = new File( basedir, "build.log" ); + +assert touchFile.isFile()
