SlideShare uma empresa Scribd logo
1 de 20
Baixar para ler offline
Maven/Tycho
 für Eclipse RCP-Applikationen
 Das neue Build-Werkzeug im Eclipse-Universum

               Beat Strasser – Inventage




Oktober 2011      JUGS: Maven/Tycho für Eclipse RCP-Applikationen
Themen



     Eclipse PDE
     Eclipse PDE                                              P2
                                                              P2

   Targetplatform
   Targetplatform                                              Repositories
                                                               Repositories
     Metadaten
     Metadaten                                                     Tools
                                                                   Tools

                                Tycho
                                Tycho
                                                                       Maven
                                                                       Maven
           OSGi
           OSGi                Package-Typen
                               Package-Typen
                                Konfiguration
                                Konfiguration                     Abhängigkeiten
                                                                  Abhängigkeiten
     Versionierung
     Versionierung




Oktober 2011         JUGS: Maven/Tycho für Eclipse RCP-Applikationen
www.eclipse.org/tycho


 Tycho: Set von Maven3-Plugins
  –




      org.eclipse.tycho:tycho-*-plugin:0.13.0
  –




      In Maven Central verfügbar

 Konkurrent zu PDE-Headless-Build
  –




      Verarbeitet OSGi- und PDE-Metadaten
  –




      Erweitert Maven-Abhängigkeits-Modell um
      OSGi-/Eclipse-RCP-Abhängigkeiten
  –




      P2-Repository-Support für Maven

 Hauptsächlich Manifest-first

Oktober 2011      JUGS: Maven/Tycho für Eclipse RCP-Applikationen
P2
                                                                                P2
                                                                 PDE
                                                                 PDE
Projekt-Struktur                                                        Tycho
                                                                        Tycho
                                                                                Maven
                                                                                Maven
                                                                 OSGi
                                                                 OSGi




Oktober 2011   JUGS: Maven/Tycho für Eclipse RCP-Applikationen
P2
                                                                                                P2
                                                                                 PDE
                                                                                 PDE
Tycho-Konfiguration                                                                     Tycho
                                                                                        Tycho
                                                                                                Maven
                                                                                                Maven
                                                                                 OSGi
                                                                                 OSGi




<repositories><repository>                                           <environments>
  <id>eclipse-indigo</id>                                              <environment>
  <layout>p2</layout>                                                    <os>linux</os>
  <url>http://download.releases.org/releases/indigo/</url>               <ws>gtk</ws>
</repository></repositories>                                             <arch>x86_64</arch>
                                                                       </environment>
<build><plugins>                                                       <environment>
 <plugin>                                                                <os>win32</os>
   <groupId>org.eclipse.tycho</groupId>                                  <ws>win32</ws>
   <artifactId>tycho-maven-plugin</artifactId>                           <arch>x86_64</arch>
   <version>0.13.0</version>                                           </environment>
   <extensions>true</extensions>                                       <environment>
 </plugin>                                                               <os>macosx</os>
                                                                         <ws>cocoa</ws>
 <plugin>                                                                <arch>x86_64</arch>
  <groupId>org.eclipse.tycho</groupId>                                  </environment>
  <artifactId>target-platform-configuration</artifactId>             </environments>
  <version>0.13.0</version>                                         </configuration>
  <configuration>                                                  </plugin>
                                                                  </plugins></build>




Oktober 2011                   JUGS: Maven/Tycho für Eclipse RCP-Applikationen
P2
                                                                                  P2
                                                                   PDE
                                                                   PDE
Plugins, Fragmente, Features                                              Tycho
                                                                          Tycho
                                                                                  Maven
                                                                                  Maven
                                                                   OSGi
                                                                   OSGi




 Plugins, Fragmente: eclipse-plugin
 Test-Fragmente: eclipse-test-plugin
 Eclipse-Features: eclipse-feature
 Artifakt-Id und -Version analog zu PDE/OSGi
 POM-Dateien generieren:
     mvn org.eclipse.tycho:tycho-pomgenerator-
     plugin:generate-poms -DgroupId=...




Oktober 2011     JUGS: Maven/Tycho für Eclipse RCP-Applikationen
P2
                                                                                    P2
                                                                     PDE
                                                                     PDE
Eclipse RCP-Applikation                                                     Tycho
                                                                            Tycho
                                                                                    Maven
                                                                                    Maven
                                                                     OSGi
                                                                     OSGi




<packaging>eclipse-repository</packaging>

