chenejac / VIVOTestMigrationJIRANotClosed

0 stars 0 forks source link

VIVO-1643: Align VIVO exploded war in Tomcat and generated war #150

Open chenejac opened 5 years ago

chenejac commented 5 years ago

Andrew Woods (Migrated from VIVO-1643) said:

This task is to compare the war file generated in the VIVO build process with the exploded war installed in Tomcat. If there are differences (which there likely are), make updates to the Maven build process to create a war file that aligns with the exploded war.

chenejac commented 5 years ago

William Welling said:

Here is the diff between the exploded vivo directory in tomcat and vivo-webapp-1.11.0-SNAPSHOT.war:

 

< vivo
---
> vivo-webapp-1.11.0-SNAPSHOT
1179,1181c1179,1180
< │   ├── i18n
< │   │   └── all.properties
< │   └── readme
---
> │   └── i18n
> │       └── all.properties
1183d1181
< │   ├── context.xml
1190,1192d1187
< │           ├── vivo-installer-vivo
< │           │   ├── pom.properties
< │           │   └── pom.xml
2280d2274
< │   ├── readme
2444d2437
< │   │   └── log4j.properties
2447,2552d2439
< │   │   ├── activation-1.1.jar
< │   │   ├── antisamy-1.5.6.jar
< │   │   ├── aopalliance-1.0.jar
< │   │   ├── argon2-jvm-2.4.jar
< │   │   ├── batik-css-1.8.jar
< │   │   ├── batik-ext-1.8.jar
< │   │   ├── batik-util-1.8.jar
< │   │   ├── caffeine-2.3.5.jar
< │   │   ├── collection-0.7.jar
< │   │   ├── common-image-3.3.2.jar
< │   │   ├── common-io-3.3.2.jar
< │   │   ├── common-lang-3.3.2.jar
< │   │   ├── commons-cli-1.4.jar
< │   │   ├── commons-codec-1.9.jar
< │   │   ├── commons-collections4-4.1.jar
< │   │   ├── commons-csv-1.5.jar
< │   │   ├── commons-dbcp2-2.1.1.jar
< │   │   ├── commons-fileupload-1.3.3.jar
< │   │   ├── commons-io-2.5.jar
< │   │   ├── commons-lang3-3.4.jar
< │   │   ├── commons-logging-1.2.jar
< │   │   ├── commons-pool2-2.4.2.jar
< │   │   ├── commons-rdf-api-0.3.0-incubating.jar
< │   │   ├── dwr-3.0.2-RELEASE.jar
< │   │   ├── fluent-hc-4.5.3.jar
< │   │   ├── freemarker-2.3.23.jar
< │   │   ├── guava-20.0.jar
< │   │   ├── guice-4.1.0.jar
< │   │   ├── guice-assistedinject-4.1.0.jar
< │   │   ├── guice-multibindings-4.1.0.jar
< │   │   ├── httpclient-4.5.3.jar
< │   │   ├── httpclient-cache-4.5.3.jar
< │   │   ├── httpcore-4.4.6.jar
< │   │   ├── httpmime-4.5.3.jar
< │   │   ├── icu4j-59.1.jar
< │   │   ├── imageio-core-3.3.2.jar
< │   │   ├── imageio-jpeg-3.3.2.jar
< │   │   ├── imageio-metadata-3.3.2.jar
< │   │   ├── imageio-tiff-3.3.2.jar
< │   │   ├── itextpdf-5.5.12.jar
< │   │   ├── jackson-annotations-2.8.6.jar
< │   │   ├── jackson-core-2.8.6.jar
< │   │   ├── jackson-databind-2.8.6.jar
< │   │   ├── javax.inject-1.jar
< │   │   ├── javax.mail-1.6.0.jar
< │   │   ├── jaxb-api-2.2.11.jar
< │   │   ├── jaxb-core-2.2.11.jar
< │   │   ├── jaxb-impl-2.2.11.jar
< │   │   ├── jaxrpc-api-1.1.jar
< │   │   ├── jcl-over-slf4j-1.7.25.jar
< │   │   ├── jena-arq-3.6.0.jar
< │   │   ├── jena-base-3.6.0.jar
< │   │   ├── jena-cmds-3.6.0.jar
< │   │   ├── jena-core-3.6.0.jar
< │   │   ├── jena-dboe-base-3.6.0.jar
< │   │   ├── jena-dboe-index-3.6.0.jar
< │   │   ├── jena-dboe-transaction-3.6.0.jar
< │   │   ├── jena-dboe-trans-data-3.6.0.jar
< │   │   ├── jena-iri-3.6.0.jar
< │   │   ├── jena-rdfconnection-3.6.0.jar
< │   │   ├── jena-sdb-3.6.0.jar
< │   │   ├── jena-shaded-guava-3.6.0.jar
< │   │   ├── jena-tdb2-3.6.0.jar
< │   │   ├── jena-tdb-3.6.0.jar
< │   │   ├── jfact-5.0.1.jar
< │   │   ├── jga-0.8.3.jar
< │   │   ├── jna-4.5.0.jar
< │   │   ├── joda-time-2.3.jar
< │   │   ├── jsonld-java-0.11.1.jar
< │   │   ├── jsoup-1.10.3.jar
< │   │   ├── jsr305-3.0.1.jar
< │   │   ├── libthrift-0.10.0.jar
< │   │   ├── log4j-1.2.17.jar
< │   │   ├── mysql-connector-java-5.1.46.jar
< │   │   ├── nekohtml-1.9.22.jar
< │   │   ├── noggit-0.5.jar
< │   │   ├── oim.vivo.scimapcore-1.0.jar
< │   │   ├── orcid-api-client-0.6.3.jar
< │   │   ├── owlapi-api-5.1.1.jar
< │   │   ├── owlapi-apibinding-5.1.1.jar
< │   │   ├── owlapi-impl-5.1.1.jar
< │   │   ├── owlapi-oboformat-5.1.1.jar
< │   │   ├── owlapi-parsers-5.1.1.jar
< │   │   ├── owlapi-tools-5.1.1.jar
< │   │   ├── RoaringBitmap-0.4.9.jar
< │   │   ├── Saxon-HE-9.8.0-4.jar
< │   │   ├── servlet-3.3.2.jar
< │   │   ├── slf4j-api-1.7.22.jar
< │   │   ├── slf4j-log4j12-1.7.25.jar
< │   │   ├── solr-solrj-4.10.4.jar
< │   │   ├── spring-aop-4.3.11.RELEASE.jar
< │   │   ├── spring-beans-4.3.11.RELEASE.jar
< │   │   ├── spring-context-4.3.11.RELEASE.jar
< │   │   ├── spring-core-4.3.11.RELEASE.jar
< │   │   ├── spring-expression-4.3.11.RELEASE.jar
< │   │   ├── taglibs-standard-impl-1.2.5.jar
< │   │   ├── taglibs-standard-spec-1.2.5.jar
< │   │   ├── trove4j-3.0.3.jar
< │   │   ├── vitro-api-1.11.0-SNAPSHOT.jar
< │   │   ├── vivo-api-1.11.0-SNAPSHOT.jar
< │   │   ├── wstx-asl-3.2.7.jar
< │   │   ├── xercesImpl-2.11.0.jar
< │   │   ├── xml-apis-1.4.01.jar
< │   │   ├── xml-apis-ext-1.3.04.jar
< │   │   ├── xz-1.6.jar
< │   │   └── zookeeper-3.4.6.jar
2756c2643
< 374 directories, 2379 files
---
> 373 directories, 2267 files

 

