You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by tr...@apache.org on 2017/09/11 06:56:42 UTC
svn commit: r1807995 [7/7] - in
/jackrabbit/commons/filevault-package-maven-plugin/trunk: ./ it/ it/src/
it/src/test/ it/src/test/java/ it/src/test/java/org/
it/src/test/java/org/apache/ it/src/test/java/org/apache/jackrabbit/
it/src/test/java/org/apac...
Added: jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/FileValidatorTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/FileValidatorTest.java?rev=1807995&view=auto
==============================================================================
--- jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/FileValidatorTest.java (added)
+++ jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/FileValidatorTest.java Mon Sep 11 06:56:40 2017
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ */
+package org.apache.jackrabbit.filevault.maven.packaging;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import java.io.InputStream;
+
+import org.apache.jackrabbit.filevault.maven.packaging.FileValidator;
+import org.junit.Test;
+
+public class FileValidatorTest {
+
+ private static final String RESOURCE_DIR = "/oak-index/";
+
+ private InputStream load(String path) {
+ return getClass().getResourceAsStream(RESOURCE_DIR + path);
+ }
+
+ @Test
+ public void test_filter() throws Exception {
+ FileValidator validator = new FileValidator();
+ String path = "META-INF/vault/filter.xml";
+
+ validator.lookupIndexDefinitionInArtifact(load(path), path);
+
+ assertEquals(2, validator.indexPaths.size());
+ assertTrue(validator.indexPaths.contains("/oak:index/ccProfile"));
+ assertTrue(validator.indexPaths.contains("/apps/project/oak:index/indexDef"));
+ }
+
+ @Test
+ public void test_index_at_root() throws Exception {
+ FileValidator validator = new FileValidator();
+ String path = "jcr_root/_oak_index/testindex/.content.xml";
+
+ validator.lookupIndexDefinitionInArtifact(load(path), path);
+
+ assertEquals(1, validator.foundIndexes.size());
+ assertEquals(path, validator.foundIndexes.get("/oak:index/testindex"));
+ }
+
+ @Test
+ public void test_index_at_deep_path() throws Exception {
+ FileValidator validator = new FileValidator();
+ String path = "jcr_root/apps/project/_oak_index/.content.xml";
+
+ validator.lookupIndexDefinitionInArtifact(load(path), path);
+
+ assertEquals(1, validator.foundIndexes.size());
+ assertEquals(path, validator.foundIndexes.get("/apps/project/oak:index/indexDef"));
+ }
+}
Added: jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/impl/FilterTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/impl/FilterTest.java?rev=1807995&view=auto
==============================================================================
--- jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/impl/FilterTest.java (added)
+++ jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/impl/FilterTest.java Mon Sep 11 06:56:40 2017
@@ -0,0 +1,126 @@
+/*
+ * 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.
+ */
+package org.apache.jackrabbit.filevault.maven.packaging.impl;
+
+import junit.framework.TestCase;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.apache.jackrabbit.filevault.maven.packaging.impl.StringFilterSet;
+
+/**
+ * Test the string filter
+ */
+public class FilterTest extends TestCase {
+
+ private static final String[] TEST_STRINGS = {
+ "com.day.cq",
+ "foo-bar",
+ "com.day.cq.impl",
+ "artifact1-test",
+ "artifact2-test"
+ };
+
+ private static final TestSet[] TESTS = new TestSet[]{
+ new TestSet(
+ "Exact",
+ "com.day.cq",
+ new String[]{
+ "com.day.cq"
+ }),
+ new TestSet(
+ "Exact Multiple",
+ "com.day.cq, com.day.cq.impl",
+ new String[]{
+ "com.day.cq",
+ "com.day.cq.impl"
+ }),
+ new TestSet(
+ "Exclude Single",
+ "~com.day.cq",
+ new String[]{
+ "foo-bar",
+ "com.day.cq.impl",
+ "artifact1-test",
+ "artifact2-test"
+ }),
+ new TestSet(
+ "Exclude Multiple",
+ "~com.day.cq,~foo-bar",
+ new String[]{
+ "com.day.cq.impl",
+ "artifact1-test",
+ "artifact2-test"
+ }),
+ new TestSet(
+ "Exclude Pattern",
+ "~/.*-test/",
+ new String[]{
+ "com.day.cq",
+ "foo-bar",
+ "com.day.cq.impl"
+ }),
+ new TestSet(
+ "Exclude Subpackage",
+ "~/com\\.day\\.cq(.*)?/",
+ new String[]{
+ "foo-bar",
+ "artifact1-test",
+ "artifact2-test"
+ })
+ };
+
+ public void testPatterns() {
+ for (TestSet test: TESTS) {
+ StringFilterSet set = new StringFilterSet();
+ set.addEntries(test.pattern);
+ assertEquals(test.name, test.result, getMatching(set, TEST_STRINGS));
+ }
+ }
+
+ private String[] getMatching(StringFilterSet set, String[] testStrings) {
+ List<String> ret = new LinkedList<String>();
+ for (String name: testStrings) {
+ if (set.contains(name)) {
+ ret.add(name);
+ }
+ }
+ return ret.toArray(new String[ret.size()]);
+ }
+
+ private void assertEquals(String name, String[] expected, String[] test) {
+ assertEquals(name, expected.length, test.length);
+ for (int i=0; i< test.length; i++) {
+ assertEquals(name, expected[i], test[i]);
+ }
+ }
+
+ private static class TestSet {
+ private final String name;
+
+ private final String pattern;
+
+ private final String[] result;
+
+ private TestSet(String name, String pattern, String[] result) {
+ this.name = name;
+ this.pattern = pattern;
+ this.result = result;
+ }
+ }
+}
\ No newline at end of file
Added: jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/impl/PackageInfoTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/impl/PackageInfoTest.java?rev=1807995&view=auto
==============================================================================
--- jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/impl/PackageInfoTest.java (added)
+++ jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/impl/PackageInfoTest.java Mon Sep 11 06:56:40 2017
@@ -0,0 +1,64 @@
+/*
+ * 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.
+ */
+package org.apache.jackrabbit.filevault.maven.packaging.impl;
+
+import java.io.File;
+
+import org.apache.jackrabbit.filevault.maven.packaging.impl.PackageInfo;
+import org.apache.jackrabbit.filevault.maven.packaging.impl.PackageType;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+public class PackageInfoTest {
+
+ private static final String RESOURCE_DIR = "/test-packages/";
+
+ private File load(String path) {
+ return new File(getClass().getResource(RESOURCE_DIR + path).getFile());
+ }
+
+ @Test
+ public void test_pkg_with_filter_and_manifest() throws Exception {
+ PackageInfo info = PackageInfo.read(load("pkg-with-filter-and-manifest.zip"));
+ assertNotNull("PackageInfo", info);
+ assertEquals("PackageId", "com.day.jcr.vault.unit:vault-plugin-test-pkg:1.0.0-SNAPSHOT", info.getId().toString());
+ assertEquals("filter size", 1, info.getFilter().getFilterSets().size());
+ assertTrue("contains filter", info.getFilter().contains("/libs/granite/replication"));
+ assertEquals("package type", PackageType.APPLICATION, info.getPackageType());
+ }
+
+ @Test
+ public void test_pkg_with_no_manifest() throws Exception {
+ PackageInfo info = PackageInfo.read(load("pkg-with-no-manifest.zip"));
+ assertNotNull("PackageInfo", info);
+ assertEquals("PackageId", "com.day.jcr.vault.unit:vault-plugin-test-pkg:1.0.0-SNAPSHOT", info.getId().toString());
+ assertEquals("filter size", 1, info.getFilter().getFilterSets().size());
+ assertTrue("contains filter", info.getFilter().contains("/libs/granite/replication"));
+ assertEquals("package type", PackageType.MIXED, info.getPackageType());
+ }
+
+ @Test
+ public void test_non_valid_package() throws Exception {
+ PackageInfo info = PackageInfo.read(load("non-valid-package.zip"));
+ assertNull("PackageInfo", info);
+ }
+}
Added: jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/resources/oak-index/META-INF/vault/filter.xml
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/resources/oak-index/META-INF/vault/filter.xml?rev=1807995&view=auto
==============================================================================
--- jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/resources/oak-index/META-INF/vault/filter.xml (added)
+++ jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/resources/oak-index/META-INF/vault/filter.xml Mon Sep 11 06:56:40 2017
@@ -0,0 +1,21 @@
+<?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.
+ -->
+<workspaceFilter version="1.0">
+ <filter root="/oak:index/ccProfile" mode="merge"/>
+ <filter root="/apps/project/oak:index/indexDef"/>
+</workspaceFilter>
Added: jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/resources/oak-index/jcr_root/_oak_index/testindex/.content.xml
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/resources/oak-index/jcr_root/_oak_index/testindex/.content.xml?rev=1807995&view=auto
==============================================================================
--- jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/resources/oak-index/jcr_root/_oak_index/testindex/.content.xml (added)
+++ jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/resources/oak-index/jcr_root/_oak_index/testindex/.content.xml Mon Sep 11 06:56:40 2017
@@ -0,0 +1,58 @@
+<?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.
+ -->
+
+<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0"
+ xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
+
+ jcr:primaryType="{Name}oak:QueryIndexDefinition"
+ name="ccProfile"
+ includedPaths="[/home]"
+ evaluatePathRestrictions="{Boolean}true"
+
+ type="lucene"
+ async="async"
+ compatVersion="{Long}2"
+ indexPath="/oak:index/ccProfile"
+ reindex="{Boolean}true">
+
+ <indexRules
+ jcr:primaryType="{Name}nt:unstructured">
+
+ <!-- profile-cc nodes have no specified node type
+ currently, nt:unstructured is used, but we rather
+ search based on the node name (indexNodeName = true) -->
+ <nt:base
+ jcr:primaryType="{Name}nt:unstructured"
+ indexNodeName="{Boolean}true">
+ <properties
+ jcr:primaryType="{Name}nt:unstructured">
+
+ <!-- email is searched using jcr:like() -->
+ <prop0 name="email" propertyIndex="{Boolean}true" jcr:primaryType="{Name}nt:unstructured"/>
+
+ <!-- following are full-text searched using jcr:contains() -->
+ <prop1 name="givenName" analyzed="{Boolean}true" jcr:primaryType="{Name}nt:unstructured"/>
+ <prop2 name="familyName" analyzed="{Boolean}true" jcr:primaryType="{Name}nt:unstructured"/>
+ <prop3 name="displayName" analyzed="{Boolean}true" jcr:primaryType="{Name}nt:unstructured"/>
+
+ </properties>
+ </nt:base>
+
+ </indexRules>
+
+</jcr:root>
Added: jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/resources/oak-index/jcr_root/apps/project/_oak_index/.content.xml
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/resources/oak-index/jcr_root/apps/project/_oak_index/.content.xml?rev=1807995&view=auto
==============================================================================
--- jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/resources/oak-index/jcr_root/apps/project/_oak_index/.content.xml (added)
+++ jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/resources/oak-index/jcr_root/apps/project/_oak_index/.content.xml Mon Sep 11 06:56:40 2017
@@ -0,0 +1,35 @@
+<?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.
+ -->
+
+<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0"
+ xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
+ >
+ <indexDef
+
+ jcr:primaryType="oak:QueryIndexDefinition"
+ name="ccProfile"
+ includedPaths="[/home]"
+ evaluatePathRestrictions="{Boolean}true"
+
+ type="lucene"
+ async="async"
+ compatVersion="{Long}2"
+ indexPath="/oak:index/ccProfile"
+ reindex="{Boolean}true">
+ </indexDef>
+</jcr:root>
Added: jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/resources/test-packages/non-valid-package.zip
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/resources/test-packages/non-valid-package.zip?rev=1807995&view=auto
==============================================================================
Binary file - no diff available.
Propchange: jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/resources/test-packages/non-valid-package.zip
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/resources/test-packages/pkg-with-filter-and-manifest.zip
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/resources/test-packages/pkg-with-filter-and-manifest.zip?rev=1807995&view=auto
==============================================================================
Binary file - no diff available.
Propchange: jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/resources/test-packages/pkg-with-filter-and-manifest.zip
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/resources/test-packages/pkg-with-no-manifest.zip
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/resources/test-packages/pkg-with-no-manifest.zip?rev=1807995&view=auto
==============================================================================
Binary file - no diff available.
Propchange: jackrabbit/commons/filevault-package-maven-plugin/trunk/plugin/src/test/resources/test-packages/pkg-with-no-manifest.zip
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: jackrabbit/commons/filevault-package-maven-plugin/trunk/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault-package-maven-plugin/trunk/pom.xml?rev=1807995&view=auto
==============================================================================
--- jackrabbit/commons/filevault-package-maven-plugin/trunk/pom.xml (added)
+++ jackrabbit/commons/filevault-package-maven-plugin/trunk/pom.xml Mon Sep 11 06:56:40 2017
@@ -0,0 +1,203 @@
+<?xml version="1.0"?>
+<!--
+ 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>
+ <!-- ====================================================================== -->
+ <!-- P A R E N T P R O J E C T D E S C R I P T I O N -->
+ <!-- ====================================================================== -->
+ <parent>
+ <groupId>org.apache.jackrabbit.filevault</groupId>
+ <artifactId>package-maven-plugin-parent</artifactId>
+ <relativePath>parent/pom.xml</relativePath>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- ====================================================================== -->
+ <!-- P R O J E C T D E S C R I P T I O N -->
+ <!-- ====================================================================== -->
+ <artifactId>package-maven-plugin-reactor</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>Apache Jackrabbit FileVault - Package Maven Plugin Reactor</name>
+
+ <!-- ====================================================================== -->
+ <!-- S C M D E F I N I T I O N -->
+ <!-- ====================================================================== -->
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/jackrabbit/commons/filevault-package-maven-plugin/trunk</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/jackrabbit/commons/filevault-package-maven-plugin/trunk</developerConnection>
+ <url>http://svn.apache.org/viewvc/asf/jackrabbit/commons/filevault-package-maven-plugin/trunk</url>
+ </scm>
+
+ <!-- ====================================================================== -->
+ <!-- B U I L D D E F I N I T I O N -->
+ <!-- ====================================================================== -->
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ <configuration>
+ <source>1.7</source>
+ <target>1.7</target>
+ <debug>true</debug>
+ <showDeprecation>false</showDeprecation>
+ <showWarnings>true</showWarnings>
+ <optimize>false</optimize>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <!-- ====================================================================== -->
+ <!-- M O D U L E S -->
+ <!-- ====================================================================== -->
+ <modules>
+ <module>parent</module>
+ <module>plugin</module>
+ <module>it</module>
+ </modules>
+
+ <!-- ====================================================================== -->
+ <!-- P R O F I L E S -->
+ <!-- ====================================================================== -->
+ <profiles>
+ <profile>
+ <id>apache-release</id>
+ <properties>
+ <username>${user.name}</username>
+ <keyfile>${user.home}/.ssh/id_rsa</keyfile>
+ <passphrase />
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <descriptors>
+ <descriptor>assembly.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ <execution>
+ <id>source-release-assembly</id>
+ <configuration>
+ <skipAssembly>true</skipAssembly>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- JCR-2455: Automatic staging of non-Maven release artifacts -->
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <phase>deploy</phase>
+ <configuration>
+ <tasks>
+ <mkdir dir="${basedir}/target/${project.version}" />
+ <copy todir="${basedir}/target/${project.version}" flatten="true">
+ <fileset dir="${basedir}">
+ <include name="RELEASE-NOTES.txt" />
+ <include name="target/*-src.zip*" />
+ </fileset>
+ </copy>
+ <checksum algorithm="MD5" fileext=".md5">
+ <fileset dir="${basedir}/target/${project.version}">
+ <include name="*.zip" />
+ </fileset>
+ </checksum>
+ <checksum algorithm="SHA1" fileext=".sha">
+ <fileset dir="${basedir}/target/${project.version}">
+ <include name="*.zip" />
+ </fileset>
+ </checksum>
+ <checksum file="${basedir}/target/${project.version}/jackrabbit-filevault-${project.version}-src.zip" algorithm="SHA1" property="checksum" />
+ <echo file="${basedir}/target/vote.txt">
+ From: ${username}@apache.org
+ To: dev@jackrabbit.apache.org
+ Subject: [VOTE] Release Apache Jackrabbit Filevault Package Maven Plugin ${project.version}
+
+ A candidate for the Jackrabbit Filevault Package Maven Plugin ${project.version} release is available at:
+
+ https://dist.apache.org/repos/dist/dev/jackrabbit/filevault-package-maven-plugin/${project.version}/
+
+ The release candidate is a zip archive of the sources in:
+
+ https://svn.apache.org/repos/asf/jackrabbit/commons/filevault-package-maven-plugin/tags/jackrabbit-filevault-${project.version}/
+
+ The SHA1 checksum of the archive is ${checksum}.
+
+ A staged Maven repository is available for review at:
+
+ https://repository.apache.org/
+
+ Please vote on releasing this package as Apache Jackrabbit Filevault Package Maven Plugin ${project.version}.
+ The vote is open for the next 72 hours and passes if a majority of at
+ least three +1 Jackrabbit PMC votes are cast.
+
+ [ ] +1 Release this package as Apache Jackrabbit Filevault Package Maven Plugin ${project.version}
+ [ ] -1 Do not release this package because...${line.separator}
+ </echo>
+ <echo />
+ <echo>
+ The release candidate has been prepared in:
+
+ ${basedir}/target/${project.version}
+
+ Please deploy it to https://dist.apache.org/repos/dist/dev/jackrabbit/filevault-package-maven-plugin:
+
+ cd /path/to/jackrabbit-dev/filevault-package-maven-plugin
+ mv ${basedir}/target/${project.version} ${project.version}
+ svn add ${project.version}
+ svn commit -m 'Apache Jackrabbit Filevault Package Maven Plugin ${project.version} release candidate' ${project.version}
+
+ A release vote template has been generated for you:
+
+ file://${basedir}/target/vote.txt
+ </echo>
+ <echo />
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-nodeps</artifactId>
+ <version>1.8.1</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>