Tagged 1.0.0 in preparation for release
git-svn-id: https://svn.apache.org/repos/asf/sling/tags/sling-ide-tooling-1.0.0@1605695 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/api-test/pom.xml b/api-test/pom.xml
index c29c7ab..6518d97 100644
--- a/api-test/pom.xml
+++ b/api-test/pom.xml
@@ -1,3 +1,19 @@
+<!--
+ 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>
<parent>
diff --git a/api-test/src/test/java/org/apache/sling/ide/serialization/StubNodeTypeRegistry.java b/api-test/src/test/java/org/apache/sling/ide/serialization/StubNodeTypeRegistry.java
index 336cd61..06f2243 100644
--- a/api-test/src/test/java/org/apache/sling/ide/serialization/StubNodeTypeRegistry.java
+++ b/api-test/src/test/java/org/apache/sling/ide/serialization/StubNodeTypeRegistry.java
@@ -1,3 +1,19 @@
+/*
+ * 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.sling.ide.serialization;
import static org.mockito.Matchers.anyString;
diff --git a/api/OSGI-INF/HttpOsgiClientFactory.xml b/api/OSGI-INF/HttpOsgiClientFactory.xml
index c7822fb..ea4eda3 100644
--- a/api/OSGI-INF/HttpOsgiClientFactory.xml
+++ b/api/OSGI-INF/HttpOsgiClientFactory.xml
@@ -1,4 +1,20 @@
<?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.
+-->
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="false">
<implementation class="org.apache.sling.ide.osgi.impl.HttpOsgiClientFactory"/>
<service>
diff --git a/api/pom.xml b/api/pom.xml
index f299f15..07956b0 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -1,4 +1,20 @@
<?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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
diff --git a/api/src/org/apache/sling/ide/serialization/SerializationData.java b/api/src/org/apache/sling/ide/serialization/SerializationData.java
index 5fb776f..9ff3db4 100644
--- a/api/src/org/apache/sling/ide/serialization/SerializationData.java
+++ b/api/src/org/apache/sling/ide/serialization/SerializationData.java
@@ -1,33 +1,60 @@
+/*
+ * 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.sling.ide.serialization;
+
public class SerializationData {
private final byte[] contents;
- private final String nameHint;
+ private final String fileName;
private final SerializationKind serializationKind;
- private final String fileOrFolderNameHint;
+ private final String folderPath;
- public static SerializationData empty(String fileOrFolderNameHint, SerializationKind serializationKind) {
- return new SerializationData(fileOrFolderNameHint, null, null, serializationKind);
+ public static SerializationData empty(String folderPath, SerializationKind serializationKind) {
+ return new SerializationData(folderPath, null, null, serializationKind);
}
- public SerializationData(String fileOrFolderNameHint, String nameHint, byte[] contents,
+ public SerializationData(String folderPath, String fileName, byte[] contents,
SerializationKind serializationKind) {
- this.fileOrFolderNameHint = fileOrFolderNameHint;
+ this.folderPath = folderPath;
this.contents = contents;
- this.nameHint = nameHint;
+ this.fileName = fileName;
this.serializationKind = serializationKind;
}
- public String getFileOrFolderNameHint() {
- return fileOrFolderNameHint;
+ /**
+ * @return the path where the serialization data file should be stores, in OS format
+ */
+ public String getFolderPath() {
+ return folderPath;
}
+ /**
+ * @return the contents of the serialization data file
+ */
public byte[] getContents() {
return contents;
}
- public String getNameHint() {
- return nameHint;
+ /**
+ *
+ * @return the name of the serialization data file
+ */
+ public String getFileName() {
+ return fileName;
}
public SerializationKind getSerializationKind() {
@@ -41,7 +68,7 @@
@Override
public String toString() {
- return "[SerializationData# fileOrFolderNameHint: " + fileOrFolderNameHint + ", nameHint: " + nameHint
- + ", serializationKind: " + serializationKind + ", contents?" + (hasContents()) + "]";
+ return "[SerializationData# folderPath: " + folderPath + ", fileName: " + fileName
+ + ", serializationKind: " + serializationKind + ", hasContents: " + (hasContents()) + "]";
}
}
\ No newline at end of file
diff --git a/api/src/org/apache/sling/ide/serialization/SerializationKind.java b/api/src/org/apache/sling/ide/serialization/SerializationKind.java
index ca4d38d..ce27da2 100644
--- a/api/src/org/apache/sling/ide/serialization/SerializationKind.java
+++ b/api/src/org/apache/sling/ide/serialization/SerializationKind.java
@@ -1,3 +1,19 @@
+/*
+ * 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.sling.ide.serialization;
/**
diff --git a/artifacts/OSGI-INF/ArtifactsLocatorImpl.xml b/artifacts/OSGI-INF/ArtifactsLocatorImpl.xml
index 24da3d6..3c67c8e 100644
--- a/artifacts/OSGI-INF/ArtifactsLocatorImpl.xml
+++ b/artifacts/OSGI-INF/ArtifactsLocatorImpl.xml
@@ -1,4 +1,20 @@
<?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.
+-->
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0">
<implementation class="org.apache.sling.ide.artifacts.impl.ArtifactsLocatorImpl" />
<service>
diff --git a/artifacts/pom.xml b/artifacts/pom.xml
index 7baf061..ed10075 100644
--- a/artifacts/pom.xml
+++ b/artifacts/pom.xml
@@ -1,4 +1,20 @@
<?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
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
diff --git a/eclipse-core/META-INF/MANIFEST.MF b/eclipse-core/META-INF/MANIFEST.MF
index 32d3963..28a0988 100644
--- a/eclipse-core/META-INF/MANIFEST.MF
+++ b/eclipse-core/META-INF/MANIFEST.MF
@@ -42,6 +42,7 @@
org.json,
org.osgi.service.component;version="1.1.0"
Export-Package: org.apache.sling.ide.eclipse.core,
- org.apache.sling.ide.eclipse.core.internal,
org.apache.sling.ide.eclipse.core.debug,
- org.apache.sling.ide.eclipse.internal.validation;x-friends:=org.apache.sling.ide.eclipse-test
+ org.apache.sling.ide.eclipse.core.internal,
+ org.apache.sling.ide.eclipse.core.progress,
+ org.apache.sling.ide.eclipse.internal.validation;x-friends:="org.apache.sling.ide.eclipse-test"
diff --git a/eclipse-core/plugin.xml b/eclipse-core/plugin.xml
index 62df643..f3447c1 100644
--- a/eclipse-core/plugin.xml
+++ b/eclipse-core/plugin.xml
@@ -1,4 +1,20 @@
<?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.
+-->
<?eclipse version="3.0"?>
<plugin>
diff --git a/eclipse-core/pom.xml b/eclipse-core/pom.xml
index 731f612..74bb31b 100644
--- a/eclipse-core/pom.xml
+++ b/eclipse-core/pom.xml
@@ -1,4 +1,20 @@
<?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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
diff --git a/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingContentFacetUninstallDelegate.java b/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingContentFacetUninstallDelegate.java
index 9b51c8b..8e8f8b0 100644
--- a/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingContentFacetUninstallDelegate.java
+++ b/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingContentFacetUninstallDelegate.java
@@ -1,3 +1,19 @@
+/*
+ * 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.sling.ide.eclipse.core.internal;
import org.eclipse.core.resources.IProject;
diff --git a/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingContentModuleFactory.java b/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingContentModuleFactory.java
index 74ef3f5..8ae86dc 100644
--- a/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingContentModuleFactory.java
+++ b/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingContentModuleFactory.java
@@ -1,3 +1,19 @@
+/*
+ * 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.sling.ide.eclipse.core.internal;
import java.util.ArrayList;
diff --git a/eclipse-core/src/org/apache/sling/ide/eclipse/core/progress/ProgressUtils.java b/eclipse-core/src/org/apache/sling/ide/eclipse/core/progress/ProgressUtils.java
new file mode 100644
index 0000000..98b6c90
--- /dev/null
+++ b/eclipse-core/src/org/apache/sling/ide/eclipse/core/progress/ProgressUtils.java
@@ -0,0 +1,38 @@
+/*
+ * 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.sling.ide.eclipse.core.progress;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+
+/**
+ * The <tt>ProgressUtils</tt> provides convenience methods for working with {@link IProgressMonitor} instances.
+ *
+ */
+public abstract class ProgressUtils {
+
+ public static void advance(IProgressMonitor monitor, int ticks) {
+ monitor.worked(ticks);
+ if (monitor.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+ }
+
+ private ProgressUtils() {
+
+ }
+}
diff --git a/eclipse-m2e-test/pom.xml b/eclipse-m2e-test/pom.xml
index c154388..53b7be8 100644
--- a/eclipse-m2e-test/pom.xml
+++ b/eclipse-m2e-test/pom.xml
@@ -1,4 +1,20 @@
<?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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
diff --git a/eclipse-m2e-ui/META-INF/MANIFEST.MF b/eclipse-m2e-ui/META-INF/MANIFEST.MF
index 6d34799..cf0ccf4 100644
--- a/eclipse-m2e-ui/META-INF/MANIFEST.MF
+++ b/eclipse-m2e-ui/META-INF/MANIFEST.MF
@@ -28,6 +28,7 @@
org.apache.sling.ide.artifacts,
org.apache.sling.ide.eclipse.core,
org.apache.sling.ide.eclipse.core.debug,
+ org.apache.sling.ide.eclipse.core.progress,
org.apache.sling.ide.eclipse.ui,
org.apache.sling.ide.eclipse.ui.wizards,
org.apache.sling.ide.osgi,
diff --git a/eclipse-m2e-ui/lifecycle-mapping-metadata.xml b/eclipse-m2e-ui/lifecycle-mapping-metadata.xml
index 1303703..ce70872 100644
--- a/eclipse-m2e-ui/lifecycle-mapping-metadata.xml
+++ b/eclipse-m2e-ui/lifecycle-mapping-metadata.xml
@@ -1,4 +1,20 @@
<?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.
+-->
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
diff --git a/eclipse-m2e-ui/plugin.xml b/eclipse-m2e-ui/plugin.xml
index c8a68ce..7ba52cc 100644
--- a/eclipse-m2e-ui/plugin.xml
+++ b/eclipse-m2e-ui/plugin.xml
@@ -1,4 +1,20 @@
<?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.
+-->
<?eclipse version="3.0"?>
<plugin>
<extension
diff --git a/eclipse-m2e-ui/pom.xml b/eclipse-m2e-ui/pom.xml
index 0d77799..91991a6 100644
--- a/eclipse-m2e-ui/pom.xml
+++ b/eclipse-m2e-ui/pom.xml
@@ -1,4 +1,20 @@
<?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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
diff --git a/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/m2e/internal/Activator.java b/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/m2e/internal/Activator.java
index d3898f0..f217867 100644
--- a/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/m2e/internal/Activator.java
+++ b/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/m2e/internal/Activator.java
@@ -1,3 +1,19 @@
+/*
+ * 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.sling.ide.eclipse.m2e.internal;
import org.apache.sling.ide.artifacts.EmbeddedArtifactLocator;
diff --git a/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/AbstractNewMavenBasedSlingApplicationWizard.java b/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/AbstractNewMavenBasedSlingApplicationWizard.java
index b2df2ea..abd590a 100644
--- a/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/AbstractNewMavenBasedSlingApplicationWizard.java
+++ b/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/AbstractNewMavenBasedSlingApplicationWizard.java
@@ -16,6 +16,8 @@
*/
package org.apache.sling.ide.eclipse.ui.wizards.np;
+import static org.apache.sling.ide.eclipse.core.progress.ProgressUtils.advance;
+
import java.util.List;
import java.util.Properties;
diff --git a/eclipse-test/pom.xml b/eclipse-test/pom.xml
index 47e864b..c1b3e4b 100644
--- a/eclipse-test/pom.xml
+++ b/eclipse-test/pom.xml
@@ -1,4 +1,20 @@
<?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
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
diff --git a/eclipse-test/src/org/apache/sling/ide/test/impl/Activator.java b/eclipse-test/src/org/apache/sling/ide/test/impl/Activator.java
index edf9f59..241e0d1 100644
--- a/eclipse-test/src/org/apache/sling/ide/test/impl/Activator.java
+++ b/eclipse-test/src/org/apache/sling/ide/test/impl/Activator.java
@@ -1,3 +1,19 @@
+/*
+ * 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.sling.ide.test.impl;
import org.apache.sling.ide.artifacts.EmbeddedArtifactLocator;
diff --git a/eclipse-test/src/org/apache/sling/ide/test/impl/ContentImportTest.java b/eclipse-test/src/org/apache/sling/ide/test/impl/ContentImportTest.java
index 0518414..332345e 100644
--- a/eclipse-test/src/org/apache/sling/ide/test/impl/ContentImportTest.java
+++ b/eclipse-test/src/org/apache/sling/ide/test/impl/ContentImportTest.java
@@ -276,6 +276,50 @@
}
+ @Test
+ public void importFullCoverageNode() throws Exception {
+
+ // create faceted project
+ IProject contentProject = projectRule.getProject();
+
+ ProjectAdapter project = new ProjectAdapter(contentProject);
+ project.addNatures(JavaCore.NATURE_ID, "org.eclipse.wst.common.project.facet.core.nature");
+
+ // install bundle facet
+ project.installFacet("sling.content", "1.0");
+
+ wstServer.waitForServerToStart();
+
+ ServerAdapter server = new ServerAdapter(wstServer.getServer());
+ server.installModule(contentProject);
+
+ project.createVltFilterWithRoots("/content/test-root");
+ project.createOrUpdateFile(Path.fromPortableString("jcr_root/content/test-root/hello.txt"),
+ new ByteArrayInputStream("hello, world".getBytes()));
+
+ // create server-side content
+ RepositoryAccessor repo = new RepositoryAccessor(config);
+ repo.doWithSession(new SessionRunnable<Void>() {
+
+ @Override
+ public Void doWithSession(Session session) throws RepositoryException {
+ Node configNode = session.getRootNode().addNode(
+ "content/test-root/org.apache.sling.example.Component.config", "sling:OsgiConfig");
+ configNode.setProperty("enabled", Boolean.TRUE.toString());
+
+ session.save();
+
+ return null;
+
+ }
+ });
+
+ runImport(contentProject);
+
+ assertThat(contentProject,
+ hasFile("jcr_root/content/test-root/org.apache.sling.example.Component.config.xml"));
+ }
+
@Before
public void setUp() throws Exception {
RepositoryAccessor repo = new RepositoryAccessor(config);
diff --git a/eclipse-test/src/org/apache/sling/ide/test/impl/SimpleServlet.java.v1.txt b/eclipse-test/src/org/apache/sling/ide/test/impl/SimpleServlet.java.v1.txt
index 448c3a8..9dd383a 100644
--- a/eclipse-test/src/org/apache/sling/ide/test/impl/SimpleServlet.java.v1.txt
+++ b/eclipse-test/src/org/apache/sling/ide/test/impl/SimpleServlet.java.v1.txt
@@ -1,5 +1,22 @@
package example;
+/*
+ * 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.
+ */
+
import java.io.*;
import javax.servlet.*;
import org.apache.sling.api.*;
diff --git a/eclipse-test/src/org/apache/sling/ide/test/impl/SimpleServlet.java.v2.txt b/eclipse-test/src/org/apache/sling/ide/test/impl/SimpleServlet.java.v2.txt
index be03133..b37b18c 100644
--- a/eclipse-test/src/org/apache/sling/ide/test/impl/SimpleServlet.java.v2.txt
+++ b/eclipse-test/src/org/apache/sling/ide/test/impl/SimpleServlet.java.v2.txt
@@ -1,5 +1,22 @@
package example;
+/*
+ * 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.
+ */
+
import java.io.*;
import javax.servlet.*;
import org.apache.sling.api.*;
diff --git a/eclipse-test/src/org/apache/sling/ide/test/impl/SimpleServlet.xml b/eclipse-test/src/org/apache/sling/ide/test/impl/SimpleServlet.xml
index df33270..ab6dc2f 100644
--- a/eclipse-test/src/org/apache/sling/ide/test/impl/SimpleServlet.xml
+++ b/eclipse-test/src/org/apache/sling/ide/test/impl/SimpleServlet.xml
@@ -1,4 +1,20 @@
<?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.
+-->
<components xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0">
<scr:component name="example.SimpleServlet">
<implementation class="example.SimpleServlet" />
diff --git a/eclipse-test/src/org/apache/sling/ide/test/impl/content-nested-structure-deleted-all-nodes.xml b/eclipse-test/src/org/apache/sling/ide/test/impl/content-nested-structure-deleted-all-nodes.xml
index cd1a0b7..2df8079 100644
--- a/eclipse-test/src/org/apache/sling/ide/test/impl/content-nested-structure-deleted-all-nodes.xml
+++ b/eclipse-test/src/org/apache/sling/ide/test/impl/content-nested-structure-deleted-all-nodes.xml
@@ -1,4 +1,20 @@
<?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:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:vlt="http://www.day.com/jcr/vault/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:mixinTypes="[mix:language]"
jcr:primaryType="sling:Folder"
diff --git a/eclipse-test/src/org/apache/sling/ide/test/impl/content-nested-structure-deleted-node.xml b/eclipse-test/src/org/apache/sling/ide/test/impl/content-nested-structure-deleted-node.xml
index 2a102ba..c4f41d0 100644
--- a/eclipse-test/src/org/apache/sling/ide/test/impl/content-nested-structure-deleted-node.xml
+++ b/eclipse-test/src/org/apache/sling/ide/test/impl/content-nested-structure-deleted-node.xml
@@ -1,4 +1,20 @@
<?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:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:vlt="http://www.day.com/jcr/vault/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:mixinTypes="[mix:language]"
jcr:primaryType="sling:Folder"
diff --git a/eclipse-test/src/org/apache/sling/ide/test/impl/content-nested-structure-reordered-nodes.xml b/eclipse-test/src/org/apache/sling/ide/test/impl/content-nested-structure-reordered-nodes.xml
index fc284f8..0a1e375 100644
--- a/eclipse-test/src/org/apache/sling/ide/test/impl/content-nested-structure-reordered-nodes.xml
+++ b/eclipse-test/src/org/apache/sling/ide/test/impl/content-nested-structure-reordered-nodes.xml
@@ -1,4 +1,20 @@
<?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:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:vlt="http://www.day.com/jcr/vault/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:mixinTypes="[mix:language]"
jcr:primaryType="sling:OrderedFolder"
diff --git a/eclipse-test/src/org/apache/sling/ide/test/impl/content-nested-structure.xml b/eclipse-test/src/org/apache/sling/ide/test/impl/content-nested-structure.xml
index a2aaeab..a5be45a 100644
--- a/eclipse-test/src/org/apache/sling/ide/test/impl/content-nested-structure.xml
+++ b/eclipse-test/src/org/apache/sling/ide/test/impl/content-nested-structure.xml
@@ -1,4 +1,20 @@
<?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:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:vlt="http://www.day.com/jcr/vault/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:mixinTypes="[mix:language]"
jcr:primaryType="sling:Folder"
diff --git a/eclipse-test/src/org/apache/sling/ide/test/impl/file-custom-mimetype.xml b/eclipse-test/src/org/apache/sling/ide/test/impl/file-custom-mimetype.xml
index ce41c3a..4ab71a0 100644
--- a/eclipse-test/src/org/apache/sling/ide/test/impl/file-custom-mimetype.xml
+++ b/eclipse-test/src/org/apache/sling/ide/test/impl/file-custom-mimetype.xml
@@ -1,3 +1,20 @@
+<?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="nt:file">
<jcr:content
diff --git a/eclipse-test/src/org/apache/sling/ide/test/impl/nt-unstructured-nodetype-with-title.xml b/eclipse-test/src/org/apache/sling/ide/test/impl/nt-unstructured-nodetype-with-title.xml
index 9949a4b..a8c3530 100644
--- a/eclipse-test/src/org/apache/sling/ide/test/impl/nt-unstructured-nodetype-with-title.xml
+++ b/eclipse-test/src/org/apache/sling/ide/test/impl/nt-unstructured-nodetype-with-title.xml
@@ -1,4 +1,20 @@
<?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:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:vlt="http://www.day.com/jcr/vault/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="nt:unstructured"
jcr:title="Some Folder">
diff --git a/eclipse-test/src/org/apache/sling/ide/test/impl/nt-unstructured-nodetype.xml b/eclipse-test/src/org/apache/sling/ide/test/impl/nt-unstructured-nodetype.xml
index 45a126f..5db7e77 100644
--- a/eclipse-test/src/org/apache/sling/ide/test/impl/nt-unstructured-nodetype.xml
+++ b/eclipse-test/src/org/apache/sling/ide/test/impl/nt-unstructured-nodetype.xml
@@ -1,4 +1,20 @@
<?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:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:vlt="http://www.day.com/jcr/vault/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="nt:unstructured">
</jcr:root>
\ No newline at end of file
diff --git a/eclipse-test/src/org/apache/sling/ide/test/impl/sling-folder-nodetype-with-title.xml b/eclipse-test/src/org/apache/sling/ide/test/impl/sling-folder-nodetype-with-title.xml
index 3cd3a5b..0458843 100644
--- a/eclipse-test/src/org/apache/sling/ide/test/impl/sling-folder-nodetype-with-title.xml
+++ b/eclipse-test/src/org/apache/sling/ide/test/impl/sling-folder-nodetype-with-title.xml
@@ -1,4 +1,20 @@
<?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:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:vlt="http://www.day.com/jcr/vault/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:Folder"
jcr:title="Some Folder">
diff --git a/eclipse-test/src/org/apache/sling/ide/test/impl/sling-folder-nodetype.xml b/eclipse-test/src/org/apache/sling/ide/test/impl/sling-folder-nodetype.xml
index 1e239ff..599ecba 100644
--- a/eclipse-test/src/org/apache/sling/ide/test/impl/sling-folder-nodetype.xml
+++ b/eclipse-test/src/org/apache/sling/ide/test/impl/sling-folder-nodetype.xml
@@ -1,4 +1,20 @@
<?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:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:vlt="http://www.day.com/jcr/vault/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:Folder">
</jcr:root>
\ No newline at end of file
diff --git a/eclipse-test/src/org/apache/sling/ide/test/impl/sling-ordered-folder-with-children-reordered.xml b/eclipse-test/src/org/apache/sling/ide/test/impl/sling-ordered-folder-with-children-reordered.xml
index 185de56..f1e2e20 100644
--- a/eclipse-test/src/org/apache/sling/ide/test/impl/sling-ordered-folder-with-children-reordered.xml
+++ b/eclipse-test/src/org/apache/sling/ide/test/impl/sling-ordered-folder-with-children-reordered.xml
@@ -1,4 +1,20 @@
<?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:sling="http://sling.apache.org/jcr/sling/1.0"
xmlns:jcr="http://www.jcp.org/jcr/1.0"
diff --git a/eclipse-test/src/org/apache/sling/ide/test/impl/sling-ordered-folder-with-children.xml b/eclipse-test/src/org/apache/sling/ide/test/impl/sling-ordered-folder-with-children.xml
index 749d7bf..2edf2f3 100644
--- a/eclipse-test/src/org/apache/sling/ide/test/impl/sling-ordered-folder-with-children.xml
+++ b/eclipse-test/src/org/apache/sling/ide/test/impl/sling-ordered-folder-with-children.xml
@@ -1,4 +1,20 @@
<?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:sling="http://sling.apache.org/jcr/sling/1.0"
xmlns:jcr="http://www.jcp.org/jcr/1.0"
diff --git a/eclipse-ui/OSGI-INF/SlingConsoleEventListener.xml b/eclipse-ui/OSGI-INF/SlingConsoleEventListener.xml
index c053872..3c59aed 100644
--- a/eclipse-ui/OSGI-INF/SlingConsoleEventListener.xml
+++ b/eclipse-ui/OSGI-INF/SlingConsoleEventListener.xml
@@ -1,4 +1,20 @@
<?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.
+-->
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0">
<implementation class="org.apache.sling.ide.eclipse.ui.internal.console.SlingConsoleEventListener" />
<service>
diff --git a/eclipse-ui/plugin.xml b/eclipse-ui/plugin.xml
index d24c9a0..e3fd34e 100644
--- a/eclipse-ui/plugin.xml
+++ b/eclipse-ui/plugin.xml
@@ -1,4 +1,20 @@
<?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.
+-->
<?eclipse version="3.0"?>
<plugin>
diff --git a/eclipse-ui/pom.xml b/eclipse-ui/pom.xml
index d812ff2..710f035 100644
--- a/eclipse-ui/pom.xml
+++ b/eclipse-ui/pom.xml
@@ -1,4 +1,20 @@
<?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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
diff --git a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/actions/NewNodeDialog.java b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/actions/NewNodeDialog.java
index 6bc26f9..6e5ed7b 100644
--- a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/actions/NewNodeDialog.java
+++ b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/actions/NewNodeDialog.java
@@ -1,3 +1,19 @@
+/*
+ * 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.sling.ide.eclipse.ui.actions;
import java.util.Collection;
diff --git a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/internal/ExportContentAction.java b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/internal/ExportContentAction.java
index ed5d6c6..b416f14 100644
--- a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/internal/ExportContentAction.java
+++ b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/internal/ExportContentAction.java
@@ -1,3 +1,19 @@
+/*
+ * 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.sling.ide.eclipse.ui.internal;
import java.util.Iterator;
diff --git a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/internal/ImportRepositoryContentAction.java b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/internal/ImportRepositoryContentAction.java
index 14ba074..9ab8e99 100644
--- a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/internal/ImportRepositoryContentAction.java
+++ b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/internal/ImportRepositoryContentAction.java
@@ -32,6 +32,7 @@
import org.apache.sling.ide.eclipse.core.ResourceUtil;
import org.apache.sling.ide.eclipse.core.ServerUtil;
import org.apache.sling.ide.eclipse.core.debug.PluginLogger;
+import org.apache.sling.ide.eclipse.core.progress.ProgressUtils;
import org.apache.sling.ide.filter.Filter;
import org.apache.sling.ide.filter.FilterResult;
import org.apache.sling.ide.filter.IgnoredResources;
@@ -54,6 +55,7 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.wst.server.core.IServer;
// intentionally does not implement IRunnableWithProgress to cut dependency on JFace
@@ -67,6 +69,11 @@
private SerializationManager serializationManager;
private SerializationDataBuilder builder;
private IgnoredResources ignoredResources;
+ private IProgressMonitor monitor;
+ private Repository repository;
+ private Filter filter;
+ private File contentSyncRoot;
+ private IFolder contentSyncRootDir;
/**
* @param server
@@ -86,17 +93,17 @@
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException,
SerializationException, CoreException {
- Repository repository;
- try {
- repository = ServerUtil.getConnectedRepository(server, monitor);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
+
+ // TODO: We should try to make this give 'nice' progress feedback (aka here's what I'm processing)
+ monitor.beginTask("Repository import", IProgressMonitor.UNKNOWN);
+
+ this.monitor = monitor;
+
+ repository = ServerUtil.getConnectedRepository(server, monitor);
this.builder = serializationManager.newBuilder(
repository, ProjectUtil.getSyncDirectoryFile(project));
- monitor.setTaskName("Loading configuration...");
ISlingLaunchpadServer launchpad = (ISlingLaunchpadServer) server.loadAdapter(
ISlingLaunchpadServer.class, monitor);
@@ -117,22 +124,22 @@
throw new InvocationTargetException(e1);
}
- Filter filter = ProjectUtil.loadFilter(project);
+ filter = ProjectUtil.loadFilter(project);
- monitor.worked(5);
+ ProgressUtils.advance(monitor, 1);
try {
- // TODO: We should try to make this give 'nice' progress feedback (aka here's what I'm
- // processing)
- monitor.setTaskName("Importing...");
- monitor.worked(10);
-
- IFolder syncDir = ProjectUtil.getSyncDirectory(project);
- IPath repositoryImportRoot = projectRelativePath.makeRelativeTo(syncDir.getProjectRelativePath())
+ contentSyncRootDir = ProjectUtil.getSyncDirectory(project);
+ IPath repositoryImportRoot = projectRelativePath
+ .makeRelativeTo(contentSyncRootDir.getProjectRelativePath())
.makeAbsolute();
- readVltIgnoresNotUnderImportRoot(syncDir, repositoryImportRoot);
+ contentSyncRoot = ProjectUtil.getSyncDirectoryFullPath(project).toFile();
+
+ readVltIgnoresNotUnderImportRoot(contentSyncRootDir, repositoryImportRoot);
+
+ ProgressUtils.advance(monitor, 1);
Activator
.getDefault()
@@ -140,11 +147,10 @@
.trace("Starting import; repository start point is {0}, workspace start point is {1}",
repositoryImportRoot, projectRelativePath);
- crawlChildrenAndImport(repository, filter, repositoryImportRoot.toPortableString(), project,
- projectRelativePath);
+ crawlChildrenAndImport(repositoryImportRoot.toPortableString());
- monitor.setTaskName("Import Complete");
- monitor.worked(100);
+ } catch (OperationCanceledException e) {
+ throw e;
} catch (Exception e) {
throw new InvocationTargetException(e);
} finally {
@@ -175,12 +181,7 @@
/**
* Crawls the repository and recursively imports founds resources
- *
- * @param repository the sling repository to import from
- * @param filter
* @param path the current path to import from
- * @param project the project to create resources in
- * @param projectRelativePath the path, relative to the project root, where the resources should be created
* @param tracer
* @throws JSONException
* @throws RepositoryException
@@ -188,42 +189,34 @@
* @throws IOException
*/
// TODO: This probably should be pushed into the service layer
- private void crawlChildrenAndImport(Repository repository, Filter filter, String path,
- IProject project, IPath projectRelativePath)
+ private void crawlChildrenAndImport(String path)
throws RepositoryException, CoreException, IOException, SerializationException {
- File contentSyncRoot = ProjectUtil.getSyncDirectoryFullPath(project).toFile();
- IFolder contentSyncRootDir = ProjectUtil.getSyncDirectory(project);
-
logger.trace("crawlChildrenAndImport({0}, {1}, {2}, {3}", repository, path, project, projectRelativePath);
ResourceProxy resource = executeCommand(repository.newListChildrenNodeCommand(path));
-
- // TODO we should know all node types for which to create files and folders
+
SerializationData serializationData = builder.buildSerializationData(contentSyncRoot, resource);
logger.trace("For resource at path {0} got serialization data {1}", resource.getPath(), serializationData);
final List<ResourceProxy> resourceChildren = new LinkedList<ResourceProxy>(resource.getChildren());
if (serializationData != null) {
- IPath fileOrFolderPath = contentSyncRootDir.getProjectRelativePath().append(
- serializationData.getFileOrFolderNameHint());
+ IPath serializationFolderPath = contentSyncRootDir.getProjectRelativePath().append(
+ serializationData.getFolderPath());
switch (serializationData.getSerializationKind()) {
case FILE: {
byte[] contents = executeCommand(repository.newGetNodeCommand(path));
- importFile(project, fileOrFolderPath, contents);
+ createFile(project, getPathForPlainFileNode(resource, serializationFolderPath), contents);
if (serializationData.hasContents()) {
- // TODO - should we abstract out .dir serialization?
- IPath directoryPath = fileOrFolderPath.addFileExtension("dir");
- createFolder(project, directoryPath);
- createFile(project, directoryPath.append(serializationData.getNameHint()),
+ createFolder(project, serializationFolderPath);
+ createFile(project, serializationFolderPath.append(serializationData.getFileName()),
serializationData.getContents());
- // filter out the child of type Repository.NT_RESOURCE
- for (Iterator<ResourceProxy> it = resourceChildren.iterator(); it
- .hasNext();) {
+ // special processing for nt:resource nodes
+ for (Iterator<ResourceProxy> it = resourceChildren.iterator(); it.hasNext();) {
ResourceProxy child = it.next();
if (Repository.NT_RESOURCE.equals(child.getProperties().get(Repository.JCR_PRIMARY_TYPE))) {
@@ -236,17 +229,14 @@
.size());
if (reloadedChildResource.getChildren().size() != 0) {
- // 1. create holder directory ; needs platform name format
String pathName = Text.getName(reloadedChildResource.getPath());
pathName = serializationManager.getOsPath(pathName);
-
- createFolder(project, directoryPath.append(pathName));
+ createFolder(project, serializationFolderPath.append(pathName));
// 2. recursively handle all resources
for (ResourceProxy grandChild : reloadedChildResource.getChildren()) {
- crawlChildrenAndImport(repository, filter, grandChild.getPath(), project,
- projectRelativePath);
+ crawlChildrenAndImport(grandChild.getPath());
}
}
@@ -260,12 +250,12 @@
case FOLDER:
case METADATA_PARTIAL: {
- IFolder folder = createFolder(project, fileOrFolderPath);
+ IFolder folder = createFolder(project, serializationFolderPath);
parseIgnoreFiles(folder, path);
if (serializationData.hasContents()) {
- createFile(project, fileOrFolderPath.append(serializationData.getNameHint()),
+ createFile(project, serializationFolderPath.append(serializationData.getFileName()),
serializationData.getContents());
}
break;
@@ -273,7 +263,8 @@
case METADATA_FULL: {
if (serializationData.hasContents()) {
- createFile(project, fileOrFolderPath, serializationData.getContents());
+ createFile(project, serializationFolderPath.append(serializationData.getFileName()),
+ serializationData.getContents());
}
break;
}
@@ -284,7 +275,11 @@
if (serializationData.getSerializationKind() == SerializationKind.METADATA_FULL) {
return;
}
+ } else {
+ logger.trace("No serialization data found for {0}", resource.getPath());
}
+
+ ProgressUtils.advance(monitor, 1);
for (ResourceProxy child : resourceChildren) {
@@ -300,10 +295,27 @@
}
}
- crawlChildrenAndImport(repository, filter, child.getPath(), project, projectRelativePath);
+ crawlChildrenAndImport(child.getPath());
}
}
+ /**
+ * Returns the path for serializing the nt:resource data of a nt:file node
+ *
+ * <p>
+ * The path will be one level above the <tt>serializationFolderPath</tt>, and the name will be the last path segment
+ * of the resource.
+ * </p>
+ *
+ * @param resource The resource
+ * @param serializationFolderPath the folder where the serialization data should be stored
+ * @return the path for the plain file node
+ */
+ private IPath getPathForPlainFileNode(ResourceProxy resource, IPath serializationFolderPath) {
+
+ return serializationFolderPath.removeLastSegments(1).append(Text.getName(resource.getPath()));
+ }
+
private void parseIgnoreFiles(IFolder folder, String path) throws IOException, CoreException {
// TODO - the parsing should be extracted
IResource vltIgnore = folder.findMember(".vltignore");
@@ -330,12 +342,6 @@
return result.get();
}
- private void importFile(IProject project, IPath destinationPath, byte[] content)
- throws CoreException {
-
- createFile(project, destinationPath, content);
- }
-
private IFolder createFolder(IProject project, IPath destinationPath) throws CoreException {
IFolder destinationFolder = project.getFolder(destinationPath);
@@ -382,7 +388,7 @@
}
createParents(container.getParent());
IFolder parentFolder = (IFolder)container;
- parentFolder.create(true, true, null);
+ parentFolder.create(true, true, null);
}
}
\ No newline at end of file
diff --git a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/internal/SelectionUtils.java b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/internal/SelectionUtils.java
index 1ac80d1..36b9912 100644
--- a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/internal/SelectionUtils.java
+++ b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/internal/SelectionUtils.java
@@ -53,15 +53,13 @@
}
List<IServer> servers = new ArrayList<IServer>();
- IModule module = ServerUtil.getModule(project);
-
- if (module == null) {
- return Collections.emptyList();
- }
+ IModule[] modules = ServerUtil.getModules(project);
for (IServer server : ServerCore.getServers()) {
- if (ServerUtil.containsModule(server, module, monitor)) {
- servers.add(server);
+ for (IModule module : modules) {
+ if (ServerUtil.containsModule(server, module, monitor)) {
+ servers.add(server);
+ }
}
}
diff --git a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/propertyPages/SlingProjectPropertyPage.java b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/propertyPages/SlingProjectPropertyPage.java
index 19b3c4b..dd62465 100644
--- a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/propertyPages/SlingProjectPropertyPage.java
+++ b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/propertyPages/SlingProjectPropertyPage.java
@@ -1,3 +1,19 @@
+/*
+ * 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.sling.ide.eclipse.ui.propertyPages;
import java.util.List;
diff --git a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/AbstractNewSlingApplicationWizard.java b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/AbstractNewSlingApplicationWizard.java
index bc93b25..499dfe2 100644
--- a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/AbstractNewSlingApplicationWizard.java
+++ b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/AbstractNewSlingApplicationWizard.java
@@ -1,22 +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
*
- * ADOBE CONFIDENTIAL
- * __________________
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Copyright 2014 Adobe Systems Incorporated
- * All Rights Reserved.
- *
- * NOTICE: All information contained herein is, and remains
- * the property of Adobe Systems Incorporated and its suppliers,
- * if any. The intellectual and technical concepts contained
- * herein are proprietary to Adobe Systems Incorporated and its
- * suppliers and are protected by trade secret or copyright law.
- * Dissemination of this information or reproduction of this material
- * is strictly forbidden unless prior written permission is obtained
- * from Adobe Systems Incorporated.
- **************************************************************************/
+ * 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.sling.ide.eclipse.ui.wizards;
+import static org.apache.sling.ide.eclipse.core.progress.ProgressUtils.advance;
+
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.LinkedList;
@@ -29,7 +30,6 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.ILaunchManager;
@@ -221,14 +221,6 @@
// nothing to be done
}
- protected void advance(IProgressMonitor monitor, int step) {
-
- monitor.worked(step);
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
- }
-
protected void finishConfiguration(List<IProject> projects, IServer server, IProgressMonitor monitor)
throws CoreException {
// nothing to be done by default - hook for subclasses
diff --git a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/ImportWizard.java b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/ImportWizard.java
index 2c759ac..f145c52 100644
--- a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/ImportWizard.java
+++ b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/ImportWizard.java
@@ -29,6 +29,7 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
@@ -87,13 +88,15 @@
};
try {
- getContainer().run(false, true, runnable);
+ getContainer().run(true, true, runnable);
} catch (InvocationTargetException e) {
Throwable cause = e.getCause();
mainPage.setErrorMessage("Import error : " + cause.getMessage()
+ " . Please see the error log for details.");
Activator.getDefault().getPluginLogger().error("Repository import failed", cause);
return false;
+ } catch (OperationCanceledException e) {
+ System.out.println("Here");
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
return false;
diff --git a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/NewNodeWizard.java b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/NewNodeWizard.java
index a01d4be..905a909 100644
--- a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/NewNodeWizard.java
+++ b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/NewNodeWizard.java
@@ -1,3 +1,19 @@
+/*
+ * 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.sling.ide.eclipse.ui.wizards;
import java.io.ByteArrayInputStream;
diff --git a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/NewNodeWizardPage.java b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/NewNodeWizardPage.java
index 5e3b3d9..b69eecf 100644
--- a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/NewNodeWizardPage.java
+++ b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/NewNodeWizardPage.java
@@ -1,3 +1,19 @@
+/*
+ * 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.sling.ide.eclipse.ui.wizards;
import org.eclipse.core.resources.IContainer;
diff --git a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/NewSlingContentProjectWizard.java b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/NewSlingContentProjectWizard.java
index a51b6e9..c911492 100644
--- a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/NewSlingContentProjectWizard.java
+++ b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/NewSlingContentProjectWizard.java
@@ -16,6 +16,8 @@
*/
package org.apache.sling.ide.eclipse.ui.wizards;
+import static org.apache.sling.ide.eclipse.core.progress.ProgressUtils.advance;
+
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collections;
diff --git a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/res/.content.xml b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/res/.content.xml
index 1d5ec63..995739d 100644
--- a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/res/.content.xml
+++ b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/res/.content.xml
@@ -1,4 +1,20 @@
<?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:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="nt:unstructured"
jcr:title="First node"
diff --git a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/res/folder.content.xml b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/res/folder.content.xml
index 1e239ff..599ecba 100644
--- a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/res/folder.content.xml
+++ b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/res/folder.content.xml
@@ -1,4 +1,20 @@
<?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:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:vlt="http://www.day.com/jcr/vault/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:Folder">
</jcr:root>
\ No newline at end of file
diff --git a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/res/settings.xml b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/res/settings.xml
index ca12e0f..711777a 100644
--- a/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/res/settings.xml
+++ b/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/res/settings.xml
@@ -1,4 +1,20 @@
<?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.
+-->
<vault version="1.0">
<ignore name=".svn"/>
</vault>
\ No newline at end of file
diff --git a/feature/feature.xml b/feature/feature.xml
index 5287fc7..d32ea99 100644
--- a/feature/feature.xml
+++ b/feature/feature.xml
@@ -1,4 +1,20 @@
<?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.
+-->
<feature
id="org.apache.sling.ide.feature"
label="Sling IDE Tools"
diff --git a/feature/pom.xml b/feature/pom.xml
index 68507f9..9a34d2e 100644
--- a/feature/pom.xml
+++ b/feature/pom.xml
@@ -1,4 +1,20 @@
<?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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
diff --git a/impl-resource-test/pom.xml b/impl-resource-test/pom.xml
index d2669e2..32267d6 100644
--- a/impl-resource-test/pom.xml
+++ b/impl-resource-test/pom.xml
@@ -1,3 +1,19 @@
+<!--
+ 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>
<parent>
diff --git a/impl-resource-test/src/test/resources/org/apache/sling/ide/impl/resource/serialization/SimpleXmlSerializationManagerTest.serializedDataIsEscaped.xml b/impl-resource-test/src/test/resources/org/apache/sling/ide/impl/resource/serialization/SimpleXmlSerializationManagerTest.serializedDataIsEscaped.xml
index 1b671d0..c2f0206 100644
--- a/impl-resource-test/src/test/resources/org/apache/sling/ide/impl/resource/serialization/SimpleXmlSerializationManagerTest.serializedDataIsEscaped.xml
+++ b/impl-resource-test/src/test/resources/org/apache/sling/ide/impl/resource/serialization/SimpleXmlSerializationManagerTest.serializedDataIsEscaped.xml
@@ -1,4 +1,20 @@
<?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.
+-->
<resource>
<property name="jcr:description"><p class="active">Welcome</p></property>
</resource>
diff --git a/impl-resource-test/src/test/resources/org/apache/sling/ide/impl/resource/serialization/SimpleXmlSerializationManagerTest.stringSerializedData.xml b/impl-resource-test/src/test/resources/org/apache/sling/ide/impl/resource/serialization/SimpleXmlSerializationManagerTest.stringSerializedData.xml
index 76a8184..15a2e9c 100644
--- a/impl-resource-test/src/test/resources/org/apache/sling/ide/impl/resource/serialization/SimpleXmlSerializationManagerTest.stringSerializedData.xml
+++ b/impl-resource-test/src/test/resources/org/apache/sling/ide/impl/resource/serialization/SimpleXmlSerializationManagerTest.stringSerializedData.xml
@@ -1,4 +1,20 @@
<?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.
+-->
<resource>
<property name="jcr:createdBy">admin</property>
<property name="jcr:lastModifiedBy">author</property>
diff --git a/impl-resource/OSGI-INF/RepositoryFactoryImpl.xml b/impl-resource/OSGI-INF/RepositoryFactoryImpl.xml
index cc218cf..39fcdaa 100644
--- a/impl-resource/OSGI-INF/RepositoryFactoryImpl.xml
+++ b/impl-resource/OSGI-INF/RepositoryFactoryImpl.xml
@@ -1,4 +1,20 @@
<?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.
+-->
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="false">
<implementation class="org.apache.sling.ide.impl.resource.transport.RepositoryFactoryImpl"/>
<service>
diff --git a/impl-resource/OSGI-INF/SimpleFilterLocator.xml b/impl-resource/OSGI-INF/SimpleFilterLocator.xml
index 17cffc9..9ea7b60 100644
--- a/impl-resource/OSGI-INF/SimpleFilterLocator.xml
+++ b/impl-resource/OSGI-INF/SimpleFilterLocator.xml
@@ -1,4 +1,20 @@
<?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.
+-->
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="false">
<implementation class="org.apache.sling.ide.impl.resource.filer.SimpleFilterLocator"/>
<service>
diff --git a/impl-resource/OSGI-INF/SimpleXmlSerializationManager.xml b/impl-resource/OSGI-INF/SimpleXmlSerializationManager.xml
index 6293da1..e03ba83 100644
--- a/impl-resource/OSGI-INF/SimpleXmlSerializationManager.xml
+++ b/impl-resource/OSGI-INF/SimpleXmlSerializationManager.xml
@@ -1,4 +1,20 @@
<?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.
+-->
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="false">
<implementation class="org.apache.sling.ide.impl.resource.serialization.SimpleXmlSerializationManager"/>
<service>
diff --git a/impl-resource/pom.xml b/impl-resource/pom.xml
index 1482f87..24bf426 100644
--- a/impl-resource/pom.xml
+++ b/impl-resource/pom.xml
@@ -1,4 +1,20 @@
<?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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
diff --git a/impl-vlt-test/pom.xml b/impl-vlt-test/pom.xml
index 418fb8f..2b86284 100644
--- a/impl-vlt-test/pom.xml
+++ b/impl-vlt-test/pom.xml
@@ -1,3 +1,19 @@
+<!--
+ 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>
<parent>
diff --git a/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/binary-property.xml b/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/binary-property.xml
index 68f463d..6ff3544 100644
--- a/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/binary-property.xml
+++ b/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/binary-property.xml
@@ -1,4 +1,20 @@
<?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:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="nt:unstructured"
bin="{Binary}"/>
\ No newline at end of file
diff --git a/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/encoded-child-content.xml b/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/encoded-child-content.xml
index 1fc766b..b55ec3a 100644
--- a/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/encoded-child-content.xml
+++ b/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/encoded-child-content.xml
@@ -1,4 +1,20 @@
<?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:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="nt:unstructured"
sling:resourceType="sling:redirect"
diff --git a/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/file.xml b/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/file.xml
index 9834f52..421f1b6 100644
--- a/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/file.xml
+++ b/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/file.xml
@@ -1,3 +1,19 @@
+<!--
+ 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.
+-->
<root>
<child1></child1>
<child2/>
diff --git a/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/full-coverage-escaped-names.xml b/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/full-coverage-escaped-names.xml
index 6d1a10d..28099e3 100644
--- a/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/full-coverage-escaped-names.xml
+++ b/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/full-coverage-escaped-names.xml
@@ -1,4 +1,20 @@
<?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:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:vlt="http://www.day.com/jcr/vault/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:mixinTypes="[vlt:FullCoverage]"
jcr:primaryType="sling:Folder">
diff --git a/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/full-coverage.xml b/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/full-coverage.xml
index 4cb07d4..07b29f7 100644
--- a/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/full-coverage.xml
+++ b/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/full-coverage.xml
@@ -1,4 +1,20 @@
<?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:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:vlt="http://www.day.com/jcr/vault/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:mixinTypes="[vlt:FullCoverage]"
jcr:primaryType="sling:Folder"
diff --git a/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/multivalued-properties-content.xml b/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/multivalued-properties-content.xml
index eed3558..b056c6b 100644
--- a/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/multivalued-properties-content.xml
+++ b/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/multivalued-properties-content.xml
@@ -1,4 +1,20 @@
<?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="nt:unstructured"
dates="{Date}[2013-09-01T00:00:00.000+03:00,2013-09-04T00:00:00.000+03:00]"
diff --git a/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/root-content.xml b/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/root-content.xml
index 1e35bae..b80c99b 100644
--- a/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/root-content.xml
+++ b/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/root-content.xml
@@ -1,4 +1,20 @@
<?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:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal"
jcr:mixinTypes="[rep:AccessControllable]"
jcr:primaryType="rep:root"
diff --git a/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/simple-content.xml b/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/simple-content.xml
index 5dd541b..b573368 100644
--- a/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/simple-content.xml
+++ b/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/simple-content.xml
@@ -1,4 +1,20 @@
<?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:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:Folder"
jcr:title="Application folder"
diff --git a/impl-vlt/OSGI-INF/VaultFsLocatorImpl.xml b/impl-vlt/OSGI-INF/VaultFsLocatorImpl.xml
index 503dc19..c981e50 100644
--- a/impl-vlt/OSGI-INF/VaultFsLocatorImpl.xml
+++ b/impl-vlt/OSGI-INF/VaultFsLocatorImpl.xml
@@ -1,4 +1,20 @@
<?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.
+-->
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="false">
<implementation class="org.apache.sling.ide.impl.vlt.VaultFsLocatorImpl"/>
<service>
diff --git a/impl-vlt/OSGI-INF/VltFilterLocator.xml b/impl-vlt/OSGI-INF/VltFilterLocator.xml
index f98585a..98b7881 100644
--- a/impl-vlt/OSGI-INF/VltFilterLocator.xml
+++ b/impl-vlt/OSGI-INF/VltFilterLocator.xml
@@ -1,4 +1,20 @@
<?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.
+-->
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="false">
<implementation class="org.apache.sling.ide.impl.vlt.filter.VltFilterLocator"/>
<reference bind="bindVaultFsLocator" cardinality="1..1" interface="org.apache.sling.ide.impl.vlt.VaultFsLocator" name="VaultFsLocator" policy="static" unbind="unbindVaultFsLocator"/>
diff --git a/impl-vlt/OSGI-INF/VltRepositoryFactory.xml b/impl-vlt/OSGI-INF/VltRepositoryFactory.xml
index b1a0bc8..a97b2de 100644
--- a/impl-vlt/OSGI-INF/VltRepositoryFactory.xml
+++ b/impl-vlt/OSGI-INF/VltRepositoryFactory.xml
@@ -1,4 +1,20 @@
<?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.
+-->
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="false">
<implementation class="org.apache.sling.ide.impl.vlt.VltRepositoryFactory"/>
<reference bind="bindEventAdmin" cardinality="1..1" interface="org.osgi.service.event.EventAdmin" name="EventAdmin" policy="static" unbind="unbindEventAdmin"/>
diff --git a/impl-vlt/OSGI-INF/VltSerializationManagerImpl.xml b/impl-vlt/OSGI-INF/VltSerializationManagerImpl.xml
index 1fd377c..4af9c30 100644
--- a/impl-vlt/OSGI-INF/VltSerializationManagerImpl.xml
+++ b/impl-vlt/OSGI-INF/VltSerializationManagerImpl.xml
@@ -1,4 +1,20 @@
<?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.
+-->
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="false">
<implementation class="org.apache.sling.ide.impl.vlt.serialization.VltSerializationManager"/>
<service>
diff --git a/impl-vlt/plugin.xml b/impl-vlt/plugin.xml
index b984b28..9b79e21 100644
--- a/impl-vlt/plugin.xml
+++ b/impl-vlt/plugin.xml
@@ -1,4 +1,20 @@
<?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.
+-->
<?eclipse version="3.0"?>
<plugin>
<extension
diff --git a/impl-vlt/pom.xml b/impl-vlt/pom.xml
index 8959a71..0452c9e 100644
--- a/impl-vlt/pom.xml
+++ b/impl-vlt/pom.xml
@@ -1,4 +1,20 @@
<?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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
diff --git a/impl-vlt/src/org/apache/sling/ide/impl/vlt/VltRepository.java b/impl-vlt/src/org/apache/sling/ide/impl/vlt/VltRepository.java
index 2a89c81..4a55b3e 100644
--- a/impl-vlt/src/org/apache/sling/ide/impl/vlt/VltRepository.java
+++ b/impl-vlt/src/org/apache/sling/ide/impl/vlt/VltRepository.java
@@ -1,3 +1,19 @@
+/*
+ * 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.sling.ide.impl.vlt;
import javax.jcr.Credentials;
diff --git a/impl-vlt/src/org/apache/sling/ide/impl/vlt/serialization/VltSerializationDataBuilder.java b/impl-vlt/src/org/apache/sling/ide/impl/vlt/serialization/VltSerializationDataBuilder.java
index 0234342..2b17461 100644
--- a/impl-vlt/src/org/apache/sling/ide/impl/vlt/serialization/VltSerializationDataBuilder.java
+++ b/impl-vlt/src/org/apache/sling/ide/impl/vlt/serialization/VltSerializationDataBuilder.java
@@ -20,14 +20,18 @@
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
+import java.util.ListIterator;
import javax.jcr.Credentials;
import javax.jcr.Node;
+import javax.jcr.PathNotFoundException;
import javax.jcr.Repository;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
import javax.jcr.Value;
+import javax.jcr.ValueFormatException;
import javax.jcr.nodetype.NodeType;
import org.apache.jackrabbit.vault.fs.api.Aggregate;
@@ -104,96 +108,37 @@
@Override
public SerializationData buildSerializationData(File contentSyncRoot, ResourceProxy resource) throws SerializationException {
- // TODO - there is a small mismatch here since we're doing remote calls to the repository
- // but taking a resourceProxy - not sure if we'll run into problems down the road or not
-
try {
- AggregateWrapper wrapper = findAggregate(resource);
+ List<Aggregate> chain = findAggregateChain(resource);
- if (wrapper == null || wrapper.aggregate == null) {
- //TODO: there are valid cases apparently when aggregate is null and yet there
- // are children which must be honored.. so we can't throw an exception here
- // but we should review why this aggregate is null here and if that's valid.
- System.err.println("No aggregate found for path " + resource.getPath());
+ if (chain == null) {
return null;
}
- String fileOrFolderPathHint;
- if (wrapper.parent == null) {
- fileOrFolderPathHint = PlatformNameFormat.getPlatformPath(wrapper.aggregate.getPath());
- } else {
- fileOrFolderPathHint = PlatformNameFormat.getPlatformPath(wrapper.parent.getPath()) + ".dir"
- + File.separatorChar + PlatformNameFormat.getPlatformPath(wrapper.aggregate.getRelPath());
- }
+ Aggregate aggregate = chain.get(chain.size() - 1);
- Activator.getDefault().getPluginLogger()
- .trace("Got location {0} for path {1}", fileOrFolderPathHint, resource.getPath());
- String nameHint = PlatformNameFormat.getPlatformName(wrapper.aggregate.getName());
+ String fileOrFolderPathHint = calculateFileOrFolderPathHint(chain);
+ String nameHint = PlatformNameFormat.getPlatformName(aggregate.getName());
- NodeType[] mixinNodeTypes = wrapper.aggregate.getNode().getMixinNodeTypes();
- List<String> mixinNodeTypeNames = new ArrayList<String>(mixinNodeTypes.length);
- for (NodeType nodeType : mixinNodeTypes)
- mixinNodeTypeNames.add(nodeType.getName());
-
- SerializationKind serializationKind = skm.getSerializationKind(wrapper.aggregate.getNode()
- .getPrimaryNodeType()
- .getName(), mixinNodeTypeNames);
+ SerializationKind serializationKind = getSerializationKind(aggregate);
if (resource.getPath().equals("/") || serializationKind == SerializationKind.METADATA_PARTIAL
|| serializationKind == SerializationKind.FILE || serializationKind == SerializationKind.FOLDER) {
nameHint = Constants.DOT_CONTENT_XML;
+ } else if (serializationKind == SerializationKind.METADATA_FULL) {
+ nameHint += ".xml";
}
- Aggregator aggregator = fs.getAggregateManager().getAggregator(wrapper.aggregate.getNode(), null);
- if (aggregator instanceof FileAggregator) {
- // TODO - copy-pasted from FileAggregator, and really does not belong here...
- Node content = wrapper.aggregate.getNode();
- if (content.isNodeType(JcrConstants.NT_FILE)) {
- content = content.getNode(JcrConstants.JCR_CONTENT);
- }
- String mimeType = null;
- if (content.hasProperty(JcrConstants.JCR_MIMETYPE)) {
- try {
- mimeType = content.getProperty(JcrConstants.JCR_MIMETYPE).getString();
- } catch (RepositoryException e) {
- // ignore
- }
- }
- if (mimeType == null) {
- // guess mime type from name
- mimeType = MimeTypes.getMimeType(wrapper.aggregate.getNode().getName(),
- MimeTypes.APPLICATION_OCTET_STREAM);
- }
+ Activator.getDefault().getPluginLogger()
+ .trace("Got location {0} for path {1}", fileOrFolderPathHint, resource.getPath());
- boolean needsDir = !MimeTypes.matches(wrapper.aggregate.getNode().getName(), mimeType,
- MimeTypes.APPLICATION_OCTET_STREAM);
-
- if (!needsDir) {
- if (content.hasProperty(JcrConstants.JCR_MIXINTYPES)) {
- for (Value v : content.getProperty(JcrConstants.JCR_MIXINTYPES).getValues()) {
- if (!v.getString().equals(JcrConstants.MIX_LOCKABLE)) {
- needsDir = true;
- break;
- }
- }
- }
- }
-
- if (!needsDir) {
- return SerializationData.empty(fileOrFolderPathHint, serializationKind);
- }
- } else if (aggregator instanceof GenericAggregator) {
- // TODO - copy-pasted from GenericAggregator
- if (wrapper.aggregate.getNode().getPrimaryNodeType().getName().equals("nt:folder")
- && wrapper.aggregate.getNode().getMixinNodeTypes().length == 0) {
- return SerializationData.empty(fileOrFolderPathHint, serializationKind);
- }
+ if (!needsDir(aggregate)) {
+ return SerializationData.empty(fileOrFolderPathHint, serializationKind);
}
-
- DocViewSerializer s = new DocViewSerializer(wrapper.aggregate);
+ DocViewSerializer s = new DocViewSerializer(aggregate);
ByteArrayOutputStream out = new ByteArrayOutputStream();
s.writeContent(out);
@@ -208,49 +153,189 @@
}
}
- private AggregateWrapper findAggregate(ResourceProxy resource) throws IOException, RepositoryException {
+ private SerializationKind getSerializationKind(Aggregate aggregate) throws RepositoryException {
- VaultFile vaultFile = fs.getFile(resource.getPath());
- String platformPath = resource.getPath();
+ NodeType[] mixinNodeTypes = aggregate.getNode().getMixinNodeTypes();
+ List<String> mixinNodeTypeNames = new ArrayList<String>(mixinNodeTypes.length);
+ for (NodeType nodeType : mixinNodeTypes)
+ mixinNodeTypeNames.add(nodeType.getName());
- if (vaultFile == null) {
+ return skm.getSerializationKind(aggregate.getNode()
+ .getPrimaryNodeType()
+ .getName(), mixinNodeTypeNames);
+ }
- // TODO - not sure why we need to try both ... not a performance impact but ugly nonetheless
- platformPath = PlatformNameFormat.getPlatformPath(resource.getPath()) + VltSerializationManager.EXTENSION_XML;
- vaultFile = fs.getFile(platformPath);
+ private boolean needsDir(Aggregate aggregate) throws RepositoryException, PathNotFoundException,
+ ValueFormatException {
- if (vaultFile == null) {
- platformPath = PlatformNameFormat.getPlatformPath(resource.getPath());
- vaultFile = fs.getFile(platformPath);
+ Aggregator aggregator = fs.getAggregateManager().getAggregator(aggregate.getNode(), null);
+ boolean needsDir = true;
+ if (aggregator instanceof FileAggregator) {
+ needsDir = false;
+ // TODO - copy-pasted from FileAggregator, and really does not belong here...
+ Node content = aggregate.getNode();
+ if (content.isNodeType(JcrConstants.NT_FILE)) {
+ content = content.getNode(JcrConstants.JCR_CONTENT);
+ }
+ String mimeType = null;
+ if (content.hasProperty(JcrConstants.JCR_MIMETYPE)) {
+ try {
+ mimeType = content.getProperty(JcrConstants.JCR_MIMETYPE).getString();
+ } catch (RepositoryException e) {
+ // ignore
+ }
+ }
+ if (mimeType == null) {
+ // guess mime type from name
+ mimeType = MimeTypes.getMimeType(aggregate.getNode().getName(),
+ MimeTypes.APPLICATION_OCTET_STREAM);
}
- if (vaultFile == null) {
- // TODO proper logging ; discover if this is expected or not and fail hard if it's not
- // this file might be a leaf aggregate of a vaultfile higher in the resource path ; so look for a
- // parent higher
+ needsDir = !MimeTypes.matches(aggregate.getNode().getName(), mimeType,
+ MimeTypes.APPLICATION_OCTET_STREAM);
- String parentPath = Text.getRelativeParent(resource.getPath(), 1);
- while (!parentPath.equals("/")) {
- VaultFile parentFile = fs.getFile(parentPath);
- if (parentFile != null && parentFile.getAggregate() != null
- && parentFile.getAggregate().getLeaves() != null) {
- for (Aggregate leaf : parentFile.getAggregate().getLeaves()) {
- if (leaf.getPath().equals(resource.getPath())) {
-
- return new AggregateWrapper(leaf, parentFile.getAggregate());
- }
+ if (!needsDir) {
+ if (content.hasProperty(JcrConstants.JCR_MIXINTYPES)) {
+ for (Value v : content.getProperty(JcrConstants.JCR_MIXINTYPES).getValues()) {
+ if (!v.getString().equals(JcrConstants.MIX_LOCKABLE)) {
+ needsDir = true;
+ break;
}
}
+ }
+ }
- parentPath = Text.getRelativeParent(parentPath, 1);
+ // TODO - copy-pasted from GenericAggregator
+ } else if (aggregator instanceof GenericAggregator) {
+ if (isPlainNtFolder(aggregate)) {
+ needsDir = false;
+ }
+ }
+ return needsDir;
+ }
+
+ private String calculateFileOrFolderPathHint(List<Aggregate> chain) throws RepositoryException {
+
+ ListIterator<Aggregate> aggs = chain.listIterator();
+ StringBuilder out = new StringBuilder();
+ while (aggs.hasNext()) {
+ Aggregate cur = aggs.next();
+ if (aggs.previousIndex() == 0) {
+ out.append(PlatformNameFormat.getPlatformPath(cur.getPath()));
+ } else {
+ out.append("/");
+ out.append(PlatformNameFormat.getPlatformPath(cur.getRelPath()));
+ }
+
+ if (needsDir(cur)) {
+ SerializationKind serializationKind = getSerializationKind(cur);
+
+ if (serializationKind == SerializationKind.FILE) {
+ out.append(".dir");
}
- System.err.println("No vaultFile at path " + resource.getPath());
- return null;
+ if (!aggs.hasNext() && serializationKind == SerializationKind.METADATA_FULL) {
+ out.delete(out.lastIndexOf("/"), out.length());
+ }
}
}
- return new AggregateWrapper(vaultFile.getAggregate(), null);
+ return out.toString();
+ }
+
+ private boolean isPlainNtFolder(Aggregate agg) throws RepositoryException {
+
+ return agg.getNode().getPrimaryNodeType().getName().equals("nt:folder")
+ && agg.getNode().getMixinNodeTypes().length == 0;
+ }
+
+ /**
+ * Returns the aggregates for a specific resource
+ *
+ * <p>
+ * In the simplest case, a single element is returned in the chain, signalling that the aggregate is a top-level
+ * one.
+ * </p>
+ *
+ * <p>
+ * For leaf aggregates, the list contains the top-most aggregates first and ends up with the leaf-most ones.
+ * </p>
+ *
+ * @param resource the resource to find the aggregate chain for
+ * @return a list of aggregates
+ * @throws IOException
+ * @throws RepositoryException
+ */
+ private List<Aggregate> findAggregateChain(ResourceProxy resource) throws IOException, RepositoryException {
+
+ VaultFile vaultFile = fs.getFile(PlatformNameFormat.getPlatformPath(resource.getPath()));
+
+ if (vaultFile == null || vaultFile.getAggregate() == null) {
+ // this file might be a leaf aggregate of a vaultfile higher in the resource path ; so look for a
+ // parent higher
+
+ String parentPath = Text.getRelativeParent(resource.getPath(), 1);
+ while (!parentPath.equals("/")) {
+ VaultFile parentFile = fs.getFile(PlatformNameFormat.getPlatformPath(parentPath));
+
+ if (parentFile != null) {
+ Aggregate parentAggregate = parentFile.getAggregate();
+ ArrayList<Aggregate> parents = new ArrayList<Aggregate>();
+ parents.add(parentAggregate);
+ List<Aggregate> chain = lookForAggregateInLeaves(resource, parentAggregate, parents);
+ if (chain != null) {
+ return chain;
+ }
+ }
+
+ parentPath = Text.getRelativeParent(parentPath, 1);
+ }
+
+ return null;
+ }
+
+
+ return Collections.singletonList(vaultFile.getAggregate());
+ }
+
+ /**
+ * Recursively looks for an aggregate matching the <tt>resource</tt>'s path starting at the <tt>parentAggregate</tt>
+ *
+ * <p>
+ * The returned chain will contain at least one aggregate, in case the resource is contained in a stand-alone (?)
+ * aggregate, or multiple aggregates in case the matching aggregate is a leaf one.
+ * </p>
+ *
+ * @param resource the resource
+ * @param parentAggregate the known parent aggregate which potentially matches this resource
+ * @param chain the chain used to record all intermediate aggregates
+ * @return the final aggregate chain
+ *
+ * @throws RepositoryException
+ */
+ private List<Aggregate> lookForAggregateInLeaves(ResourceProxy resource, Aggregate parentAggregate,
+ List<Aggregate> chain) throws RepositoryException {
+
+ if (parentAggregate == null) {
+ return null;
+ }
+
+ List<? extends Aggregate> leaves = parentAggregate.getLeaves();
+ if (leaves == null) {
+ return null;
+ }
+
+ for (Aggregate leaf : leaves) {
+ if (leaf.getPath().equals(resource.getPath())) {
+ chain.add(leaf);
+ return chain;
+ } else if (Text.isDescendant(leaf.getPath(), resource.getPath())) {
+ chain.add(leaf);
+ return lookForAggregateInLeaves(resource, leaf, chain);
+ }
+ }
+
+ return null;
}
public void setLocator(VaultFsLocator locator) {
@@ -258,16 +343,4 @@
this.fsLocator = locator;
}
- static class AggregateWrapper {
-
- private AggregateWrapper(Aggregate aggregate, Aggregate parent) {
-
- this.aggregate = aggregate;
- this.parent = parent;
- }
-
- public Aggregate aggregate;
- public Aggregate parent;
- }
-
}
diff --git a/m2e-feature/feature.xml b/m2e-feature/feature.xml
index 49875b0..b6f1b34 100644
--- a/m2e-feature/feature.xml
+++ b/m2e-feature/feature.xml
@@ -1,4 +1,20 @@
<?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.
+-->
<feature
id="org.apache.sling.ide.m2e-feature"
label="Sling IDE Tools, M2e-based"
diff --git a/m2e-feature/pom.xml b/m2e-feature/pom.xml
index 0fed191..87b8bec 100644
--- a/m2e-feature/pom.xml
+++ b/m2e-feature/pom.xml
@@ -1,4 +1,20 @@
<?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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
diff --git a/p2update/category.xml b/p2update/category.xml
index 8b85e6b..c7aab32 100644
--- a/p2update/category.xml
+++ b/p2update/category.xml
@@ -1,4 +1,20 @@
<?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.
+-->
<site>
<feature url="features/org.apache.sling.ide.feature_0.0.0.qualifier.jar" id="org.apache.sling.ide.feature" version="0.0.0">
<category name="sling"/>
diff --git a/p2update/pom.xml b/p2update/pom.xml
index 655ad6a..c77c80e 100644
--- a/p2update/pom.xml
+++ b/p2update/pom.xml
@@ -1,4 +1,20 @@
<?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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
diff --git a/p2update/siteTemplate/index.html b/p2update/siteTemplate/index.html
index cc1d1a1..87ba14b 100644
--- a/p2update/siteTemplate/index.html
+++ b/p2update/siteTemplate/index.html
@@ -1,3 +1,19 @@
+<!--
+ 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.
+-->
<!DOCTYPE html>
<html>
<head>
diff --git a/pom.xml b/pom.xml
index aa06fcc..bcfc86d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,4 +1,20 @@
<?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
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
@@ -83,7 +99,43 @@
</configuration>
</execution>
</executions>
- </plugin>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>derby.log</exclude>
+ <exclude>.gitignore</exclude>
+ <exclude>README.md</exclude>
+
+ <!-- Eclipse build related files -->
+ <exclude>*.launch</exclude>
+ <exclude>build.properties</exclude>
+ <exclude>.options</exclude>
+ <exclude>META-INF/MANIFEST.MF</exclude>
+
+ <!-- test data -->
+ <exclude>**/*.binary</exclude>
+ </excludes>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <phase>verify</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-packaging-plugin</artifactId>
+ <version>${tycho.version}</version>
+ <configuration>
+ <format>'RELEASE'</format>
+ </configuration>
+ </plugin>
</plugins>
<pluginManagement>
<plugins>
@@ -96,14 +148,6 @@
<target>1.6</target>
</configuration>
</plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-packaging-plugin</artifactId>
- <version>${tycho.version}</version>
- <configuration>
- <format>'RELEASE'</format>
- </configuration>
- </plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<!--
We embed some bundles that are not available on p2 update sites. To make the build seamless, we copy them early in the process.
diff --git a/target-definition/org.apache.sling.ide.target-definition.target b/target-definition/org.apache.sling.ide.target-definition.target
index aa2e4d2..f93cae6 100644
--- a/target-definition/org.apache.sling.ide.target-definition.target
+++ b/target-definition/org.apache.sling.ide.target-definition.target
@@ -1,4 +1,20 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ 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.
+-->
<?pde version="3.8"?><target name="Sling IDE Tools" sequenceNumber="43">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
diff --git a/target-definition/pom.xml b/target-definition/pom.xml
index ba3cd63..d6fa41a 100644
--- a/target-definition/pom.xml
+++ b/target-definition/pom.xml
@@ -1,4 +1,20 @@
<?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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
diff --git a/upload-p2-site.sh b/upload-p2-site.sh
index a0687e3..c72bc39 100644
--- a/upload-p2-site.sh
+++ b/upload-p2-site.sh
@@ -1,5 +1,20 @@
#!/bin/sh -e
+# 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.
+
SITE_LOCATION='public_html/sling/ide/preview'
# 1. Clean the current update site
diff --git a/vlt-wrapper/pom.xml b/vlt-wrapper/pom.xml
index 62ea487..0a1ae2d 100644
--- a/vlt-wrapper/pom.xml
+++ b/vlt-wrapper/pom.xml
@@ -1,4 +1,20 @@
<?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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>