grails3 various questions / best practices

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

grails3 various questions / best practices

vahid
Hi All

Sorry to bombard the list with a variety of questions.

1. In regards to git I have so far created new repos with the names of grails3-pluginame, I had been thinking previously to keep the same old repo on git and just create a new branch for old grails 2 and a new branch for grails3.
What would be the best practise for this ?



2. I am still trying to get my head around grails3 and there are a few questions


2.1 - In grails2 application.properties defined version info, in grails3 it is build.gradle:
version "0.43"

2.1.1  should the new grails3 plugins start from 0.1 again or continue from where grails2 numbering version was left off.


2.2 Actual plugin name not being picked up from plugin descriptor,

I did create-plugin grails3-plugin-name, after following the instructions for the plugin descriptor when I do package-plugin I end up with grails3-pluginame...


Finally when I attempted to publish - the incorrectly named plugin:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':publishMavenPublicationToMavenRepository'.
> Failed to publish publication 'maven' to repository 'maven'
   > Error deploying artifact 'org.grails.plugins:grails3-ajaxdependancyselection:jar': Error deploying artifact: Failed to transfer file: https://repo.grails.org/grails/plugins3-snapshots-local/org/grails/plugins/grails3-ajaxdependancyselection/0.1-SNAPSHOT/grails3-ajaxdependancyselection-0.1-20150305.123012-1.jar. Return code is: 401

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Although it manages to package the plugin..




grails package-plugin
:assetCompile UP-TO-DATE
:compileAstJava UP-TO-DATE
:compileAstGroovy UP-TO-DATE
:processAstResources UP-TO-DATE
:astClasses UP-TO-DATE
:compileJava UP-TO-DATE
:configScript
:compileGroovy UP-TO-DATE
:copyAstClasses UP-TO-DATE
:copyCommands UP-TO-DATE
:copyTemplates UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:compileWebappGroovyPages UP-TO-DATE
:compileGroovyPages
:jar
:findMainClass
:startScripts
:distTar
:distZip
:bootRepackage
:assemble

BUILD SUCCESSFUL

Total time: 3.291 secs

I have published them all on git the above plugin is https://github.com/vahidhedayati/grails3-ajaxdependancyselection

Regards
Vahid




--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/5464db0f-e926-411e-8aa9-b8c89f968b36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: grails3 various questions / best practices

Graeme Rocher-2
Answers below....

On Thu, Mar 5, 2015 at 1:45 PM, Vahid Hedayati <[hidden email]> wrote:
> Hi All
>
> Sorry to bombard the list with a variety of questions.
>
> 1. In regards to git I have so far created new repos with the names of
> grails3-pluginame, I had been thinking previously to keep the same old repo
> on git and just create a new branch for old grails 2 and a new branch for
> grails3.
> What would be the best practise for this ?


Yes to maintain the history and allow merges 2 branches works well, we
do this for some plugins (asset pipeline)


>
>
>
> 2. I am still trying to get my head around grails3 and there are a few
> questions
>
>
> 2.1 - In grails2 application.properties defined version info, in grails3 it
> is build.gradle:
> version "0.43"

Yes in fact you can remove application.properties and also the version
property in your *GrailsPlugin descriptor

>
> 2.1.1  should the new grails3 plugins start from 0.1 again or continue from
> where grails2 numbering version was left off.

For most plugins we have just continued where grails2 left off

>
>
> 2.2 Actual plugin name not being picked up from plugin descriptor,
>
> I did create-plugin grails3-plugin-name, after following the instructions
> for the plugin descriptor when I do package-plugin I end up with
> grails3-pluginame...

You will en up with a JAR file in build/libs that is your plugin JAR

>
>
> Finally when I attempted to publish - the incorrectly named plugin:
>
> FAILURE: Build failed with an exception.
>
> * What went wrong:
> Execution failed for task ':publishMavenPublicationToMavenRepository'.
>> Failed to publish publication 'maven' to repository 'maven'
>    > Error deploying artifact
> 'org.grails.plugins:grails3-ajaxdependancyselection:jar': Error deploying
> artifact: Failed to transfer file:
> https://repo.grails.org/grails/plugins3-snapshots-local/org/grails/plugins/grails3-ajaxdependancyselection/0.1-SNAPSHOT/grails3-ajaxdependancyselection-0.1-20150305.123012-1.jar.
> Return code is: 401
>
> * Try:
> Run with --stacktrace option to get the stack trace. Run with --info or
> --debug option to get more log output.
>
> BUILD FAILED
>
> Although it manages to package the plugin..


It is by default configured to publish to our artifactory instance for
Grails, right now we recommend people publish to maven local and
bintray. You can create a bintray account and publish your plugin
releases there.


>
>
>
>
> grails package-plugin
> :assetCompile UP-TO-DATE
> :compileAstJava UP-TO-DATE
> :compileAstGroovy UP-TO-DATE
> :processAstResources UP-TO-DATE
> :astClasses UP-TO-DATE
> :compileJava UP-TO-DATE
> :configScript
> :compileGroovy UP-TO-DATE
> :copyAstClasses UP-TO-DATE
> :copyCommands UP-TO-DATE
> :copyTemplates UP-TO-DATE
> :processResources UP-TO-DATE
> :classes UP-TO-DATE
> :compileWebappGroovyPages UP-TO-DATE
> :compileGroovyPages
> :jar
> :findMainClass
> :startScripts
> :distTar
> :distZip
> :bootRepackage
> :assemble
>
> BUILD SUCCESSFUL
>
> Total time: 3.291 secs
>
> I have published them all on git the above plugin is
> https://github.com/vahidhedayati/grails3-ajaxdependancyselection
>
> Regards
> Vahid
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Grails Dev Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> To post to this group, send email to [hidden email].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/grails-dev-discuss/5464db0f-e926-411e-8aa9-b8c89f968b36%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Graeme Rocher

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/CAO_wNofKDCqWZS3dPGYZC_AEnKqydwHMe_ch9bFNnw9n9Vawyg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: grails3 various questions / best practices

vahid
In reply to this post by vahid
Thank you Graeme

And for any other people stuck on any of these points, I hope I am correct on the following.


1. To publish locally - run

mvn install


2. The plugin name where before controlled via plugin descriptor is also defined in 2 other places:
grails-app/conf/application.yml

---
grails:
  profile: web-plugin
  codegen:
    defaultPackage: jssh


grails-app/init/jssh/  {foldername}
and in Application.groovy {packagename}


Regards
Vahid


On Thursday, March 5, 2015 at 12:45:52 PM UTC, Vahid Hedayati wrote:
Hi All

Sorry to bombard the list with a variety of questions.

1. In regards to git I have so far created new repos with the names of grails3-pluginame, I had been thinking previously to keep the same old repo on git and just create a new branch for old grails 2 and a new branch for grails3.
What would be the best practise for this ?



2. I am still trying to get my head around grails3 and there are a few questions


2.1 - In grails2 application.properties defined version info, in grails3 it is build.gradle:
version "0.43"

2.1.1  should the new grails3 plugins start from 0.1 again or continue from where grails2 numbering version was left off.


2.2 Actual plugin name not being picked up from plugin descriptor,

I did create-plugin grails3-plugin-name, after following the instructions for the plugin descriptor when I do package-plugin I end up with grails3-pluginame...


