Results 1 to 6 of 6

Thread: Automating creation of STS workspaces

  1. #1
    Join Date
    Feb 2013
    Posts
    3

    Lightbulb Automating creation of STS workspaces

    I am looking for options to provide several members of a large team with a pre-configured STS workspace which includes: user preferences, a number of pre-configured tcServer instances, and projects (most are Maven projects but I may still have to support some Eclipse projects). Each version of the end project (multiple m2e projects per version) requires a new workspace.

    For this I am looking at extending the "org.eclipse.ant.core.antTasks" extension point provided by the "org.eclipse.ant.core" plugin to add in new Ant Tasks to perform the following tasks:
    • import m2e projects,
    • import user preferences,
    • and create tcServer instances.


    The new Ant Tasks would be callable from a build file used by the Equinox Launcher.

    Example:
    "%JAVA_HOME%/bin/java.exe" %JVM_ARGS% -cp "%LAUNCHERJAR%" org.eclipse.equinox.launcher.Main -noupdate -application org.eclipse.ant.core.antRunner -data "%WORKSPACE_DIR%" -buildfile build.xml

    Questions
    1. Has anyone else used a similar approach to creating STS workspace?
    2. If not is there another approach that would be easier to implement?


    All ideas are welcome.

  2. #2
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,640

    Default

    Hey!

    Another way of doing this could be: implement your own plugin for STS that does all this for the first startup within a new workspace. That could be implemented using the direct APIs of the underlying features within STS, for example to create and/or import certain tc Server instances into STS. Something like this is implemented in the automatic workspace configuration in STS at the moment and you could implement your own mechanism in the same way.

    The same could be done for importing m2e projects re-using the m2e API.

    HTH,
    Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

  3. #3
    Join Date
    Feb 2013
    Posts
    3

    Default Any sample code?

    Martin,

    Thank you for the input. I had not thought about writing a plugin that does this on the first startup within a new workspace. Do you know of any open source examples I could take a look at as an example? I am particularly interested in an example that creates or imports a tcServer instance.

    Qwen H

    Quote Originally Posted by Martin Lippert View Post
    Hey!

    Another way of doing this could be: implement your own plugin for STS that does all this for the first startup within a new workspace. That could be implemented using the direct APIs of the underlying features within STS, for example to create and/or import certain tc Server instances into STS. Something like this is implemented in the automatic workspace configuration in STS at the moment and you could implement your own mechanism in the same way.

    The same could be done for importing m2e projects re-using the m2e API.

    HTH,
    Martin

  4. #4
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,640

    Default

    Hey!

    I would take a look at this class:

    https://github.com/SpringSource/ecli...rCallback.java

    It is part of our tc Server integration for Eclipse and is responsible for creating and importing the default instance.

    This code is called by the general infrastructure within STS for automatic workspace configuration (for runtimes) that is part of this project:

    https://github.com/SpringSource/ecli...s.configurator

    HTH,
    Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

  5. #5
    Join Date
    Feb 2013
    Posts
    3

    Default Which version of STS?

    Martin,

    Thanks for your help this is exactly what I was looking for. It would be great if we could re-use the TcServerUtils in our own Eclipse plugin. Is this plugin part of STS 2.8.1 or do I have to upgrade to STS 3.1 to get the latest and greatist.

    Qwen

    Quote Originally Posted by Martin Lippert View Post
    Hey!

    I would take a look at this class:

    https://github.com/SpringSource/ecli...rCallback.java

    It is part of our tc Server integration for Eclipse and is responsible for creating and importing the default instance.

    This code is called by the general infrastructure within STS for automatic workspace configuration (for runtimes) that is part of this project:

    https://github.com/SpringSource/ecli...s.configurator

    HTH,
    Martin

  6. #6
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,640

    Default

    Hey Qwen!

    The tc Server integration feature of STS 2.8.1 is not open-source and therefore you could call its code from other plugins, but there is no (legal) way to take a look at the code, copy it, modify it, etc.

    Using STS 3.1.0 would give you the option to directly re-use the existing code while looking at it at the same time. But you could also take a copy of that now open-sourced code and re-use it inside your own plugin, which you could then deploy on STS 2.8.1, STS 3.1.0, or beyond. In that case, just make sure you follow the rules of the EPL (the open-source license of the tc Server integration for STS 3.0.0 and beyond) for this use case.

    HTH,
    Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •