Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Texo/Download and Install"

(Development Environment: update manager)
 
(26 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__TOC__
 
__TOC__
  
Texo is installed through the Eclipse Update Manager.
+
Texo provides both a development as well as a runtime solution. The development plugins can be downloaded and installed in Eclipse using the update manager. For runtime usage you can use maven or download directly. See further below for more information.  
  
== Update Manager Locations ==
+
== Development Environment and Update Sites ==
  
To enable code generation in Eclipse or to use Texo in an OSGI-plugin environment in Eclipse, you need to install Texo into Eclipse. This is done through an update manager. For runtime usage of Texo see the next section.
+
For Texo's development solutions you need to install Texo into Eclipse. This is done through an update manager. For runtime usage of Texo see the next section.
  
Texo is available through this update site:
+
The latest Texo build is available through this update site:
 
* http://download.eclipse.org/modeling/emft/texo/updates/interim
 
* http://download.eclipse.org/modeling/emft/texo/updates/interim
 +
 +
For a stable update site which can be used in builds you can make use of the milestone build update site(s):
 +
* http://download.eclipse.org/modeling/emft/texo/updates/milestones/0.1.0M1
  
 
The last successful nightly build is available through this update site:
 
The last successful nightly build is available through this update site:
Line 15: Line 18:
 
After installing and restarting you can generate code from ecore/xsd models and refer to Texo plugins from plugin MANIFEST.MF files.
 
After installing and restarting you can generate code from ecore/xsd models and refer to Texo plugins from plugin MANIFEST.MF files.
  
== Using Texo at runtime outside of Eclipse/OSGI ==
+
== Runtime usage, web container ==
  
To use the runtime layer of Texo outside of OSGI/Eclipse (for example in a web container) you need to pick the '''org.eclipse.emf.texo''' jar file which is located in the plugins directory of the Eclipse installation (after installing Texo).  
+
For runtime usage you have several options to download the Texo jar files and their dependencies.  
  
Two other jar files which maybe of interest are:
+
=== Texo jar files and dependencies ===
* '''org.eclipse.emf.texo.xml''': for xml and xmi serialization
+
* '''org.eclipse.emf.texo.datagenerator''': for generating test data
+
  
The Texo runtime JAR and the generated runtime classes (*ModelFactory, *ModelPackage) depend on 3 other JARs which are also located in the plugins directory:
+
To use the runtime layer of Texo in a web container you need the following jar files:
 +
* '''org.eclipse.emf.texo''': Texo core
 +
* '''org.eclipse.emf.texo.server''': for server side logic, entitymanager handling etc.
 +
* '''org.eclipse.emf.texo.json''': for json serialization and json web service support
 +
* '''org.eclipse.emf.texo.xml''': for xml and xmi serialization for xml/json web service support
 +
 
 +
The Texo runtime JAR and the generated runtime classes (*ModelFactory, *ModelPackage) depend on 3 (EMF) jar-files:
 
* '''org.eclipse.emf.common'''
 
* '''org.eclipse.emf.common'''
 
* '''org.eclipse.emf.ecore'''
 
* '''org.eclipse.emf.ecore'''
 
* '''org.eclipse.emf.ecore.xmi'''
 
* '''org.eclipse.emf.ecore.xmi'''
  
For more information with using EMF in a standalone Java application, see:
+
These jar files are available through maven (for example version 2.8.0-v20120911-0500), or can be found in the plugins directory of your Eclipse installation.
* [[EMF/FAQ#I want to use EMF, SDO, or XSD in my standalone project, or include only a working subset of the code. What libraries (jar files) do I need in my CLASSPATH?]]
+
* [[EMF/FAQ#How do I use EMF in standalone applications (such as an ordinary main)?]]
+
  
You can also configure Texo to [[Texo/Code_Generation_Patterns#Only_Generate_Entities_-_No_EMF_dependencies | only generate Entities, no EMF dependencies]].
+
Note: you can also configure Texo to [[Texo/Code_Generation_Patterns#Only_Generate_Entities_-_No_EMF_dependencies | only generate Entities, without EMF dependencies]]. In this case there is no dependency on EMF.
 +
 
 +
For '''JSON''' web service support you also need to obtain org.json jar file. These can be downloaded from the maven central repository, or try [http://www.eclipse.org/downloads/download.php?r=1&file=/tools/orbit/downloads/drops/R20110523182458/repository/plugins/org.json_1.0.0.v201011060100.jar this] location.
 +
 
 +
=== Maven ===
 +
 
 +
Texo jars (and their EMF dependencies) are also available in the [http://search.maven.org/#search%7Cga%7C1%7Corg.eclipse.emf.texo maven central repository] and in the [https://oss.sonatype.org/content/repositories/snapshots/org/eclipse/emf/ sonatype snapshot repository].  
 +
 
 +
Here is an example on how to make use of Texo snapshots available through sonatype:
 +
<source lang="xml">
 +
<repositories>
 +
  <repository>
 +
    <id>sonatype-oss-public</id>
 +
    <url>https://oss.sonatype.org/content/groups/public/</url>
 +
    <releases>
 +
      <enabled>true</enabled>
 +
    </releases>
 +
    <snapshots>
 +
      <enabled>true</enabled>
 +
    </snapshots>
 +
  </repository>
 +
</repositories>
 +
</source>
 +
 
 +
The EMF jar files are published within the same group id as Texo: [http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.eclipse.emf%22 org.eclipse.emf]. Texo will work fine with older versions of EMF (from 2.5.0 onwards), but if you can, use the latest EMF versions available in maven central.
 +
 
 +
When using maven in your project it makes sense to check this troubleshooting tip:
 +
* [[Texo/Troubleshooting#Using_maven.2C_getting_NPE_or_ecore_file_not_found_exception_at_runtime|maven and ecore file not found]]
 +
 
 +
'''Note: the Texo pom files currently do not explicitly define dependencies to the EMF and json libraries. This means that you manually need to define the dependency to these libraries in your own pom. This will be re-solved/fine-tuned in later versions.'''
 +
 
 +
=== Download Texo jar files ===
 +
 
 +
The Texo jar files can also be downloaded directly from this page: http://download.eclipse.org/modeling/emft/texo/updates/interim
  
 
== Texo Example Project(s) ==
 
== Texo Example Project(s) ==
  
The Texo example projects are hosted on this git repository: git://github.com/mtaal/texo.git
+
The Texo example projects are hosted in this git repository:
 +
* browse: https://github.com/mtaal/texo
 +
* clone: git://github.com/mtaal/texo.git
 +
 
 +
This [http://www.youtube.com/watch?v=D0oO4gw-gLI video] discusses the example project setup and demos JSON web service support.
 +
 
 +
=== Step by Step for Web Services Noobs ===
 +
 
 +
(These are just the steps that worked for me, not "official" Texo docs.. Hopefully it will help other non-webdev folks.. --[[User:Milesparker.gmail.com|Milesparker.gmail.com]] 02:36, 10 September 2013 (UTC))
 +
 
 +
#(You need Eclipse for Java EE, or a whole bunch of EE features, but I'm not really sure what. Probably better just to install EE...)
 +
#Install Tomcat. I used 7.0. If you're on *nix / Mac, be sure to set permissions and owner for the install dirs, or Tomcat will fail in a totally unhelpful way. See this [http://wolfpaulus.com/jounal/mac/tomcat7 helpful page]
 +
#Import the project from git://github.com/mtaal/texo.git
 +
#Copy the following from you eclipse plugins dir into /WebContent/WEB-INF/lib
 +
#*org.eclipse.emf.texo
 +
#*org.eclipse.emf.texo.datagenerator
 +
#*org.eclipse.emf.texo.json
 +
#*org.eclipse.emf.texo.server
 +
#*org.eclipse.emf.texo.xml
 +
#You also probably need
 +
#*org.json
 +
#You need servlet-api.jar as well to build, at least on Mac. But don't put it into /WebContent/WEB-INF/lib -- Tomcat has a small heart attack and then complains about it in a really obscure message referencing a server spec (I kid you not). So put it in say "lib". Then add it to your build path Libraries.
 +
#It should build now, but Tomcat is still unhappy. Ready for something ''really'' obscure? Select Project:Properties:Deployment Assembly. Then add the libraries that you just added to the WEB-INF there as well. No idea why this seems to be necessary but see this [http://www.eclipse.org/forums/index.php/t/169465/ thread] for some (painfully obscure) context.
 +
#Create the server. See this [http://www.coreservlets.com/Apache-Tomcat-Tutorial/tomcat-7-with-eclipse.html helpful page], especially the "Copy the ROOT..." section (assuming you want Tomcat to actually work properly).
 +
#Add the org.eclipse.emf.texo.web.example to that.
 +
#Start the server.
 +
#At this point, there is a pretty good chance that navigating to http://localhost:8080/org.eclipse.emf.texo.web.example/model/library will bring joy.

Latest revision as of 10:15, 20 November 2013

Texo provides both a development as well as a runtime solution. The development plugins can be downloaded and installed in Eclipse using the update manager. For runtime usage you can use maven or download directly. See further below for more information.

Development Environment and Update Sites

For Texo's development solutions you need to install Texo into Eclipse. This is done through an update manager. For runtime usage of Texo see the next section.

The latest Texo build is available through this update site:

For a stable update site which can be used in builds you can make use of the milestone build update site(s):

The last successful nightly build is available through this update site:

After installing and restarting you can generate code from ecore/xsd models and refer to Texo plugins from plugin MANIFEST.MF files.

Runtime usage, web container

For runtime usage you have several options to download the Texo jar files and their dependencies.

Texo jar files and dependencies

To use the runtime layer of Texo in a web container you need the following jar files:

  • org.eclipse.emf.texo: Texo core
  • org.eclipse.emf.texo.server: for server side logic, entitymanager handling etc.
  • org.eclipse.emf.texo.json: for json serialization and json web service support
  • org.eclipse.emf.texo.xml: for xml and xmi serialization for xml/json web service support

The Texo runtime JAR and the generated runtime classes (*ModelFactory, *ModelPackage) depend on 3 (EMF) jar-files:

  • org.eclipse.emf.common
  • org.eclipse.emf.ecore
  • org.eclipse.emf.ecore.xmi

These jar files are available through maven (for example version 2.8.0-v20120911-0500), or can be found in the plugins directory of your Eclipse installation.

Note: you can also configure Texo to only generate Entities, without EMF dependencies. In this case there is no dependency on EMF.

For JSON web service support you also need to obtain org.json jar file. These can be downloaded from the maven central repository, or try this location.

Maven

Texo jars (and their EMF dependencies) are also available in the maven central repository and in the sonatype snapshot repository.

Here is an example on how to make use of Texo snapshots available through sonatype:

<repositories>
  <repository>
    <id>sonatype-oss-public</id>
    <url>https://oss.sonatype.org/content/groups/public/</url>
    <releases>
      <enabled>true</enabled>
    </releases>
    <snapshots>
      <enabled>true</enabled>
    </snapshots>
  </repository>
</repositories>

The EMF jar files are published within the same group id as Texo: org.eclipse.emf. Texo will work fine with older versions of EMF (from 2.5.0 onwards), but if you can, use the latest EMF versions available in maven central.

When using maven in your project it makes sense to check this troubleshooting tip:

Note: the Texo pom files currently do not explicitly define dependencies to the EMF and json libraries. This means that you manually need to define the dependency to these libraries in your own pom. This will be re-solved/fine-tuned in later versions.

Download Texo jar files

The Texo jar files can also be downloaded directly from this page: http://download.eclipse.org/modeling/emft/texo/updates/interim

Texo Example Project(s)

The Texo example projects are hosted in this git repository:

This video discusses the example project setup and demos JSON web service support.

Step by Step for Web Services Noobs

(These are just the steps that worked for me, not "official" Texo docs.. Hopefully it will help other non-webdev folks.. --Milesparker.gmail.com 02:36, 10 September 2013 (UTC))

  1. (You need Eclipse for Java EE, or a whole bunch of EE features, but I'm not really sure what. Probably better just to install EE...)
  2. Install Tomcat. I used 7.0. If you're on *nix / Mac, be sure to set permissions and owner for the install dirs, or Tomcat will fail in a totally unhelpful way. See this helpful page
  3. Import the project from git://github.com/mtaal/texo.git
  4. Copy the following from you eclipse plugins dir into /WebContent/WEB-INF/lib
    • org.eclipse.emf.texo
    • org.eclipse.emf.texo.datagenerator
    • org.eclipse.emf.texo.json
    • org.eclipse.emf.texo.server
    • org.eclipse.emf.texo.xml
  5. You also probably need
    • org.json
  6. You need servlet-api.jar as well to build, at least on Mac. But don't put it into /WebContent/WEB-INF/lib -- Tomcat has a small heart attack and then complains about it in a really obscure message referencing a server spec (I kid you not). So put it in say "lib". Then add it to your build path Libraries.
  7. It should build now, but Tomcat is still unhappy. Ready for something really obscure? Select Project:Properties:Deployment Assembly. Then add the libraries that you just added to the WEB-INF there as well. No idea why this seems to be necessary but see this thread for some (painfully obscure) context.
  8. Create the server. See this helpful page, especially the "Copy the ROOT..." section (assuming you want Tomcat to actually work properly).
  9. Add the org.eclipse.emf.texo.web.example to that.
  10. Start the server.
  11. At this point, there is a pretty good chance that navigating to http://localhost:8080/org.eclipse.emf.texo.web.example/model/library will bring joy.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.