Can i add my own project type? - fabric8

I would like to add a new button here that creates a project with the SBT build system. How do i go about adding a project type in this menu?
Menu image found below
fabric8 project type picker

There are 2 options really
create a maven archetype (as in a tarball of stuff you wanna use as the basis of new projects); the tooling will then just work with your archetypes.
Note that the use of maven archetypes is just a way to package sample projects - it doesn't really matter how you build them. e.g. we use maven archetypes to create lots of different projects not using Java (Swift, Node JS, .NET etc)
If you have a sample project and don't mind sharing, we could clone it into the fabric8-quickstarts organisation & it'll get automatically included in the console in the next release
create a JBoss Forge addon. If you wish to create a custom wizard to create new projects using SBT, you can add a new addon to JBoss Forge and we (or you) can then install it into the fabric8-forge docker image

Related

How to make Spring Tool Suite like a multi-maven-module project?

I'm trying to create a Spring Boot project with multiple Maven modules. I've used the tutorial at https://spring.io/guides/gs/multi-module/ .
This site recommends a directory tree like this:
parent
application
src, and other subdirectories
pom.xml
library
src, and other subdirectories
pom.xml
pom.xml
I developed this project using Visual Source Code.
Wanting to see the project in another light, I tried to import the project directories into Spring Tool Suite. I'm using a recent one, where you apply the STS plugin to an up-to-date Eclipse installation.
Well, STS doesn't really like this project.
The (File, Open projects from file system) sees the project, but the Finish button doesn't actually do anything.
The (File, Import, General, Existing Projects into Workspace) imports a project, but as a Maven project (no "J" icon). When I try the (Run, Run Configurations) it won't see my project.
How can such a project be made friendly to Spring Tool Suite?
Thanks,
Jerome.
To make multi maven projects what you can do is, simply download two separate maven projects from start.spring.io and then extract them and move both folders to one parent folder and try grabbing the parent folder to Intellij, so it automatically downloads the dependencies and other requirement for the project in which we have two maven projects in one single entity
Eclipse can be a bit confusing with several different Wizards to import projects. Ironically the wizards are supposed to make importing projects easy, and in a sense they do... but... unfortunately picking the right wizard itself can be a bit challenging / confusing. Which wizard you use depends on the type of project.
Since your projects are maven projects, the best wizard to use would be the one for maven projects. You can find it at "File >> Import >> Existing Maven Projects".
So give that a try, point it at the 'parent' folder of your project and you should be presented with a relatively intuitive UI to import all 3 projects and configure them for use in Eclipse.

unable to create maven project in eclipse photon

I have been trying to create a maven project in eclipse photon.I also tried checking proxy settings,linked a "settings.xml" file in user settings,linked a "catalog.xml" under archetype.But it didn't worked.Eclipse is configured with java 8 version.I am unable to upload photos so i will describe.
These are the steps I followed while creating Maven project.
File->New->other->Maven->Maven Project->Next->Next->Selected Archetype-quickstart1.1->Next->provided Artifact and Group Id and Finish.
Here I'm getting could not resolve archetype error.
It's not very clear the issue you are facing and how you are creating the maven project. Eclipse comes with a great in built maven support. It's not necessary to configure settings.xml unless you are using your own repository instead of the default repository .m2
However assuming that you have installed Eclipse Photon correctly. Here are the steps involved in creation of simple maven project.
Click on File-->New-->Others.
On the new window look for maven and click on Maven Project.
This will launch new window **New Maven Project*. If you don't want to select available archetypes, then click on the checkbox named "Create Simple Project(Skip Archetype Selection)" and click on next.
Fill in your project details and click on finish. That's it.
Eclipse will generate a fresh maven project for you.
The other configurations are required based on the type of project you are creating.
Hope this helps !!!

how the best way to create project with maven on eclips?

i know there are 2 methode to create project with Maven.
Create Dynamic project on eclipse and convert it into maven project
Create Maven project with command line and then import the project into eclips.
i always do the 1. choise.
If You have latest eclipse IDE then its very simple.
Go to Create new Project wizard and search maven project. (if its old eclipse IDE then you probably need to install m2e plug in from market place).
select maven project and next. Check (Create a simple project) if you want customization other wise just click Next and You will be presented a number of ready made archtypes.
For simple console projects you can chose maven-archtype-quickstart. or what ever project you want to create.
Now Give groupId e.g. com.yourcompany or com.yourprojectgroup and artifactId e.g. projectname-alias . and Click Finish.
First Time eclipse will create local repo if its not already created and then put default dependencies defined by provided pom in your local repo. Further you just need maven knowledge to customize project. e.g. New Dependencies and build system etc.
I hope this will clear your mind. I prefer this way because its fast and easy.
If you create a new project in Eclipse (at least in Mars or Neon), you can choose "Maven Project" and get everything you need. Don't use eclipse goals of Maven. They are deprecated.

Spring STS not recognizing project structure with Gradle

I'm trying to do this getting started guide from Spring. So I cloned the project using git from the command line. As I'm working with Gradle, I removed the Maven files from the repository to clean the project.
After that I open my STS and go to File -> Open Projects from File System and navigate to the /initial folder of the repository. The project is imported correctly but when I try to add some "java stuff" (packages, classes, etc.) I get several errors and I can only add folders and files, which is quite annoying for working.
To be more descriptive, I'll add some images so you can see what's happening. This is the project initially imported into STS as I described above:
Then I try to add some java stuff, let's say for example a source folder. So Right Click on library -> New -> Source folder and this is the result:
And in the properties of library I have the following:
So the question is: how can I tell to STS to recognize the library folder as a Java Project (or Gradle module, I don't know how to call it) instead of a plain folder so I can add my packages and classes?
Thanks in advance for your answers.
In case you would like to work with Gradle, you should use the Gradle integration for Eclipse (project Buildship) and install that into your STS environment. After that, you should be able to import the projects either from disc as existing Gradle project (not as file system) or via the wizard that integrates the spring guides into STS (Import Getting Started Content). The wizard for the guides also let you choose between the Maven and the Gradle variant, so you don't need to close and delete stuff yourself.
Hope this helps!!!

Creating an Eclipse RCP application and plugin repository from the same sources

I'm trying to create an Eclipse (3.x) RCP application from plugins in such a way as to allow me to provide ordinary plugins for existing Eclipse installations, but also create an RCP application from those plugins.
My experimentation has led me to have the following layout:
com.company.testapp.plugin
com.company.testapp.feature
com.company.testapp.updatesite
Where each ID depends on the previous one. This works correctly and I can build an update site from the plugin via the feature. What I would now like to do is add something like
com.company.testapp.rcp
Containing just the required machinery to provide an RCP 'wrapper' around the feature. com.company.testapp.rcp contains a product definition, testapp.product.
However, I can't seem to make this link work; I'm getting "Product com.company.testapp.rcp.product could not be found" on trying to launch from the product configuration.
(Ultimately, I'd like to be able to drive the creation of both the update site and RCP application from Maven/Tycho—I have another com.company.testapp.master containing the master POM which I can again successfully build the update site from.)
I've found plenty of resources on building plugins with Tycho, and plenty on building RCP applications, but nothing on building both from the same source tree. I'm not an Eclipse or Tycho expert by any means, so it's possible I'm just not aware of what I should be searching for.
Is such a thing even possible?
Instead of com.company.testapp.updatesite (and com.company.testapp.rcp) create a new module: com.company.testapp.repository that defines a product and p2 repository (a replacement for old update-site mechanism). The module should have the following files:
category.xml where you define features in p2 repository and their categories (in your case com.company.testapp.feature)
*.product - a product definition file
pom.xml file that defines eclipse-repository module; detailed configuration is explained at Tycho Packaging Types - eclipse-repository

Resources