Re: [Dhis2-devs] novice DHIS2 dev setup question

2015-11-18 Thread Morten Olav Hansen
Hi

To run individual modules, you can use mvn jetty:run as you do, but for the
portal you must use mvn jetty:run-war

--
Morten

On Thu, Nov 19, 2015 at 9:34 AM, Kenneth Haase  wrote:

> I'm trying to get DHIS2 running on my Ubuntu 14.04 desktop using the
> directions at https://www.dhis2.org/development.  I've got Oracle Java 8
> and Maven 3 installed (I was told that things had moved to Maven 3, even
> though the website mentioned Maven 2).
>
> I'm using it with Eclipse Kepler (4.3) which is what comes bundled with
> this version of Ubuntu.
>
> I'm able to run "mvn install" in the dhis-2 root directory and the
> dhis-2/dhis-web directories without any complaints.  I've set up my
> hibernate.properties file in a DHIS2_HOME directory as set up in my shell.
>
> When I go into dhis-web-portal and do "mvn jetty:run," it begins its
> startup but then throws an error complaining of duplicate fragments.  When
> I look at the files causing the problem, one of them is in the DHIS-2 tree
> and the other is in my ~/.m2/repository. When I edit the dhis-web/pom.xml
> file to add the AllowDuplicateFragmentNames option, I don't get the
> duplicate fragment names error, but I do get an error about an attempt to
> instantiate two AsyncAnnotationBeanPostProcessor instances in the same
> context.  It seems like another kind of duplication error, but I can't
> figure out what is being duplicated and I'd also expect the pom.xml to work
> "out of the box".
>
> I've appended the output of "mvn jetty:run" for the
> AllowDuplicateFragmentNames configuratio.
>
> To confuse things further, I can go into other subdirectories of dhis-web
> and do "mvn jetty:run" and actually get webapps to come up at
> localhost:8080, though I'm not sure they're entirely functional.
>
> Any suggestions as to what I might be doing wrong?
>
> Thanks,
> Ken Haase
>
> ===
>
> 11:55  haase@moby:../dhis-web-portal$ mvn jetty:run
> [INFO] Scanning for projects...
> [INFO]
> [INFO] 
> 
> [INFO] Building DHIS Web Portal 2.22-SNAPSHOT
> [INFO] 
> 
> [INFO]
> [INFO] >>> jetty-maven-plugin:9.2.7.v20150116:run (default-cli) @
> dhis-web-portal >>>
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @
> dhis-web-portal ---
> [debug] execute contextualize
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 2 resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @
> dhis-web-portal ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:testResources
> (default-testResources) @ dhis-web-portal ---
> [debug] execute contextualize
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory /raid1/src/dhis2/src/dhis-2/dh
> is-web/dhis-web-portal/src/test/resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile)
> @ dhis-web-portal ---
> [INFO] No sources to compile
> [INFO]
> [INFO] <<< jetty-maven-plugin:9.2.7.v20150116:run (default-cli) @
> dhis-web-portal <<<
> [INFO]
> [INFO] --- jetty-maven-plugin:9.2.7.v20150116:run (default-cli) @
> dhis-web-portal ---
> 2015-11-18 11:55:49.042:INFO::main: Logging initialized @4410ms
> [INFO] Configuring Jetty for project: DHIS Web Portal
> [INFO] webAppSourceDirectory not set. Trying src/main/webapp
> [INFO] Reload Mechanic: automatic
> [INFO] Classes = /raid1/src/dhis2/src/dhis-2/dh
> is-web/dhis-web-portal/target/classes
> [INFO] Context path = /
> [INFO] Tmp directory = /raid1/src/dhis2/src/dhis-2/dh
> is-web/dhis-web-portal/target/tmp
> [INFO] Web defaults = org/eclipse/jetty/webapp/webdefault.xml
> [INFO] Web overrides =  none
> [INFO] Dependent war artifact org.hisp.dhis:dhis-web-commons
> -resources:war:2.22-SNAPSHOT
> [INFO] Dependent war artifact org.hisp.dhis:dhis-web-ohie:wa
> r:2.22-SNAPSHOT
> [INFO] Dependent war artifact org.hisp.dhis:dhis-web-uaa:war:2.22-SNAPSHOT
> [INFO] Dependent war artifact org.hisp.dhis:dhis-web-sms:war:2.22-SNAPSHOT
> [INFO] Dependent war artifact org.hisp.dhis:dhis-web-mainten
> ance-datadictionary:war:2.22-SNAPSHOT
> [INFO] Dependent war artifact org.hisp.dhis:dhis-web-mainten
> ance-dataset:war:2.22-SNAPSHOT
> [INFO] Dependent war artifact org.hisp.dhis:dhis-web-mainten
> ance-organisationunit:war:2.22-SNAPSHOT
> [INFO] Dependent war artifact org.hisp.dhis:dhis-web-mainten
> ance-user:war:2.22-SNAPSHOT
> [INFO] Dependent war artifact org.hisp.dhis:dhis-web-mainten
> ance-dataadmin:war:2.22-SNAPSHOT
> [INFO] Dependent war artifact org.hisp.dhis:dhis-web-mainten
> ance-program:war:2.22-SNAPSHOT
> [INFO] Dependent war artifact org.hisp.dhis:dhis-web-mainten
> ance-mobile:war:2.22-SNAPSHOT
> [INFO] Dependent war artifact org.hisp.dhis:dhis-web-importe
> 