Finally when I attempted to publish - the incorrectly named plugin:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':publishMavenPublicationToMavenRepository'.
> Failed to publish publication 'maven' to repository 'maven'
   > Error deploying artifact 'org.grails.plugins:grails3-ajaxdependancyselection:jar': Error deploying artifact: Failed to transfer file: <a href="https://repo.grails.org/grails/plugins3-snapshots-local/org/grails/plugins/grails3-ajaxdependancyselection/0.1-SNAPSHOT/grails3-ajaxdependancyselection-0.1-20150305.123012-1.jar" target="_blank" rel="nofollow" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Frepo.grails.org%2Fgrails%2Fplugins3-snapshots-local%2Forg%2Fgrails%2Fplugins%2Fgrails3-ajaxdependancyselection%2F0.1-SNAPSHOT%2Fgrails3-ajaxdependancyselection-0.1-20150305.123012-1.jar\46sa\75D\46sntz\0751\46usg\75AFQjCNF2wb58VQJ68CcYAHBq6EgNAYNFzA';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Frepo.grails.org%2Fgrails%2Fplugins3-snapshots-local%2Forg%2Fgrails%2Fplugins%2Fgrails3-ajaxdependancyselection%2F0.1-SNAPSHOT%2Fgrails3-ajaxdependancyselection-0.1-20150305.123012-1.jar\46sa\75D\46sntz\0751\46usg\75AFQjCNF2wb58VQJ68CcYAHBq6EgNAYNFzA';return true;">https://repo.grails.org/grails/plugins3-snapshots-local/org/grails/plugins/grails3-ajaxdependancyselection/0.1-SNAPSHOT/grails3-ajaxdependancyselection-0.1-20150305.123012-1.jar. Return code is: 401

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Although it manages to package the plugin..




grails package-plugin
:assetCompile UP-TO-DATE
:compileAstJava UP-TO-DATE
:compileAstGroovy UP-TO-DATE
:processAstResources UP-TO-DATE
:astClasses UP-TO-DATE
:compileJava UP-TO-DATE
:configScript
:compileGroovy UP-TO-DATE
:copyAstClasses UP-TO-DATE
:copyCommands UP-TO-DATE
:copyTemplates UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:compileWebappGroovyPages UP-TO-DATE
:compileGroovyPages
:jar
:findMainClass
:startScripts
:distTar
:distZip
:bootRepackage
:assemble

BUILD SUCCESSFUL

Total time: 3.291 secs

I have published them all on git the above plugin is <a href="https://github.com/vahidhedayati/grails3-ajaxdependancyselection" target="_blank" rel="nofollow" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fvahidhedayati%2Fgrails3-ajaxdependancyselection\46sa\75D\46sntz\0751\46usg\75AFQjCNF-27ukZYyw-xOlZVCpeKP_itFhVQ';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fvahidhedayati%2Fgrails3-ajaxdependancyselection\46sa\75D\46sntz\0751\46usg\75AFQjCNF-27ukZYyw-xOlZVCpeKP_itFhVQ';return true;">https://github.com/vahidhedayati/grails3-ajaxdependancyselection

Regards
Vahid




--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/c40aca79-45c8-4576-99ce-ba0b3662bd08%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: grails3 various questions / best practices

vahid

Hi All


I have decided to put together some useful information in regards to porting plugins to 3 and relevant links / information on how to understand what to do :



https://gist.github.com/vahidhedayati/46006e815cf31134d4ff


So far there is a few things I  can't get my head around.

I was talking about mvn install in my email yesterday which will only work if you have a pom.xml  ( I am still unsure how I managed to generate this) but having read further into it. I really don't think there is a need for mvn install or pom.xml since you should really be using

grails install

or the instructions of inline plugin all in the above gist page...


I am currently stuck on g:remoteForm call which from what I can see is covered by the new ajax-tags plugin under grails3.

I have not been able to figure out how to call these available plugins from my plugin.

under dependencies I have tried:

 //compile "org.grails:ajax-tags:1.0.0.BUILD-SNAPSHOT"
 //compile "ajax-tags"
  //compile plugin(':ajax-tags')



and also tried:

version "1.15"
group "org.grails.plugins"

apply plugin: "spring-boot"
...
//apply plugin: 'ajax-tags'


None of which has worked for me so far...

What would be the process of including  or using these available plugins within a new plugin?

Regards
Vahid





On Thursday, March 5, 2015 at 2:58:56 PM UTC, Vahid Hedayati wrote:
Thank you Graeme

And for any other people stuck on any of these points, I hope I am correct on the following.


1. To publish locally - run

mvn install


2. The plugin name where before controlled via plugin descriptor is also defined in 2 other places:
grails-app/conf/application.yml

---
grails:
  profile: web-plugin
  codegen:
    defaultPackage: jssh


grails-app/init/jssh/  {foldername}
and in Application.groovy {packagename}


