flybyray / maven-play-plugin

Automatically exported from code.google.com/p/maven-play-plugin
0 stars 0 forks source link

Add module version to directory name when extracting provided-scoped modules #91

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
IMPORTANT - This change is backward incompatible!!!

Modules with scopes different from "provided" are unpacked to 
"modules/${module-name}-${module-version}" directories.

Modules with "provided" scope are unpacked to 
"target/play/home/modules/${module-name} directories.

This difference comes from the fact that Play! expects "docviewer" and 
"testrunner" modules to be present in exactly these directories.
The las lines of Play.loadModules() method look like:

        // Auto add special modules
        if (Play.runingInTestMode()) {
            addModule("_testrunner", new File(Play.frameworkPath, "modules/testrunner"));
        }
        if (Play.mode == Mode.DEV) {
            addModule("_docviewer", new File(Play.frameworkPath, "modules/docviewer"));
        }

I didn't want to check module name and use it's version or not when creating a 
directory to unpack it's content, I decided to avoid version numbers for 
procided-scoped dependencies at all.

This was wrong decision, and I want to change it now.

Play! embedded modules ("crud", "docviewer", "grizzly", "secure" and 
"testrunner") will be treated differently from the rest (when declared with 
"provided" scope).
Their directories will not have module version suffix (for example "crud").
All the other modules will be unpacked to directories with version suffixes 
(for example "coberture-2.4").

Side note:
All modules with scope different from "provided", which are unpacked to 
application's "modules" directory had before and still will have version 
numbers in their directory names.

Original issue reported on code.google.com by gslowiko...@gmail.com on 7 Jun 2012 at 8:50

GoogleCodeExporter commented 9 years ago
Implemented in svn rev.9672

Original comment by gslowiko...@gmail.com on 7 Jun 2012 at 9:09

GoogleCodeExporter commented 9 years ago

Original comment by gslowiko...@gmail.com on 7 Jun 2012 at 9:09

GoogleCodeExporter commented 9 years ago
Instructions for plugin users:
- if you use "1.0.0-beta1" version - do nothing, this change does not affect 
you,
- if you use "1.0.0-beta2-SNAPSHOT" version (or later) or migrate from 
"1.0.0-beta1" to a later one - change all:

module.modulename=${play.path}/modules/modulename

settings, except those for: "crud", "docviewer", "grizzly", "secure" and 
"testrunner" modules to:

module.modulename=${play.path}/modules/modulename-moduleversion

in your application's "conf/application.conf" file.

Original comment by gslowiko...@gmail.com on 8 Jun 2012 at 12:46

GoogleCodeExporter commented 9 years ago
Snapshot deployed.

Original comment by gslowiko...@gmail.com on 8 Jun 2012 at 6:14

GoogleCodeExporter commented 9 years ago
svn rev.9756 - test projects - "application.conf" files forgotten changes.

Original comment by gslowiko...@gmail.com on 9 Jun 2012 at 6:11