GMaven (OLD... DO NOT USE)
  1. GMaven (OLD... DO NOT USE)
  2. MGROOVY-149

Add command to launch GroovyConsole and GroovyShell with POM dependencies on classpath

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0-rc-3
    • Component/s: tools
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Or is it called a "goal" in Maven? I forget...
      re: this Groovy-User thread

      i.e.

      > mvn groovy:console

      launches GroovyConsole where the user has access to all of the POM's dependencies on the classpath

      Same for:

      > mvn groovy:shell

        Issue Links

          Activity

          Hide
          Jason Dillon added a comment -

          Well... IMO mvn groovy:console or mvn groovy:shell has the very nice property of running Groovy for users that already have Maven installed, but have not downloaded, extracted and setup environment variables to get groovy to run.

          Another nice property is the Maven download is really small, true it will download more stuff as needed, but the user only needs to worry about one download, extract, add-to-path, then after than mvn groovy:console will just work.

          So I see a lot of value in that.

          Show
          Jason Dillon added a comment - Well... IMO mvn groovy:console or mvn groovy:shell has the very nice property of running Groovy for users that already have Maven installed, but have not downloaded, extracted and setup environment variables to get groovy to run. Another nice property is the Maven download is really small, true it will download more stuff as needed, but the user only needs to worry about one download, extract, add-to-path, then after than mvn groovy:console will just work. So I see a lot of value in that.
          Hide
          Jason Dillon added a comment -

          Added xconsole and xshell goals which require a project and will append the main + test classpath to allow access to project classes.

          Show
          Jason Dillon added a comment - Added xconsole and xshell goals which require a project and will append the main + test classpath to allow access to project classes.
          Hide
          Jason Dillon added a comment -

          Seems there is some more work to be done here for this to work properly.

          Show
          Jason Dillon added a comment - Seems there is some more work to be done here for this to work properly.
          Hide
          Jason Dillon added a comment -

          Um, so its been so long I forgot how all this *hit worked... and I forgot that the class-loader used by Maven has nothing todo with the class-loader used to boot up the GMaven-component, thus the @requiresDependencyResolution tag has not affect on the class-path of the console or shell at all...

          So I need to revisit how the GMaven components are loaded, and figure out how to pass them the Maven project instance for context so that they can optionally add the project class-paths as needed...

          It seemed simple, but after looking all the magic I created to make runtimes pluggable... well it requires a bit more thought...

          Hope to fix this soon... :-]

          Show
          Jason Dillon added a comment - Um, so its been so long I forgot how all this *hit worked... and I forgot that the class-loader used by Maven has nothing todo with the class-loader used to boot up the GMaven-component, thus the @requiresDependencyResolution tag has not affect on the class-path of the console or shell at all... So I need to revisit how the GMaven components are loaded, and figure out how to pass them the Maven project instance for context so that they can optionally add the project class-paths as needed... It seemed simple, but after looking all the magic I created to make runtimes pluggable... well it requires a bit more thought... Hope to fix this soon... :-]
          Hide
          Jason Dillon added a comment -

          Better late then never no? Finally got this commited, and its simpler than I had thought. No new goals, just the same old groovy:shell and groovy:console. If there is a pom.xml then the classpath for the tool will include the test scoped dependencies, otherwise it won't. A project is not required, so mvn groovy:shell will still work as desired to run a Groovysh shell w/o any need for mvn pom muckski.

          Show
          Jason Dillon added a comment - Better late then never no? Finally got this commited, and its simpler than I had thought. No new goals, just the same old groovy:shell and groovy:console . If there is a pom.xml then the classpath for the tool will include the test scoped dependencies, otherwise it won't. A project is not required, so mvn groovy:shell will still work as desired to run a Groovysh shell w/o any need for mvn pom muckski.

            People

            • Assignee:
              Jason Dillon
              Reporter:
              Thom Nichols
            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: