Skip to content

Commit

Permalink
Add snippets project to Tycho build eclipse-platform#1390
Browse files Browse the repository at this point in the history
The snippets project org.eclipse.swt.snippets is currently not part of
the Tycho build. This change adds it to the build using a Maven plugin
to copy the OS-specific classpath file according to the current
environment.

Contributes to
eclipse-platform#1390
  • Loading branch information
HeikoKlare committed Aug 7, 2024
1 parent 2374dcf commit f86aa6d
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/org.eclipse.swt.snippets/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.swt.snippets
Bundle-Version: 3.4.100
Bundle-Version: 3.4.100.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.eclipse.swt
Expand Down
46 changes: 46 additions & 0 deletions examples/org.eclipse.swt.snippets/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2024 Eclipse Foundation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Distribution License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/org/documents/edl-v10.php
-->
<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>
<artifactId>eclipse.platform.swt.localbuild</artifactId>
<groupId>eclipse.platform.swt</groupId>
<version>4.33.0-SNAPSHOT</version>
<relativePath>../../local-build/local-build-parent</relativePath>
</parent>
<groupId>org.eclipse.swt</groupId>
<artifactId>org.eclipse.swt.snippets</artifactId>
<version>3.4.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

<build>
<plugins>
<plugin>
<groupId>com.coderplus.maven.plugins</groupId>
<artifactId>copy-rename-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>copy-classpath-for-os</id>
<phase>generate-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<sourceFile>.classpath_${tycho.env.osgi.ws}</sourceFile>
<destinationFile>.classpath</destinationFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@
<module>examples/org.eclipse.swt.examples.browser.demos</module>
<module>examples/org.eclipse.swt.examples.launcher</module>
<module>examples/org.eclipse.swt.examples.ole.win32</module>
<module>examples/org.eclipse.swt.snippets</module>
<module>examples/org.eclipse.swt.examples.views</module>
<module>tests/org.eclipse.swt.tests</module>
<module>features/org.eclipse.swt.tools.feature</module>
Expand Down

0 comments on commit f86aa6d

Please sign in to comment.