<build><plugins><plugin>
 <groupId>org.eclipse.tycho</groupId>
 <artifactId>tycho-p2-director-plugin</artifactId>
 <version>0.13.0</version>
 <executions>
  <execution>
   <id>materialize-products</id>
   <goals><goal>materialize-products</goal></goals>
  </execution>
  <execution>
   <id>archive-products</id>
   <goals><goal>archive-products</goal></goals>
  </execution>
 </executions>
</plugin></plugins></build>


Oktober 2011       JUGS: Maven/Tycho für Eclipse RCP-Applikationen
P2
                                                                                          P2
                                                                           PDE
                                                                           PDE
Spezial-Konfiguration                                                             Tycho
                                                                                  Tycho
                                                                                          Maven
                                                                                          Maven
                                                                           OSGi
                                                                           OSGi




Support für Zusatzdateien analog zu PDE
    build.properties in Feature:
    root = file:README.txt
    root.win32.win32.x86 = rootfiles/win
    root.linux.gtk.x86 = rootfiles/linux
    root.linux.gtk.x86.permissions.755 = scripts/hello
    root.linux.gtk.x86.link = scripts/hello,hello_alias
Compiler-Optionen: tycho-compiler-plugin
Packaging-Optionen: tycho-packaging-plugin
Source-Optionen:    tycho-source-plugin
Test-Optionen:      tycho-surefire-plugin




Oktober 2011             JUGS: Maven/Tycho für Eclipse RCP-Applikationen
P2
                                                                                P2
Abhängigkeiten bei Eclipse PDE ‒                                 PDE
                                                                 PDE
                                                                        Tycho
                                                                        Tycho

Targetplatform                                                   OSGi
                                                                 OSGi
                                                                                Maven
                                                                                Maven




Oktober 2011   JUGS: Maven/Tycho für Eclipse RCP-Applikationen
P2
                                                                                       P2
                                                                        PDE
                                                                        PDE
Abhängigkeiten bei Tycho                                                       Tycho
                                                                               Tycho
                                                                                       Maven
                                                                                       Maven
                                                                        OSGi
                                                                        OSGi




Unzureichende Metadaten in Maven-Repositories
   Manifest-first (default): Dependencies in POM werden nicht
   beachtet

Targetplatform-Definition durch
   Angabe aller benötigten P2-Repositories (Layout p2)
   Angabe einer PDE-Target-Definitionsdatei

Verwaltung pro Maven-Modul
tycho.targetplatform-Property nicht mehr benutzen
Lokales Maven-Repository dient auch als P2-Cache




Oktober 2011          JUGS: Maven/Tycho für Eclipse RCP-Applikationen
P2
                                                                                          P2
                                                                           PDE
                                                                           PDE
Targetdefinition verwenden in Tycho                                               Tycho
                                                                                  Tycho
                                                                                          Maven
                                                                                          Maven
                                                                           OSGi
                                                                           OSGi




Eigenes Artifact für Target-Definition erstellen (z.B. mit
org.codehaus.mojo:build-helper-maven-plugin:attach-
artifact)
Tycho-Konfiguration:
  <build><plugins><plugin>
   <groupId>org.eclipse.tycho</groupId>
   <artifactId>target-platform-configuration</artifactId>
   <version>0.13.0</version>
   <configuration>
    <target>
     <artifact>
       <groupId>com.example</groupId>
       <artifactId>example.target</artifactId>
       <version>1</version>
       <classifier>example</classifier>
     </artifact>
    </target>
   </configuration>
  </plugin></plugins></build>

Oktober 2011             JUGS: Maven/Tycho für Eclipse RCP-Applikationen
P2
                                                                                       P2
                                                                        PDE
                                                                        PDE
Equinox P2                                                                     Tycho
                                                                               Tycho
                                                                                       Maven
                                                                                       Maven
                                                                        OSGi
                                                                        OSGi




 Eclipse Software-Verteilungs-Plattform mit
 Beschreibungen für Installable Units
  –




      P2 Core
  –




      P2 UI
  –




      P2 Repository (statisch)
       –




           content.xml
       –




           artifacts.xml




Oktober 2011          JUGS: Maven/Tycho für Eclipse RCP-Applikationen
P2
                                                                                         P2
                                                                          PDE
                                                                          PDE

Zusammengesetztes P2-Repository                                                  Tycho
                                                                                 Tycho
                                                                                         Maven
                                                                                         Maven
                                                                          OSGi
                                                                          OSGi