[Dhis2-devs] novice DHIS2 dev setup question

2015-11-18 Thread Kenneth Haase
I'm trying to get DHIS2 running on my Ubuntu 14.04 desktop using the
directions at https://www.dhis2.org/development.  I've got Oracle Java 8
and Maven 3 installed (I was told that things had moved to Maven 3, even
though the website mentioned Maven 2).

I'm using it with Eclipse Kepler (4.3) which is what comes bundled with
this version of Ubuntu.

I'm able to run "mvn install" in the dhis-2 root directory and the
dhis-2/dhis-web directories without any complaints.  I've set up my
hibernate.properties file in a DHIS2_HOME directory as set up in my shell.

When I go into dhis-web-portal and do "mvn jetty:run," it begins its
startup but then throws an error complaining of duplicate fragments.  When
I look at the files causing the problem, one of them is in the DHIS-2 tree
and the other is in my ~/.m2/repository. When I edit the dhis-web/pom.xml
file to add the AllowDuplicateFragmentNames option, I don't get the
duplicate fragment names error, but I do get an error about an attempt to
instantiate two AsyncAnnotationBeanPostProcessor instances in the same
context.  It seems like another kind of duplication error, but I can't
figure out what is being duplicated and I'd also expect the pom.xml to work
"out of the box".

I've appended the output of "mvn jetty:run" for the
AllowDuplicateFragmentNames configuratio.

To confuse things further, I can go into other subdirectories of dhis-web
and do "mvn jetty:run" and actually get webapps to come up at
localhost:8080, though I'm not sure they're entirely functional.

Any suggestions as to what I might be doing wrong?

Thanks,
Ken Haase

===

11:55  haase@moby:../dhis-web-portal$ mvn jetty:run
[INFO] Scanning for projects...
[INFO]
[INFO] 

[INFO] Building DHIS Web Portal 2.22-SNAPSHOT
[INFO] 

[INFO]
[INFO] >>> jetty-maven-plugin:9.2.7.v20150116:run (default-cli) @
dhis-web-portal >>>
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @
dhis-web-portal ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @
dhis-web-portal ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources)
@ dhis-web-portal ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /raid1/src/dhis2/src/dhis-2/dh
is-web/dhis-web-portal/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @
dhis-web-portal ---
[INFO] No sources to compile
[INFO]
[INFO] <<< jetty-maven-plugin:9.2.7.v20150116:run (default-cli) @
dhis-web-portal <<<
[INFO]
[INFO] --- jetty-maven-plugin:9.2.7.v20150116:run (default-cli) @
dhis-web-portal ---
2015-11-18 11:55:49.042:INFO::main: Logging initialized @4410ms
[INFO] Configuring Jetty for project: DHIS Web Portal
[INFO] webAppSourceDirectory not set. Trying src/main/webapp
[INFO] Reload Mechanic: automatic
[INFO] Classes = /raid1/src/dhis2/src/dhis-2/dh
is-web/dhis-web-portal/target/classes
[INFO] Context path = /
[INFO] Tmp directory = /raid1/src/dhis2/src/dhis-2/dh
is-web/dhis-web-portal/target/tmp
[INFO] Web defaults = org/eclipse/jetty/webapp/webdefault.xml
[INFO] Web overrides =  none
[INFO] Dependent war artifact org.hisp.dhis:dhis-web-commons
-resources:war:2.22-SNAPSHOT
[INFO] Dependent war artifact org.hisp.dhis:dhis-web-ohie:war:2.22-SNAPSHOT
[INFO] Dependent war artifact org.hisp.dhis:dhis-web-uaa:war:2.22-SNAPSHOT
[INFO] Dependent war artifact org.hisp.dhis:dhis-web-sms:war:2.22-SNAPSHOT
[INFO] Dependent war artifact org.hisp.dhis:dhis-web-mainten
ance-datadictionary:war:2.22-SNAPSHOT
[INFO] Dependent war artifact org.hisp.dhis:dhis-web-mainten
ance-dataset:war:2.22-SNAPSHOT
[INFO] Dependent war artifact org.hisp.dhis:dhis-web-mainten
ance-organisationunit:war:2.22-SNAPSHOT
[INFO] Dependent war artifact org.hisp.dhis:dhis-web-mainten
ance-user:war:2.22-SNAPSHOT
[INFO] Dependent war artifact org.hisp.dhis:dhis-web-mainten
ance-dataadmin:war:2.22-SNAPSHOT
[INFO] Dependent war artifact org.hisp.dhis:dhis-web-mainten
ance-program:war:2.22-SNAPSHOT
[INFO] Dependent war artifact org.hisp.dhis:dhis-web-mainten
ance-mobile:war:2.22-SNAPSHOT
[INFO] Dependent war artifact org.hisp.dhis:dhis-web-importe
xport:war:2.22-SNAPSHOT
[INFO] Dependent war artifact org.hisp.dhis:dhis-web-validat
ionrule:war:2.22-SNAPSHOT
[INFO] Dependent war artifact org.hisp.dhis:dhis-web-dataent
ry:war:2.22-SNAPSHOT
[INFO] Dependent war artifact org.hisp.dhis:dhis-web-dashboa
rd-integration:war:2.22-SNAPSHOT
[INFO] Dependent war artifact org.hisp.dhis:dhis-web-light:war:2.22-SNAPSHOT
[INFO] Dependent war artifact org.hisp.dhis:dhis-web-mobile: