← Back to team overview

dhis2-users team mailing list archive

Re: Setting up debug session with Intellij


Hi Jim,

Thanks for the tip, that worked to get the Intellij project working.  I was
able to get a couple of the projects running using jetty. Right now I am
trying to get the web API up and running in a debug session, though when I
run the Maven jetty:run plugin command it says that It cannot resolve
dependencies for the project:

Failed to execute goal on project dhis-web-api: Could not resolve
dependencies for project org.hisp.dhis:dhis-web-api:jar:2.27-SNAPSHOT:
Failure to find org.hisp.dhis:dhis-web-api-mobile:jar:2.27-SNAPSHOT in
https://oss.sonatype.org/content/repositories/snapshots was cached in the
local repository, resolution will not be reattempted until the update
interval of ossrh has elapsed or updates are forced -> [Help 1]

My goal is to be able to make requests directly to my local instance of
DHIS2 and have the debugger break on the methods I am working on.  My
understanding is that I can do this by launching Jetty in debug mode, but
perhaps there are some extra steps before that can happen, such as building
the API itself into a jar?  I'm not very experienced with this type of
stack right now, so any help is greatly appreciated!



On Fri, Apr 28, 2017 at 7:11 PM, Jim Grace <jim@xxxxxxxxx> wrote:

> Hi Alex,
> Go under the dhis-2 directory to the dhis-web subdirectory, open up the
> pom.xml under dhis-web and make an Intellij project out of that.
> Cheers,
> Jim
> On Thu, Apr 27, 2017 at 5:02 PM, Alexander Freas <alexander.freas@
> ehealthnigeria.org> wrote:
>> Hi,
>> I am trying to set up DHIS2 to run inside Intellij and be able to start a
>> debug session when breakpoints in API endpoints are called.  I found this
>> resource from last year about doing exactly that:
>> http://dhis-developers-list.1563109.n2.nabble.com/GSOC-Getti
>> ng-the-back-end-to-hit-a-debug-break-point-tp7607822p7607830.html
>> However, I do not see the "DHIS Web Portal" Maven project after opening
>> the pom.xml in the main dhis-2 directory.
>> Am I doing something wrong or is that advice from last year out of date?
>> Is there another way to accomplish what I'm after?  I've attached a
>> screenshot of what my Maven project window looks like.
>> Thanks!
>> Alex
>> [image: Inline image 1]
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-users
>> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help   : https://help.launchpad.net/ListHelp
> --
> Jim Grace
> Core developer, DHIS 2
> HISP US Inc.
> http://www.dhis2.org <https://www.dhis2.org/>

PNG image