<?xml version='1.0' encoding='UTF-8'?>
<?compositeMetadataRepository version='1.0.0'?>
<repository name='Demo Repository'
  type='org.eclipse.equinox.internal.p2.metadata.repository.
         CompositeMetadataRepository'
  version='1.0.0'>
 <properties size='1'>
  <property name='p2.timestamp' value='1'/>
 </properties>
 <children size='3'>
  <child location='http://download.eclipse.org/releases/indigo/'/>
  <child location='http://guava-osgi.googlecode.com/svn/trunk/repository/'/>
  <child location='other'/>
 </children>                                p2repo/
</repository>                               ├── compositeArtifacts.xml
                                                ├── compositeContent.xml
                                                └── other/
                                                    ├── artifacts.jar
                                                    ├── content.jar
                                                    ├── features/
                                                    └── plugins/

Oktober 2011            JUGS: Maven/Tycho für Eclipse RCP-Applikationen
P2
                                                                                   P2
                                                                    PDE
                                                                    PDE
Publizieren von IUs                                                        Tycho
                                                                           Tycho
                                                                                   Maven
                                                                                   Maven
                                                                    OSGi
                                                                    OSGi



java -jar ~/.m2/repository/org/eclipse/tycho/tycho-p2-
runtime/0.13.0/eclipse/plugins/org.eclipse.equinox.launch
er_1.2.0.v201110502.jar
  -application org.eclipse.equinox.p2.publisher.
               FeaturesAndBundlesPublisher
  -metadataRepository file:/tmp/myNewRepo
  -artifactRepository file:/tmp/myNewRepo
  -source file:/tmp/bundles
  -metadataRepositoryName "My new repo"
  -artifactRepositoryName "My new repo"
  -publishArtifacts -compress -append

<p2.publish.featuresAndBundles
  metadatarepository="file:/tmp/libs"
  metadatarepositoryname="My new repo"
  artifactrepository="file:/tmp/libs"
  artifactrepositoryname="My new repo"
  source=”/tmp/bundles"
  compress=”true” append="true"
  publishartifacts="true" />

Oktober 2011      JUGS: Maven/Tycho für Eclipse RCP-Applikationen
P2
                                                                                   P2
                                                                    PDE
                                                                    PDE
Nexus Repository Manager                                                   Tycho
                                                                           Tycho
                                                                                   Maven
                                                                                   Maven
                                                                    OSGi
                                                                    OSGi




 P2-Proxies und P2-Gruppen
  –




      seit September 2011 auch in Nexus OSS!

 Experimentelle Features (OSS):
  –




      nexus-p2-repository-plugin:
      P2-Ansicht aller OSGi-Bundles eines Maven-
      Repos
  –




      nexus-bundle-maker-plugin:
      Automatisches OSGi-fizieren von Artifakten




Oktober 2011      JUGS: Maven/Tycho für Eclipse RCP-Applikationen
P2
                                                                                     P2
                                                                      PDE
                                                                      PDE
Versionierung                                                                Tycho
                                                                             Tycho
                                                                                     Maven
                                                                                     Maven
                                                                      OSGi
                                                                      OSGi




Maven
    Snapshot- und Release-Versionen

OSGi
    Nur Release-Versionen
    Versions-Semantik – major.minor.micro.qualifier
    Package-Versionierung

Tycho
    Zweifache Versionsangabe → konsistent halten
      1.2.3-SNAPSHOT ≙ 1.2.3.qualifier
    tycho-versions-plugin:set-version
        -DnewVersion=1.2.3-SNAPSHOT -Dartifacts=...

Oktober 2011        JUGS: Maven/Tycho für Eclipse RCP-Applikationen
P2
                                                                                    P2
                                                                     PDE
                                                                     PDE
Versionsnummer-(In)Konsistenz                                               Tycho
                                                                            Tycho
                                                                                    Maven
                                                                                    Maven
                                                                     OSGi
                                                                     OSGi




 Maven: 1.2.3-SNAPSHOT < 1.2.3
 OSGi:         1.2.3.20111013 > 1.2.3
 Lösungsansätze:
  –




      Qualifier auch für Releases (Timestamp, FINAL,
      RELEASE, STABLE, ...)
  –




      Gerade/ungerade Nummern für
      Release/Snapshot
  –




      OSGi Draft: negative Qualifier
      1.2.3-20111013 < 1.2.3 < 1.2.3.20111013


