Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shift to new maven repositories (OSGeo) #4700

Merged
merged 14 commits into from
May 26, 2020

Conversation

jodygarnett
Copy link
Contributor

@jodygarnett jodygarnett commented May 20, 2020

See proposal Host Geonetwork artifacts on repo.osgeo.org for details.

Cache remote repositories:

  • define repo.osgeo.org seasar-cache
  • define repo.osgeo.org k-int-cache
  • define repo.osgeo.org geonetwork-cache as a proxy for core-maven-repo.

Note replacing core-maven-repo was not successful and is being cached above.
Build changes and dependency review:

  • pom.xml cleanup with organization, developer, ...
  • oracle driver (testing with Oracle-XE recommended)

Going to save change to maven-resources-plugin:copy-resources to maven-dependency-plugin:unpack for subsequent PR as it may be quite extensive.

@jodygarnett jodygarnett marked this pull request as draft May 20, 2020 07:10
pom.xml Outdated Show resolved Hide resolved
pom.xml Show resolved Hide resolved
web/pom.xml Outdated Show resolved Hide resolved
@jodygarnett jodygarnett marked this pull request as ready for review May 20, 2020 14:55
pom.xml Outdated Show resolved Hide resolved
pom.xml Outdated Show resolved Hide resolved
pom.xml Outdated Show resolved Hide resolved
@juanluisrp
Copy link
Contributor

Running in a clean .m2 repository it compiles

mvn clean install -DskipTests

