Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cbi-dev] Using maven profiles to select which modules to build in a repo

Hi Everyone,

I'm working on creating a patch to address Bug 386646 Comment 21 [1] related to using profiles rather than branches to handle repos like eclipse.platform.ua which use the same branch to build both 3.8 and 4.2 builds but selectively picking modules to build depending on the platform build.

I came up with the below patch to address org.eclipse.help.appserver only being built in the 3.8 branch which is working however I was wondering if perhaps there is a better way to do this that I haven't thought of. The problem I see with this is that we now have to pass an additional parameter when building R3 or R4 branches, -Pplatform-3.8 or -Pplatform-4.2 respectively.

I'm wondering if maybe there's a way to have maven figure this out based on what platform-aggregator branch is checked out. I tried adding custom properties to the pom.xml in the platform-aggregator but I've been unable to get the pom.xml in eclipse.platform.ua from activating the profile by reading the custom property value. Is this even possible?

I guess my question is, is there a more efficient way we can do this than using the patch below? or perhaps the solution below is acceptable?

Thanks,


Thanh

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=386646


diff --git a/pom.xml b/pom.xml
index e4b8a8a..f965f18 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,6 @@
 
   <modules>
     <module>org.eclipse.help</module>
-    <module>org.eclipse.help.appserver</module>
     <module>org.eclipse.help.base</module>
     <module>org.eclipse.help.ui</module>
     <module>org.eclipse.help.webapp</module>
@@ -65,4 +64,19 @@
     </plugins>
   </build>
 
+  <profiles>
+    <profile>
+      <id>platform-3.8</id>
+
+      <modules>
+        <module>org.eclipse.help.appserver</module>
+      </modules>
+    </profile>
+  </profiles>
 </project>


Back to the top