nfms4redd / portal

NFMS web portal client
1 stars 1 forks source link

Geosolutions proxy dependency does not include transitive dependencies #29

Closed fergonco closed 10 years ago

fergonco commented 10 years ago

Geosolutions proxy is packaged as a war which, when included as dependency, does not include transitive dependencies by default. therefore it is necessary to include in the pom.xml the transitive dependencies explicitly: https://github.com/nfms4redd/portal/commit/05faf1e3acdbd0237d011f23464143a17b102446

As it is indeed a war, is there any reason not to include it as a separated war and just update the installation documentation?

Damianofds commented 10 years ago

Don't understand, I removed the explicit dependency declaration of commons-httpclient and commons-httpclient the project build and run, the dependencies are correctly pushed in the war as transitive dependencies of http_proxy. http_proxy is packaged as jar of course (never saw a war inside a war, it seem to me a weird thing)

This is the dependency tree after the explicit trans. dep. removal from the pom file:

[INFO] [dependency:tree {execution: default-cli}] [INFO] org.fao.unredd:portal:war:3.1-SNAPSHOT [INFO] +- junit:junit:jar:4.8.2:test [INFO] +- org.mockito:mockito-all:jar:1.9.5:test [INFO] +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.12:test [INFO] | - org.codehaus.jackson:jackson-core-asl:jar:1.9.12:test [INFO] +- net.sf.json-lib:json-lib:jar:jdk15:2.4:compile [INFO] | +- commons-beanutils:commons-beanutils:jar:1.8.0:compile [INFO] | +- commons-collections:commons-collections:jar:3.2.1:compile [INFO] | +- commons-lang:commons-lang:jar:2.5:compile [INFO] | +- commons-logging:commons-logging:jar:1.1.1:compile [INFO] | - net.sf.ezmorph:ezmorph:jar:1.0.6:compile [INFO] +- commons-io:commons-io:jar:1.3.2:compile [INFO] +- net.tanesha.recaptcha4j:recaptcha4j:jar:0.0.7:compile [INFO] +- org.apache.velocity:velocity:jar:1.7:compile [INFO] +- proxy:http_proxy:jar:1.0.4:compile [INFO] | +- log4j:log4j:jar:1.2.16:compile [INFO] | +- commons-fileupload:commons-fileupload:jar:1.2.2:compile [INFO] | +- commons-httpclient:commons-httpclient:jar:3.1:compile [INFO] | | - commons-codec:commons-codec:jar:1.2:compile [INFO] | - org.mortbay.jetty:servlet-api-2.5:jar:6.1.14:compile [INFO] +- javax.servlet:javax.servlet-api:jar:3.0.1:provided [INFO] +- org.slf4j:slf4j-api:jar:1.6.6:compile [INFO] +- org.slf4j:slf4j-log4j12:jar:1.6.6:compile [INFO] +- org.eclipse.persistence:org.eclipse.persistence.jpa:jar:2.4.0:compile [INFO] | +- org.eclipse.persistence:javax.persistence:jar:2.0.4.v201112161009:compile [INFO] | +- org.eclipse.persistence:org.eclipse.persistence.asm:jar:3.3.1.v201206041142:compile [INFO] | +- org.eclipse.persistence:org.eclipse.persistence.antlr:jar:3.2.0.v201206041011:compile [INFO] | +- org.eclipse.persistence:org.eclipse.persistence.jpa.jpql:jar:2.4.0:compile [INFO] | - org.eclipse.persistence:org.eclipse.persistence.core:jar:2.4.0:compile [INFO] +- javax.validation:validation-api:jar:1.1.0.Final:compile [INFO] +- org.postgresql:postgresql:jar:9.3-1100-jdbc4:runtime [INFO] - com.h2database:h2:jar:1.3.170:runtime

Damianofds commented 10 years ago

See the latest commit in this pull request https://github.com/nfms4redd/portal/pull/54

Damianofds commented 10 years ago

Wait a compilation result from another developer, if everything will be ok I'll close the issue too.... sorry for the mess!

Damianofds commented 10 years ago

ok, building using an empty local maven repo the transitive dependencies seems not pulled down both with maven 2.2.1 and maven 3.1.1... I'm going to perform further investigations...

[INFO] [dependency:tree {execution: default-cli}] [INFO] org.fao.unredd:portal:war:3.1-SNAPSHOT [INFO] +- junit:junit:jar:4.8.2:test [INFO] +- org.mockito:mockito-all:jar:1.9.5:test [INFO] +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.12:test [INFO] | - org.codehaus.jackson:jackson-core-asl:jar:1.9.12:test [INFO] +- net.sf.json-lib:json-lib:jar:jdk15:2.4:compile [INFO] | +- commons-beanutils:commons-beanutils:jar:1.8.0:compile [INFO] | +- commons-collections:commons-collections:jar:3.2.1:compile [INFO] | +- commons-lang:commons-lang:jar:2.5:compile [INFO] | +- commons-logging:commons-logging:jar:1.1.1:compile [INFO] | - net.sf.ezmorph:ezmorph:jar:1.0.6:compile [INFO] +- commons-io:commons-io:jar:1.3.2:compile [INFO] +- net.tanesha.recaptcha4j:recaptcha4j:jar:0.0.7:compile [INFO] +- org.apache.velocity:velocity:jar:1.7:compile [INFO] +- proxy:http_proxy:jar:1.0.4:compile [INFO] +- javax.servlet:javax.servlet-api:jar:3.0.1:provided [INFO] +- org.slf4j:slf4j-api:jar:1.6.6:compile [INFO] +- org.slf4j:slf4j-log4j12:jar:1.6.6:compile [INFO] | - log4j:log4j:jar:1.2.17:compile [INFO] +- org.eclipse.persistence:org.eclipse.persistence.jpa:jar:2.4.0:compile [INFO] | +- org.eclipse.persistence:javax.persistence:jar:2.0.4.v201112161009:compile [INFO] | +- org.eclipse.persistence:org.eclipse.persistence.asm:jar:3.3.1.v201206041142:compile [INFO] | +- org.eclipse.persistence:org.eclipse.persistence.antlr:jar:3.2.0.v201206041011:compile [INFO] | +- org.eclipse.persistence:org.eclipse.persistence.jpa.jpql:jar:2.4.0:compile [INFO] | - org.eclipse.persistence:org.eclipse.persistence.core:jar:2.4.0:compile [INFO] +- javax.validation:validation-api:jar:1.1.0.Final:compile [INFO] +- org.postgresql:postgresql:jar:9.3-1100-jdbc4:runtime [INFO] - com.h2database:h2:jar:1.3.170:runtime

Damianofds commented 10 years ago

Ok now it should works https://github.com/nfms4redd/portal/commit/5751cbe0958622cc8cec0930961dc5d546ae7cd9 Can someone try to make a build and run or simply check if the dependency tree is generated in the right way? (as showed in the first comment)

fergonco commented 10 years ago

Done kind of successfully. The problem is that it includes now a jetty servlet API of a previous version than the one we declare in our pom.xml. See http://stackoverflow.com/questions/4840569/why-getservletcontext-isnt-found

Working on it now.