Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Building 1 Environment instead of all

Hi Jim,

you can achieve that by using maven profiles [1].
Create different profiles for the different target environments and run Tycho with the profile setting you want to build.
With the following profile settings you can run mvn clean install -P linux to build your product for linux, -P win32 for win32 and -P linux,win32 for both.
You might also want to enable all the profiles per default to build for all platforms by default.

<profile>
  <id>linux</id>
  <build>
  <plugins>
    <plugin>
      <groupId>org.eclipse.tycho</groupId>
      <artifactId>target-platform-configuration</artifactId>
      <version>${tycho-version}</version>
      <configuration>
        <environments>
          <environment>
            <os>linux</os>
            <ws>gtk</ws>
            <arch>x86_64</arch>
	</environment>
        </environments>
      </configuration>
    </plugin>
  </plugins>
</profile>
<profile>
  <id>win32</id>
  <build>
  <plugins>
    <plugin>
      <groupId>org.eclipse.tycho</groupId>
      <artifactId>target-platform-configuration</artifactId>
      <version>${tycho-version}</version>
      <configuration>
        <environments>
          <environment>
            <os>win32</os>
            <ws>win32</ws>
            <arch>x86</arch>
	</environment>
        </environments>
      </configuration>
    </plugin>
  </plugins>
</profile>

[1] http://maven.apache.org/guides/introduction/introduction-to-profiles.html


Von: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] Im Auftrag von Jim Klo
Gesendet: Mittwoch, 29. April 2015 22:19
An: Tycho user list
Betreff: [tycho-user] Building 1 Environment instead of all

Greetings we are building an RCP application that is currently building with Tycho.  Our CI builds for x64 builds for window, mac, and linux.

Our .product file has several native fragment dependencies [ org.eclipse.core.(resources|filesystem|net).(linux|macosx|win32).x84_64 ].

If I omit one of the environments from the target-platform-configuration, the build fails because it cannot find one of the dependencies listed in the .product file.

Is there a way to just tell tycho to only build and assemble one of the target environments instead of all of them?

Thanks,

- Jim


Jim Klo
Senior Software Engineer
Center for Software Engineering
SRI International
t.	@nsomnac



Back to the top