Oktober 2011       JUGS: Maven/Tycho für Eclipse RCP-Applikationen
P2
                                                                                P2
                                                                 PDE
                                                                 PDE
Eclipse-API-Tooling                                                     Tycho
                                                                        Tycho
                                                                                Maven
                                                                                Maven
                                                                 OSGi
                                                                 OSGi




Oktober 2011   JUGS: Maven/Tycho für Eclipse RCP-Applikationen
P2
                                                                                      P2
                                                                       PDE
                                                                       PDE
Fazit                                                                         Tycho
                                                                              Tycho
                                                                                      Maven
                                                                                      Maven
                                                                       OSGi
                                                                       OSGi




Maven-Build
    Einheitlicher Build
    Einfacher Setup, wenig Konfiguration
    Guter PDE-Support
    Transitive Abhängigkeiten nicht ersichtlich über
    Tycho-/Maven-Grenze
    Maven-Repositories ungebraucht
    Versionierung mühsam

P2
    Repository-Management wenig effizient
    P2-Core-Tools ohne Offline-Support

Oktober 2011         JUGS: Maven/Tycho für Eclipse RCP-Applikationen
P2
                                                                                       P2
                                                                        PDE
                                                                        PDE
Tycho                                                                          Tycho
                                                                               Tycho
                                                                                       Maven
                                                                                       Maven
                                                                        OSGi
                                                                        OSGi




 http://www.eclipse.org/tycho/
 http://wiki.eclipse.org/Category:Tycho
 Mailing-Listen:
  –




      tycho-user@eclipse.org
  –




      tycho-dev@eclipse.org
 git://git.eclipse.org/gitroot/tycho/org.eclipse.tycho.git



 EclipseCon Europe (2.-4.11.2011)


Oktober 2011          JUGS: Maven/Tycho für Eclipse RCP-Applikationen

Mais conteúdo relacionado