[INFO] Reactor Summary:
[INFO]
[INFO] GeoNetwork opensource 3.11.0-SNAPSHOT .............. SUCCESS [01:07 min]
[INFO] common utils 3.11.0-SNAPSHOT ....................... SUCCESS [01:28 min]
[INFO] Caching xslt module 3.11.0-SNAPSHOT ................ SUCCESS [  1.202 s]
[INFO] ArcSDE module (dummy-api) 3.11.0-SNAPSHOT .......... SUCCESS [ 57.208 s]
[INFO] GeoNetwork domain 3.11.0-SNAPSHOT .................. SUCCESS [01:31 min]
[INFO] Oaipmh modules 3.11.0-SNAPSHOT ..................... SUCCESS [  0.580 s]
[INFO] GeoNetwork Events 3.11.0-SNAPSHOT .................. SUCCESS [  0.566 s]
[INFO] GeoNetwork schema plugins 3.7 ...................... SUCCESS [ 10.061 s]
[INFO] GeoNetwork schema plugins core 3.7 ................. SUCCESS [  4.805 s]
[INFO] GeoNetwork schema plugin for ISO19139/119 standards 3.7 SUCCESS [ 13.010 s]
[INFO] GeoNetwork index using Elasticsearch 3.11.0-SNAPSHOT SUCCESS [ 10.036 s]
[INFO] GeoNetwork index Elasticsearch client 3.11.0-SNAPSHOT SUCCESS [ 18.171 s]
[INFO] GeoNetwork core 3.11.0-SNAPSHOT .................... SUCCESS [03:23 min]
[INFO] GeoNetwork Events 3.11.0-SNAPSHOT .................. SUCCESS [  1.248 s]
[INFO] GeoNetwork schema plugin for Dublin Core records retrieved by CSW 3.7 SUCCESS [  2.051 s]
[INFO] GeoNetwork schema plugin for Dublin Core standard 3.7 SUCCESS [  0.452 s]
[INFO] GeoNetwork schema plugin for ISO19110 standard 3.7 . SUCCESS [  0.376 s]
[INFO] GeoNetwork schema plugin for ISO19115-3:2018 standard 3.7 SUCCESS [ 12.761 s]
[INFO] GeoNetwork CSW server 3.11.0-SNAPSHOT .............. SUCCESS [  2.284 s]
[INFO] GeoNetwork harvesters 3.11.0-SNAPSHOT .............. SUCCESS [  6.998 s]
[INFO] GeoNetwork health monitor 3.11.0-SNAPSHOT .......... SUCCESS [  1.175 s]
[INFO] GeoNetwork Digital Object Identifier (DOI) client 3.11.0-SNAPSHOT SUCCESS [  0.984 s]
[INFO] GeoNetwork services 3.11.0-SNAPSHOT ................ SUCCESS [01:01 min]
[INFO] Geonetwork Web Resources 4 Java 3.11.0-SNAPSHOT .... SUCCESS [01:45 min]
[INFO] GeoNetwork INSPIRE Atom 3.11.0-SNAPSHOT ............ SUCCESS [  4.770 s]
[INFO] GeoNetwork dashboard app based on Kibana 3.11.0-SNAPSHOT SUCCESS [  0.084 s]
[INFO] Release module 3.11.0-SNAPSHOT ..................... SUCCESS [ 47.158 s]
[INFO] messaging 3.11.0-SNAPSHOT .......................... SUCCESS [01:10 min]
[INFO] workers 3.11.0-SNAPSHOT ............................ SUCCESS [  0.061 s]
[INFO] WFS features harvester 3.11.0-SNAPSHOT ............. SUCCESS [ 57.835 s]
[INFO] GeoNetwork Slave 3.11.0-SNAPSHOT ................... SUCCESS [  0.923 s]
[INFO] Tests for schema plugins 3.11.0-SNAPSHOT ........... SUCCESS [  3.210 s]
[INFO] GeoNetwork user interface module 3.11.0-SNAPSHOT ... SUCCESS [ 12.048 s]
[INFO] GeoNetwork Web module 3.11.0-SNAPSHOT .............. SUCCESS [01:05 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  10:47 min (Wall Clock)
[INFO] Finished at: 2020-05-20T15:25:44Z
[INFO] ------------------------------------------------------------------------

@jodygarnett
Copy link
Contributor Author

Deploying snapshots worked, see result here: https://repo.osgeo.org/repository/geonetwork-snapshots/

I would like to see this merged, and setup in jenkins.

I know that deploy from travis is possible but I would prefer to be cautious with osgeo repository credentials.

Signed-off-by: Jody Garnett <[email protected]>
@juanluisrp juanluisrp changed the title shift to new maven repositories Shift to new maven repositories (OsGeo) May 21, 2020
@juanluisrp juanluisrp changed the title Shift to new maven repositories (OsGeo) Shift to new maven repositories (OSGeo) May 21, 2020
@juanluisrp juanluisrp added this to the 3.10.3 milestone May 21, 2020
@josegar74
Copy link
Member

josegar74 commented May 22, 2020

I have checkout a clean master branch and applied also metadata101/iso19115-3.2018#66, but when trying to build I get the following error:

$ mvn  install -Penv-prod -DskipTests
Listening for transport dt_socket at address: 5005
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.version' for org.mapfish.print:print-lib:jar must be a valid version but is '${print-lib.version}'. @ org.geonetwork-opensource:core:[unknown-version], /.../core/pom.xml, line 359, column 16

I think in core/pom.xml should be removed <version>${print-lib.version}</version>

Updating that line locally the build works, but there're issues running the application in Jetty with mapfish:

cd web
mvn jetty:run

...
2020-05-22 12:11:23,702 ERROR [jeeves] - JeevesContextLoaderListener: Error creating bean with name 'database-migration-bean': Unsatisfied dependency expressed through field 'systemInfo': Cannot find class [com.codahale.metrics.MetricRegistry] for bean with name 'metricRegistry' defined in class path resource [mapfish-spring-application-context.xml]; nested exception is java.lang.ClassNotFoundException: com.codahale.metrics.MetricRegistry; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.codahale.metrics.MetricRegistry] for bean with name 'metricRegistry' defined in class path resource [mapfish-spring-application-context.xml]; nested exception is java.lang.ClassNotFoundException: com.codahale.metrics.MetricRegistry
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'database-migration-bean': Unsatisfied dependency expressed through field 'systemInfo': Cannot find class [com.codahale.metrics.MetricRegistry] for bean with name 'metricRegistry' defined in class path resource [mapfish-spring-application-context.xml]; nested exception is java.lang.ClassNotFoundException: com.codahale.metrics.MetricRegistry; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.codahale.metrics.MetricRegistry] for bean with name 'metricRegistry' defined in class path resource [mapfish-spring-application-context.xml]; nested exception is java.lang.ClassNotFoundException: com.codahale.metrics.MetricRegistry
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.codahale.metrics.MetricRegistry] for bean with name 'metricRegistry' defined in class path resource [mapfish-spring-application-context.xml]; nested exception is java.lang.ClassNotFoundException: com.codahale.metrics.MetricRegistry
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.codahale.metrics.health.HealthCheckRegistry] for bean with name 'healthCheckRegistry' defined in class path resource [mapfish-spring-application-context.xml]; nested exception is java.lang.ClassNotFoundException: com.codahale.metrics.health.HealthCheckRegistry
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.codahale.metrics.MetricRegistry] for bean with name 'metricRegistry' defined in class path resource [mapfish-spring-application-context.xml]; nested exception is java.lang.ClassNotFoundException: com.codahale.metrics.MetricRegistry
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.codahale.metrics.health.HealthCheckRegistry] for bean with name 'healthCheckRegistry' defined in class path resource [mapfish-spring-application-context.xml]; nested exception is java.lang.ClassNotFoundException: com.codahale.metrics.health.HealthCheckRegistry
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573)
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)

