This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch feature/SLING-5618
in repository https://gitbox.apache.org/repos/asf/sling-ide-tooling.git


The following commit(s) were added to refs/heads/feature/SLING-5618 by this 
push:
     new 66cea58  SLING-7585 - Fix Eclipse in-IDE errors after creating shared 
modules
66cea58 is described below

commit 66cea5808651550c16cfc8d428272ef0240e7672
Author: Robert Munteanu <romb...@apache.org>
AuthorDate: Tue Apr 17 00:05:32 2018 +0300

    SLING-7585 - Fix Eclipse in-IDE errors after creating shared modules
    
    Improve in-place OSGI metadata copying for pure Maven modules:
    
    - remove META-INF and OSGI-INF on clean
    - copy SCR descriptors as well
---
 shared/modules/.gitignore     |  1 +
 shared/modules/parent/pom.xml | 40 +++++++++++++++++++++++++++++++++++++++-
 2 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/shared/modules/.gitignore b/shared/modules/.gitignore
index 6cb2adc..1cf10b6 100644
--- a/shared/modules/.gitignore
+++ b/shared/modules/.gitignore
@@ -1 +1,2 @@
 MANIFEST.MF
+OSGI-INF/
diff --git a/shared/modules/parent/pom.xml b/shared/modules/parent/pom.xml
index b5c67dc..e0e68fe 100644
--- a/shared/modules/parent/pom.xml
+++ b/shared/modules/parent/pom.xml
@@ -42,6 +42,7 @@
                 <configuration>
                     <excludes>
                         <exclude>**/MANIFEST.MF</exclude>
+                        <exclude>**/OSGI-INF/*.xml</exclude>
                     </excludes>
                 </configuration>
             </plugin>
@@ -61,11 +62,30 @@
             <build>
                 <plugins>
                     <plugin>
+                        <artifactId>maven-clean-plugin</artifactId>
+                        <configuration>
+                            <filesets>
+                                <fileset>
+                                    <directory>META-INF</directory>
+                                    <includes>
+                                        <include>*</include>
+                                    </includes>
+                                </fileset>
+                                <fileset>
+                                    <directory>OSGI-INF</directory>
+                                    <includes>
+                                        <include>*</include>
+                                    </includes>
+                                </fileset>
+                            </filesets>
+                        </configuration>
+                    </plugin>
+                    <plugin>
                         <artifactId>maven-resources-plugin</artifactId>
                         <executions>
                             <execution>
                                 <id>copy-manifest-for-pde</id>
-                                <phase>process-classes</phase>
+                                <phase>process-test-resources</phase>
                                 <goals>
                                     <goal>copy-resources</goal>
                                 </goals>
@@ -81,6 +101,24 @@
                                     </resources>
                                 </configuration>
                             </execution>
+                            <execution>
+                                <id>copy-scr-descriptors-for-pde</id>
+                                <phase>process-test-resources</phase>
+                                <goals>
+                                    <goal>copy-resources</goal>
+                                </goals>
+                                <configuration>
+                                    <outputDirectory>OSGI-INF</outputDirectory>
+                                    <resources>
+                                        <resource>
+                                            
<directory>${project.build.outputDirectory}/OSGI-INF</directory>
+                                            <includes>
+                                                <include>*.xml</include>
+                                            </includes>
+                                        </resource>
+                                    </resources>
+                                </configuration>
+                            </execution>
                         </executions>
                     </plugin>
                 </plugins>

-- 
To stop receiving notification emails like this one, please contact
romb...@apache.org.

Reply via email to