Destaque

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Destaque (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

Maven/Tycho für Eclipse RCP-Applikationen

  • 1. Maven/Tycho für Eclipse RCP-Applikationen Das neue Build-Werkzeug im Eclipse-Universum Beat Strasser – Inventage Oktober 2011 JUGS: Maven/Tycho für Eclipse RCP-Applikationen
  • 2. Themen Eclipse PDE Eclipse PDE P2 P2 Targetplatform Targetplatform Repositories Repositories Metadaten Metadaten Tools Tools Tycho Tycho Maven Maven OSGi OSGi Package-Typen Package-Typen Konfiguration Konfiguration Abhängigkeiten Abhängigkeiten Versionierung Versionierung Oktober 2011 JUGS: Maven/Tycho für Eclipse RCP-Applikationen
  • 3. www.eclipse.org/tycho Tycho: Set von Maven3-Plugins – org.eclipse.tycho:tycho-*-plugin:0.13.0 – In Maven Central verfügbar Konkurrent zu PDE-Headless-Build – Verarbeitet OSGi- und PDE-Metadaten – Erweitert Maven-Abhängigkeits-Modell um OSGi-/Eclipse-RCP-Abhängigkeiten – P2-Repository-Support für Maven Hauptsächlich Manifest-first Oktober 2011 JUGS: Maven/Tycho für Eclipse RCP-Applikationen
  • 4. P2 P2 PDE PDE Projekt-Struktur Tycho Tycho Maven Maven OSGi OSGi Oktober 2011 JUGS: Maven/Tycho für Eclipse RCP-Applikationen
  • 5. P2 P2 PDE PDE Tycho-Konfiguration Tycho Tycho Maven Maven OSGi OSGi <repositories><repository> <environments> <id>eclipse-indigo</id> <environment> <layout>p2</layout> <os>linux</os> <url>http://download.releases.org/releases/indigo/</url> <ws>gtk</ws> </repository></repositories> <arch>x86_64</arch> </environment> <build><plugins> <environment> <plugin> <os>win32</os> <groupId>org.eclipse.tycho</groupId> <ws>win32</ws> <artifactId>tycho-maven-plugin</artifactId> <arch>x86_64</arch> <version>0.13.0</version> </environment> <extensions>true</extensions> <environment> </plugin> <os>macosx</os> <ws>cocoa</ws> <plugin> <arch>x86_64</arch> <groupId>org.eclipse.tycho</groupId> </environment> <artifactId>target-platform-configuration</artifactId> </environments> <version>0.13.0</version> </configuration> <configuration> </plugin> </plugins></build> Oktober 2011 JUGS: Maven/Tycho für Eclipse RCP-Applikationen
  • 6. P2 P2 PDE PDE Plugins, Fragmente, Features Tycho Tycho Maven Maven OSGi OSGi Plugins, Fragmente: eclipse-plugin Test-Fragmente: eclipse-test-plugin Eclipse-Features: eclipse-feature Artifakt-Id und -Version analog zu PDE/OSGi POM-Dateien generieren: mvn org.eclipse.tycho:tycho-pomgenerator- plugin:generate-poms -DgroupId=... Oktober 2011 JUGS: Maven/Tycho für Eclipse RCP-Applikationen
  • 7. P2 P2 PDE PDE Eclipse RCP-Applikation Tycho Tycho Maven Maven OSGi OSGi <packaging>eclipse-repository</packaging> <build><plugins><plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>tycho-p2-director-plugin</artifactId> <version>0.13.0</version> <executions> <execution> <id>materialize-products</id> <goals><goal>materialize-products</goal></goals> </execution> <execution> <id>archive-products</id> <goals><goal>archive-products</goal></goals> </execution> </executions> </plugin></plugins></build> Oktober 2011 JUGS: Maven/Tycho für Eclipse RCP-Applikationen
  • 8. P2 P2 PDE PDE Spezial-Konfiguration Tycho Tycho Maven Maven OSGi OSGi Support für Zusatzdateien analog zu PDE build.properties in Feature: root = file:README.txt root.win32.win32.x86 = rootfiles/win root.linux.gtk.x86 = rootfiles/linux root.linux.gtk.x86.permissions.755 = scripts/hello root.linux.gtk.x86.link = scripts/hello,hello_alias Compiler-Optionen: tycho-compiler-plugin Packaging-Optionen: tycho-packaging-plugin Source-Optionen: tycho-source-plugin Test-Optionen: tycho-surefire-plugin Oktober 2011 JUGS: Maven/Tycho für Eclipse RCP-Applikationen
  • 9. P2 P2 Abhängigkeiten bei Eclipse PDE ‒ PDE PDE Tycho Tycho Targetplatform OSGi OSGi Maven Maven Oktober 2011 JUGS: Maven/Tycho für Eclipse RCP-Applikationen
  • 10. P2 P2 PDE PDE Abhängigkeiten bei Tycho Tycho Tycho Maven Maven OSGi OSGi Unzureichende Metadaten in Maven-Repositories Manifest-first (default): Dependencies in POM werden nicht beachtet Targetplatform-Definition durch Angabe aller benötigten P2-Repositories (Layout p2) Angabe einer PDE-Target-Definitionsdatei Verwaltung pro Maven-Modul tycho.targetplatform-Property nicht mehr benutzen Lokales Maven-Repository dient auch als P2-Cache Oktober 2011 JUGS: Maven/Tycho für Eclipse RCP-Applikationen
  • 11. P2 P2 PDE PDE Targetdefinition verwenden in Tycho Tycho Tycho Maven Maven OSGi OSGi Eigenes Artifact für Target-Definition erstellen (z.B. mit org.codehaus.mojo:build-helper-maven-plugin:attach- artifact) Tycho-Konfiguration: <build><plugins><plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>target-platform-configuration</artifactId> <version>0.13.0</version> <configuration> <target> <artifact> <groupId>com.example</groupId> <artifactId>example.target</artifactId> <version>1</version> <classifier>example</classifier> </artifact> </target> </configuration> </plugin></plugins></build> Oktober 2011 JUGS: Maven/Tycho für Eclipse RCP-Applikationen
  • 12. P2 P2 PDE PDE Equinox P2 Tycho Tycho Maven Maven OSGi OSGi Eclipse Software-Verteilungs-Plattform mit Beschreibungen für Installable Units – P2 Core – P2 UI – P2 Repository (statisch) – content.xml – artifacts.xml Oktober 2011 JUGS: Maven/Tycho für Eclipse RCP-Applikationen
  • 13. P2 P2 PDE PDE Zusammengesetztes P2-Repository Tycho Tycho Maven Maven OSGi OSGi <?xml version='1.0' encoding='UTF-8'?> <?compositeMetadataRepository version='1.0.0'?> <repository name='Demo Repository' type='org.eclipse.equinox.internal.p2.metadata.repository. CompositeMetadataRepository' version='1.0.0'> <properties size='1'> <property name='p2.timestamp' value='1'/> </properties> <children size='3'> <child location='http://download.eclipse.org/releases/indigo/'/> <child location='http://guava-osgi.googlecode.com/svn/trunk/repository/'/> <child location='other'/> </children> p2repo/ </repository> ├── compositeArtifacts.xml ├── compositeContent.xml └── other/ ├── artifacts.jar ├── content.jar ├── features/ └── plugins/ Oktober 2011 JUGS: Maven/Tycho für Eclipse RCP-Applikationen
  • 14. P2 P2 PDE PDE Publizieren von IUs Tycho Tycho Maven Maven OSGi OSGi java -jar ~/.m2/repository/org/eclipse/tycho/tycho-p2- runtime/0.13.0/eclipse/plugins/org.eclipse.equinox.launch er_1.2.0.v201110502.jar -application org.eclipse.equinox.p2.publisher. FeaturesAndBundlesPublisher -metadataRepository file:/tmp/myNewRepo -artifactRepository file:/tmp/myNewRepo -source file:/tmp/bundles -metadataRepositoryName "My new repo" -artifactRepositoryName "My new repo" -publishArtifacts -compress -append <p2.publish.featuresAndBundles metadatarepository="file:/tmp/libs" metadatarepositoryname="My new repo" artifactrepository="file:/tmp/libs" artifactrepositoryname="My new repo" source=”/tmp/bundles" compress=”true” append="true" publishartifacts="true" /> Oktober 2011 JUGS: Maven/Tycho für Eclipse RCP-Applikationen
  • 15. P2 P2 PDE PDE Nexus Repository Manager Tycho Tycho Maven Maven OSGi OSGi P2-Proxies und P2-Gruppen – seit September 2011 auch in Nexus OSS! Experimentelle Features (OSS): – nexus-p2-repository-plugin: P2-Ansicht aller OSGi-Bundles eines Maven- Repos – nexus-bundle-maker-plugin: Automatisches OSGi-fizieren von Artifakten Oktober 2011 JUGS: Maven/Tycho für Eclipse RCP-Applikationen
  • 16. P2 P2 PDE PDE Versionierung Tycho Tycho Maven Maven OSGi OSGi Maven Snapshot- und Release-Versionen OSGi Nur Release-Versionen Versions-Semantik – major.minor.micro.qualifier Package-Versionierung Tycho Zweifache Versionsangabe → konsistent halten 1.2.3-SNAPSHOT ≙ 1.2.3.qualifier tycho-versions-plugin:set-version -DnewVersion=1.2.3-SNAPSHOT -Dartifacts=... Oktober 2011 JUGS: Maven/Tycho für Eclipse RCP-Applikationen
  • 17. P2 P2 PDE PDE Versionsnummer-(In)Konsistenz Tycho Tycho Maven Maven OSGi OSGi Maven: 1.2.3-SNAPSHOT < 1.2.3 OSGi: 1.2.3.20111013 > 1.2.3 Lösungsansätze: – Qualifier auch für Releases (Timestamp, FINAL, RELEASE, STABLE, ...) – Gerade/ungerade Nummern für Release/Snapshot – OSGi Draft: negative Qualifier 1.2.3-20111013 < 1.2.3 < 1.2.3.20111013 Oktober 2011 JUGS: Maven/Tycho für Eclipse RCP-Applikationen
  • 18. P2 P2 PDE PDE Eclipse-API-Tooling Tycho Tycho Maven Maven OSGi OSGi Oktober 2011 JUGS: Maven/Tycho für Eclipse RCP-Applikationen
  • 19. P2 P2 PDE PDE Fazit Tycho Tycho Maven Maven OSGi OSGi Maven-Build Einheitlicher Build Einfacher Setup, wenig Konfiguration Guter PDE-Support Transitive Abhängigkeiten nicht ersichtlich über Tycho-/Maven-Grenze Maven-Repositories ungebraucht Versionierung mühsam P2 Repository-Management wenig effizient P2-Core-Tools ohne Offline-Support Oktober 2011 JUGS: Maven/Tycho für Eclipse RCP-Applikationen
  • 20. P2 P2 PDE PDE Tycho Tycho Tycho Maven Maven OSGi OSGi http://www.eclipse.org/tycho/ http://wiki.eclipse.org/Category:Tycho Mailing-Listen: – tycho-user@eclipse.org – tycho-dev@eclipse.org git://git.eclipse.org/gitroot/tycho/org.eclipse.tycho.git EclipseCon Europe (2.-4.11.2011) Oktober 2011 JUGS: Maven/Tycho für Eclipse RCP-Applikationen