@jodygarnett
Copy link
Contributor Author

I have checkout a clean master branch and applied also metadata101/iso19115-3.2018#66, but when trying to build I get the following error:

This PR is independent, and just focuses on making artifacts (in this case snapshots) deploy.

use of dependency management to handle mapfish print version

Signed-off-by: Jody Garnett <[email protected]>
@jodygarnett
Copy link
Contributor Author

@josegar74 sorry that did not work, transitive dependency on codehale os now restored and I can successfully jetty:run.

This PR is independent of any others and just allows snapshots to be deployed.

Details reverse engineered from github and public emails, please review.

Signed-off-by: Jody Garnett <[email protected]>
@josegar74 josegar74 merged commit 95fb0b5 into geonetwork:master May 26, 2020
josegar74 pushed a commit that referenced this pull request May 28, 2020
* shift to new maven repositories

Signed-off-by: Jody Garnett <[email protected]>

* Setup geonetwork-cache repository

Signed-off-by: Jody Garnett <[email protected]>

* Add additional project information

Signed-off-by: Jody Garnett <[email protected]>

* revise based on feedback

Signed-off-by: Jody Garnett <[email protected]>

* exclude mapfish transitive dependencies for web

Signed-off-by: Jody Garnett <[email protected]>

* allowing print-libs to pull in com.codahale.metrics pending feedback

Signed-off-by: Jody Garnett <[email protected]>

* revise based on feedback

Signed-off-by: Jody Garnett <[email protected]>

* revise based on feedback

Signed-off-by: Jody Garnett <[email protected]>

* Additional print-lib exclusions

* Replace print.lib.version with use of dependency management

* Revised based on feedback

use of dependency management to handle mapfish print version

Signed-off-by: Jody Garnett <[email protected]>

* restore codahale transitive dependencies for mapfish print

Signed-off-by: Jody Garnett <[email protected]>

* list additional camptocamp developers

Details reverse engineered from github and public emails, please review.

Signed-off-by: Jody Garnett <[email protected]>

* remove list of developers to seperate isse

Signed-off-by: Jody Garnett <[email protected]>
pmauduit pushed a commit to pmauduit/core-geonetwork that referenced this pull request Sep 29, 2020
* shift to new maven repositories

Signed-off-by: Jody Garnett <[email protected]>

* Setup geonetwork-cache repository

Signed-off-by: Jody Garnett <[email protected]>

* Add additional project information

Signed-off-by: Jody Garnett <[email protected]>

* revise based on feedback

Signed-off-by: Jody Garnett <[email protected]>

* exclude mapfish transitive dependencies for web

Signed-off-by: Jody Garnett <[email protected]>

* allowing print-libs to pull in com.codahale.metrics pending feedback

Signed-off-by: Jody Garnett <[email protected]>

* revise based on feedback

Signed-off-by: Jody Garnett <[email protected]>

* revise based on feedback

Signed-off-by: Jody Garnett <[email protected]>

* Additional print-lib exclusions

* Replace print.lib.version with use of dependency management

* Revised based on feedback

use of dependency management to handle mapfish print version

Signed-off-by: Jody Garnett <[email protected]>

* restore codahale transitive dependencies for mapfish print

Signed-off-by: Jody Garnett <[email protected]>

* list additional camptocamp developers

Details reverse engineered from github and public emails, please review.

Signed-off-by: Jody Garnett <[email protected]>

* remove list of developers to seperate isse

Signed-off-by: Jody Garnett <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants