openboxes-docker icon indicating copy to clipboard operation
openboxes-docker copied to clipboard

Plugin cache-headers-1.1.7 requires version [2.0 > *] of Grails

Open icasimpan opened this issue 6 years ago • 3 comments

Hi,

Got this at the end while running "docker-compose up": OpenBoxes version: tags/v0.7.30

:: problems summary ::
:::: WARNINGS
	Host m2repo.spockframework.org not found. url=http://m2repo.spockframework.org/ext/org/grails/plugins/cache-headers/1.1.7/cache-headers-1.1.7-sources.jar

	Host m2repo.spockframework.org not found. url=http://m2repo.spockframework.org/snapshots/org/grails/plugins/cache-headers/1.1.7/cache-headers-1.1.7-sources.jar

	Host m2repo.spockframework.org not found. url=http://m2repo.spockframework.org/ext/org/grails/plugins/cache-headers/1.1.7/cache-headers-1.1.7-src.jar

	Host m2repo.spockframework.org not found. url=http://m2repo.spockframework.org/snapshots/org/grails/plugins/cache-headers/1.1.7/cache-headers-1.1.7-src.jar

	Host m2repo.spockframework.org not found. url=http://m2repo.spockframework.org/ext/org/grails/plugins/cache-headers/1.1.7/cache-headers-1.1.7-javadoc.jar

	Host m2repo.spockframework.org not found. url=http://m2repo.spockframework.org/snapshots/org/grails/plugins/cache-headers/1.1.7/cache-headers-1.1.7-javadoc.jar

:::: ERRORS
	Server access Error: Connection refused (Connection refused) url=http://localhost:8081/artifactory/plugins-releases-local/org/grails/plugins/cache-headers/1.1.7/cache-headers-1.1.7-sources.jar

	Server access Error: Connection refused (Connection refused) url=http://localhost:8081/artifactory/plugins-releases-local/org/grails/plugins/cache-headers/1.1.7/cache-headers-1.1.7-src.jar

	Server access Error: Connection refused (Connection refused) url=http://localhost:8081/artifactory/plugins-releases-local/org/grails/plugins/cache-headers/1.1.7/cache-headers-1.1.7-javadoc.jar

Installing zip /root/.ivy2/cache/org.grails.plugins/cache-headers/zips/cache-headers-1.1.7.zip... ...
    [mkdir] Created dir: /root/.grails/1.3.9/projects/app/plugins/cache-headers-1.1.7
    [unzip] Expanding: /root/.ivy2/cache/org.grails.plugins/cache-headers/zips/cache-headers-1.1.7.zip into /root/.grails/1.3.9/projects/app/plugins/cache-headers-1.1.7
Installed plugin cache-headers-1.1.7 to location /root/.grails/1.3.9/projects/app/plugins/cache-headers-1.1.7. ...
Plugin cache-headers-1.1.7 requires version [2.0 > *] of Grails which your current Grails installation does not meet. Please try install a different version of the plugin or Grails.
   [delete] Deleting directory /root/.grails/1.3.9/projects/app/plugins/cache-headers-1.1.7

icasimpan avatar Apr 15 '18 05:04 icasimpan

Hey Ismael - Thanks for the bug report. Try to run the command a few times. The dependency management is a little flakey in earlier versions of Grails.

jmiranda avatar Apr 15 '18 13:04 jmiranda

To be more explicit, the BuildConfig.groovy specifies cache-headers-1.1.5 as a plugin dependency. For some reason on the first attempt to resolve dependencies, Grails (Ivy?) tries to pull down cache-headers-1.1.7 (possibly because it calculated that need in another dependency). I'll discuss with @mseaton to see if he encountered this issue during his testing. If not, I'll try to come up with a solution. I'm hoping that if I re-order the dependency (bring it to the top) then it'll be pulled in correctly.

jmiranda avatar Apr 15 '18 13:04 jmiranda

So I just tested it myself (running off a feature branch of openboxes/openboxes) and it took 3 attempts to get openboxes to boot up using docker-compose up. Unfortunately I encountered an issue with the first Liquibase database migration:

Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set install/baseline-tables.xml::1351254275228-1::adminuser (generated):
grails_1  |      Reason: liquibase.exception.JDBCException: Error executing SQL CREATE TABLE `openboxes`.`address` (`id` CHAR(38) DEFAULT '' NOT NULL, `version` BIGINT NOT NULL, `address` VARCHAR(255) NOT NULL, `address2` VARCHAR(255) NOT NULL, `city` VARCHAR(255) NOT NULL, `country` VARCHAR(255) NOT NULL, `date_created` DATETIME NOT NULL, `last_updated` DATETIME NOT NULL, `postal_code` VARCHAR(255), `state_or_province` VARCHAR(255), CONSTRAINT `PK_ADDRESS` PRIMARY KEY (`id`)):

I'm not exactly sure why this happened (why the address table exists before migrations have been run) but don't have much time to investigate at the moment. Hopefully, you don't encounter into this yourself. But if you do let me know and I will investigate it later this week.

jmiranda avatar Apr 15 '18 13:04 jmiranda