Regards
Vahid


On Thursday, March 5, 2015 at 12:45:52 PM UTC, Vahid Hedayati wrote:
Hi All

Sorry to bombard the list with a variety of questions.

1. In regards to git I have so far created new repos with the names of grails3-pluginame, I had been thinking previously to keep the same old repo on git and just create a new branch for old grails 2 and a new branch for grails3.
What would be the best practise for this ?



2. I am still trying to get my head around grails3 and there are a few questions


2.1 - In grails2 application.properties defined version info, in grails3 it is build.gradle:
version "0.43"

2.1.1  should the new grails3 plugins start from 0.1 again or continue from where grails2 numbering version was left off.


2.2 Actual plugin name not being picked up from plugin descriptor,

I did create-plugin grails3-plugin-name, after following the instructions for the plugin descriptor when I do package-plugin I end up with grails3-pluginame...


Finally when I attempted to publish - the incorrectly named plugin:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':publishMavenPublicationToMavenRepository'.
> Failed to publish publication 'maven' to repository 'maven'
   > Error deploying artifact 'org.grails.plugins:grails3-ajaxdependancyselection:jar': Error deploying artifact: Failed to transfer file: <a href="https://repo.grails.org/grails/plugins3-snapshots-local/org/grails/plugins/grails3-ajaxdependancyselection/0.1-SNAPSHOT/grails3-ajaxdependancyselection-0.1-20150305.123012-1.jar" rel="nofollow" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Frepo.grails.org%2Fgrails%2Fplugins3-snapshots-local%2Forg%2Fgrails%2Fplugins%2Fgrails3-ajaxdependancyselection%2F0.1-SNAPSHOT%2Fgrails3-ajaxdependancyselection-0.1-20150305.123012-1.jar\46sa\75D\46sntz\0751\46usg\75AFQjCNF2wb58VQJ68CcYAHBq6EgNAYNFzA';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Frepo.grails.org%2Fgrails%2Fplugins3-snapshots-local%2Forg%2Fgrails%2Fplugins%2Fgrails3-ajaxdependancyselection%2F0.1-SNAPSHOT%2Fgrails3-ajaxdependancyselection-0.1-20150305.123012-1.jar\46sa\75D\46sntz\0751\46usg\75AFQjCNF2wb58VQJ68CcYAHBq6EgNAYNFzA';return true;">https://repo.grails.org/grails/plugins3-snapshots-local/org/grails/plugins/grails3-ajaxdependancyselection/0.1-SNAPSHOT/grails3-ajaxdependancyselection-0.1-20150305.123012-1.jar. Return code is: 401

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Although it manages to package the plugin..




grails package-plugin
:assetCompile UP-TO-DATE
:compileAstJava UP-TO-DATE
:compileAstGroovy UP-TO-DATE
:processAstResources UP-TO-DATE
:astClasses UP-TO-DATE
:compileJava UP-TO-DATE
:configScript
:compileGroovy UP-TO-DATE
:copyAstClasses UP-TO-DATE
:copyCommands UP-TO-DATE
:copyTemplates UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:compileWebappGroovyPages UP-TO-DATE
:compileGroovyPages
:jar
:findMainClass
:startScripts
:distTar
:distZip
:bootRepackage
:assemble

BUILD SUCCESSFUL

Total time: 3.291 secs

I have published them all on git the above plugin is <a href="https://github.com/vahidhedayati/grails3-ajaxdependancyselection" rel="nofollow" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fvahidhedayati%2Fgrails3-ajaxdependancyselection\46sa\75D\46sntz\0751\46usg\75AFQjCNF-27ukZYyw-xOlZVCpeKP_itFhVQ';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fvahidhedayati%2Fgrails3-ajaxdependancyselection\46sa\75D\46sntz\0751\46usg\75AFQjCNF-27ukZYyw-xOlZVCpeKP_itFhVQ';return true;">https://github.com/vahidhedayati/grails3-ajaxdependancyselection

Regards
Vahid




--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/1ce80eea-974e-41f5-be52-d06c363bd940%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.