SLING-10160 generate source-release.zip for both parent poms (#15)
diff --git a/sling-bundle-parent/.isParentPom b/sling-bundle-parent/.isParentPom
new file mode 100644
index 0000000..f59cc86
--- /dev/null
+++ b/sling-bundle-parent/.isParentPom
@@ -0,0 +1 @@
+# this file is only there in the parent poms and leads to activation of a special profile "parent-pom-build"
\ No newline at end of file
diff --git a/sling-parent/.isParentPom b/sling-parent/.isParentPom
new file mode 100644
index 0000000..f59cc86
--- /dev/null
+++ b/sling-parent/.isParentPom
@@ -0,0 +1 @@
+# this file is only there in the parent poms and leads to activation of a special profile "parent-pom-build"
\ No newline at end of file
diff --git a/sling-parent/pom.xml b/sling-parent/pom.xml
index fb0e64e..dfb20ef 100644
--- a/sling-parent/pom.xml
+++ b/sling-parent/pom.xml
@@ -850,6 +850,45 @@
</pluginManagement>
</build>
</profile>
+ <!-- This profile is only active when building this parent pom (or sling-bundle-parent) -->
+ <profile>
+ <id>parent-pom-build</id>
+ <activation>
+ <file>
+ <exists>.isParentPom</exists>
+ </file>
+ </activation>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <!-- Create a source-release artifact that contains the fully buildable
+ project directory source structure. This is the artifact which is
+ the official subject of any release vote. -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <!-- add dedicated execution as the one defined in ASF Parent POM only runs at execution root -->
+ <executions>
+ <execution>
+ <id>source-release-assembly-for-pom</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <runOnlyAtExecutionRoot>false</runOnlyAtExecutionRoot>
+ <descriptorRefs>
+ <descriptorRef>${sourceReleaseAssemblyDescriptor}</descriptorRef>
+ </descriptorRefs>
+ <tarLongFileMode>posix</tarLongFileMode>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ </profile>
</profiles>
<mailingLists>