How debug wso2 Emm version 2 java souce code? - wso2

I want to do some cutomization to the wso2 mdm-product source code (EMM version 2) : https://github.com/wso2/product-mdm
Indeed, when i made some modification to the source code, i need at least 15 min to build the maven projet with eclipce IDE.
Is there other solution to build project directly on carbon server?
How can we debug project with eclipse IDE on carbon IDE?

Usually, it takes some amount of time to build the WSO2 product-mdm, in your case, 15 minutes looks perfectly normal. I'd recommend building the source code using the terminal as follows.
Navigate to the repository directory
cd [path-to-dir]/product-mdm
Perform a clean Maven Build
mvn clean install
If you're unclear about the building process of WSO2 EMM Repositories, the answer on below question might help you to understand the building order.
How to use and understand wso2 git repositories?
Debugging
Remote debugging the project is easy.
Setup the Eclipse IDE for remote debugging as described in this link,
Debugging With Eclipse
Navigate to "[EMM_HOME]/bin/" folder and run the server in debug mode.
sh ./wso2server.sh -debug [specify-port-here]
eg: sh ./wso2server.sh -debug 5005
Once the server is up, you can start debugging.

Related

How to configure my Jenkins to auto build and test my Qt project?

I'm a newer to Qt project,strange to its project structure.
I have used jenkins+git+github+MSBuild+xUnit to build CI for VS project in windows.
Now my job is to configure jenkins so that it can auto build and test my qt project(in Ubuntu).
However,it seems there is few information about "jenkins build Qt project".
I don't know which plugins should I use on jenkins and how to configure them.
Can you show me how to do that?(I use Ubuntu 16.04)
I have read this blog,and try to run that way:
https://www.peter.hartmann.tk/single-post/2015/06/17/Minimal-Continuous-Integration-for-Git-projects-with-Jenkins-and-a-Qt-example
In this blog,it use "qmake && make && make check" to do all the thing(build and test) without installing any plugin.what does this command do?Does it work for all Qt project?
What's more,in Ubuntu,can I pack my Qt project using jenkins?If yes,how to do that?(Windows can pack qt project as .exe file, Ubuntu pack as what kind of file?)
I'll just link to already existing materials, which there's plenty of.
In general there's three main steps in what you want to do:
Trigger Jenkins build after git push: How can I make Jenkins CI with git trigger on pushes to master?. That gives you Jenkins job execution (that at this point does nothing) after each git push automatically.
Pulling changes from SCM - that is a ready step within regular Jenkins project that you just click through.
Building your project - in case of QT project which can be built from command line (Compile a Qt project from command Line) you can add this as a simple shell command build step in Jenkins.
Optionally you can then run tests on the result, store your artifacts after a successful build and/or trigger email notifications on failed builds.
As for storing artifacts - there's a ready plugin for that (https://wiki.jenkins.io/display/JENKINS/Compress+Artifacts+Plugin).

How to build Qt applications using Team Foundation Server 2017

I am currently in the process of migrating a couple of legacy Qt5 projects to a new Team Foundation Server. All projects have been developed for Windows in Visual Studio using the Qt VS AddIn (and thus don't use .pro-files). I would love to use the TFS Build Agent to build these on other platforms (mainly linux).
I have previously done this on other projects using Jenkins and qmake, having platform-dependent settings in the .pro-file.
Is there an established workflow for building VS projects using Qt5 via a TFS Build Server on other platforms?
I don't use TFS but, since TFS Build operates on Visual Studio solutions, it ought to be possible to use the "Linux development with C++" feature of VS2017. Just setup a Linux project in the VS solution and it should build like any other.
Seems you'd like to build Cross-Platform Code in Linux using TFS vNext build system. To build or deploy you'll need at least one agent. The cross platform build agent is support on Ubuntu, Red Hat, and CentOS.
Detail steps please refer this tutorial-- Deploy an agent on Linux. Then simply create the build definition add build task, select the Linux build agent the same as build on windows. More detail step and build configuration you could take a look at this video tutorial-- Building and Deploy Applications In Linux With TFS
In your case, there is not corresponding VS/Qt VS AddIn in your Linux environment. You need to set up your Linux build agent local environment to build your qt5 application successfully, then it's not hard to build through tfs.
Another way is scripting the Linux build process to run over SSH or some other remote protocol, and driving this process from the Windows build agent.

WSO2 Carbon server - error when launching

I'm trying to run wso2 api manager from the source code. I downloaded carbon4kernel and the product-apim as stated on the site. The code builds successfully and imports into eclipse, but I can't launch the carbon server.
When I execute wso2server.sh I get the following:
Error: Could not find or load main class org.wso2.carbon.launcher.Main
Even if I add the class to the classpath, it finds the Main class, but I get:
SEVERE {org.wso2.carbon.launcher.Main} - org/osgi/framework/launch/FrameworkFactory
This is using the C5 server (although the download seems to suggest carbon4) and apiman 1.9.1.
Its worth noting that the binary distribution works straight out of the box, but uses an older version of carbon (AXIS2-based), but the source code version uses OSGi.
Does anyone have this working, or point me to where its going wrong please?
We don't have any products released on top of C5. So basically at the moment you cannot build API Manager with C5.
About building and running C5, which wso2server.sh did you try to run? I guess you tired with the one at distribution/kernel/carbon-home/bin/wso2server.sh. If that is the case it won't work. What you need to do is, build the project from the root pom.xml and at distribution/kernel/target the built zip file. Unzip it and try the wso2server.sh in the bin directory.
Alternatively, without building from source, you can download and try the C5 kernel binary from https://github.com/wso2/carbon-kernel/releases/tag/v5.0.0

Eclipse CDT PTP Remote Tools will remotely build makefile, but not make/compile after

I am trying to use Eclipse 4.3 on Windows for remote Linux C++ development. I am currently using the Eclipse PTP package which comes with all the necessary plugins to do remote development. I made a new C++ Remote Project and I have it set to talk to the linux machine via the 'Remote Tools' service. I am able to use all the terminal and file browsing services as expected. However, when I go to 'build' my project, all it does is generate the makefile on the remote machine, it will not compile it into a binary. Through terminal, I can make the makefile and it will compile be run successfully. However, the generated binary is not seen by eclipse and so all the nice binary things like Run/Debug can not be used on the manually made binary.
Essentially I am looking for a way to hit the 'Build' button, and have it compile my remote project into a binary that will be recognized by eclipse.

Jenkins with a Cocos2d-X project

I have just recently moved into developing Cocos2d-X application for Android devices, from native Android application development. I am looking to configure my Cocos2d-X C++/JAVA project in a JENKINS environment.
Has anyone any experience of using JENKINS with cocos2d-X projects ? Any tips on where i can get started ?
You can use the cutom scrip option, for example if you use the cocos2d-x model for build you can build your project with the custom command "make", in adition you can use statically code check, bla, bla, ...
I use too my machine as slave for no put the build environment in the server.
Yes. It depends upon the build tool you are using. I am using Ant with Eclipse. Try to read about building an Android Project from Command Line Using ant or gradle. and there you go,Include "Build Step"-> "Execute shell" in jenkins.
You have to manually check for all dependencies.