The primary difference is the intentional exclusion of WEB-INF/lib/*.jardone by the webapp pom.xml [https://github.com/vivo-project/VIVO/blob/develop/webapp/pom.xml#L28]

 

Besides that, the war file does not contain the installer pom.xml, installed pom.properties, some readme files about where overrides can be placed, and a context.xml file.

 !excluding pom.xml

$cat /opt/tomcat/webapps/vivo/META-INF/maven/org.vivoweb/vivo-installer-vivo/pom.properties
#Created by Apache Maven 3.3.9
version=1.11.0-SNAPSHOT
groupId=org.vivoweb
artifactId=vivo-installer-vivo
$ cat /opt/tomcat/webapps/vivo/themes/readme
Add your theme directories here
$ cat /opt/tomcat/webapps/vivo/local/readme
You can override messages and CSS by placing local rules and text in the files here.
$ cat /opt/tomcat/webapps/vivo/META-INF/context.xml
<Context> <!-- useHttpOnly="false" -->
   <Environment
        type="java.lang.String"
        name="vitro/home"
        value="/opt/vivo"
        override="true"/>
 
   <!-- Disable persist sessions on shut down.-->
   <Manager pathname="" />
</Context>

 

Is it desired to make these match identically? Effectively removing the exclusions and adding seemingly insignificant files generated during install.

 

 

chenejac commented 5 years ago

Andrew Woods said:

The eventual goal is to have the build process produce a war file that can be dropped into Tomcat directly... not requiring Maven to "install" the webapp into Tomcat.

chenejac commented 5 years ago

William Welling said:

That makes sense. Will have PR in shortly.

chenejac commented 5 years ago

William Welling said:

https://github.com/vivo-project/VIVO/pull/112