[
https://issues.apache.org/jira/browse/SOLR-4839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14268711#comment-14268711
]
Steve Rowe commented on SOLR-4839:
----------------------------------
Currently {{ant example}} (soon to be renamed to {{ant server}} or maybe
removed entirely - see SOLR-6926) deletes the exploded war from
{{server/solr-webapp/}} (while leaving the parent dir intact). I was curious
whether this is necessary - perhaps Jetty is smart enough to do (recursive)
timestamp comparison, re-exploding the war if its timestamp is newer than any
of its exploded contents.
TL;DR: Jetty apparently is *not* smart enough to re-explode the war when it's
newer than its previously exploded contents, so we should continue to purge the
exploded war as part of {{ant example}} (or {{ant server}} or whatever we end
up doing to build the war).
Here's how I tested:
I set {{persistTempDirectory=true}} (see above), then:
{noformat}
ant clean example
bin/solr start
bin/solr stop
cp -r server/solr-webapp{,.save}
ant clean example # purges the exploded war from
server/solr-webapp/
rmdir server/solr-webapp
cp -r server/solr-webapp{.save,}
bin/solr start
bin/solr stop
diff -r server/solr-webapp*
{noformat}
{{diff}}'s output was empty (no differences) - so when the war is newer than
the exploded contents, Jetty does not re-explode the war.
To confirm that if Jetty had exploded the war, there would be difference, I did
the following (without first running {{ant example}}):
{noformat}
rm -rf server/solr-webapp/*
bin/solr start
bin/solr stop
diff -r server/solr-webapp*
{noformat}
This time, there were differences in three files:
{noformat}
diff -r server/solr-webapp/webapp/META-INF/MANIFEST.MF
server/solr-webapp.save/webapp/META-INF/MANIFEST.MF
4,5c4,5
< Implementation-Version: 6.0.0-SNAPSHOT 1650174 - sarowe - 2015-01-07 2
< 0:24:25
---
> Implementation-Version: 6.0.0-SNAPSHOT 1650174 - sarowe - 2015-01-07 1
> 8:33:45
Binary files server/solr-webapp/webapp/WEB-INF/lib/solr-core-6.0.0-SNAPSHOT.jar
and server/solr-webapp.save/webapp/WEB-INF/lib/solr-core-6.0.0-SNAPSHOT.jar
differ
Binary files
server/solr-webapp/webapp/WEB-INF/lib/solr-solrj-6.0.0-SNAPSHOT.jar and
server/solr-webapp.save/webapp/WEB-INF/lib/solr-solrj-6.0.0-SNAPSHOT.jar differ
{noformat}
> Jetty 9
> -------
>
> Key: SOLR-4839
> URL: https://issues.apache.org/jira/browse/SOLR-4839
> Project: Solr
> Issue Type: Improvement
> Reporter: Bill Bell
> Assignee: Shalin Shekhar Mangar
> Fix For: 5.0, Trunk
>
> Attachments: SOLR-4839-fix-eclipse.patch, SOLR-4839.patch,
> SOLR-4839.patch, SOLR-4839.patch, SOLR-4839.patch, SOLR-4839.patch,
> SOLR-4839.patch, SOLR-4839.patch, SOLR-4839.patch, SOLR-4839.patch
>
>
> Implement Jetty 9
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]