* an override of the local Maven repository. Of course, when the project is built by Maven on the build server, it knows nothing about this plugin. * is important as Grails checks to see if this has been set before allowing On my local machine, I have installed a Grails plugin in the usual way grails install-plugin foo. * If the build is being executed on Jenkins, set up the ivy cache.
Packages the current project (either a plugin or application) and installs the resulting artifact into the local Maven cache along with its POM. Package a plugin in binary form before installing it: grails maven-install -binary.
I modified the oovy file to contain the following logic:įinal String localMavenRepo = System.getenv('JENKINS_HOME') ? "$/.m2/repository" Install a WAR or plugin into the local Maven cache: grails maven-install. This is because you no longer need to install Grails separately to use it with Maven The Maven 2 integration for Grails has been designed and tested for Maven 2.0.9 and above. Was being built on Jenkins or not (the reason for this is that I already have it set in my local ~/.grails/oovy to have a separate cache per application). In order to use the new plugin, all you need is Maven 2 installed and set up. I decided to conditionally set this based on whether or not the application build property to tell Grails where to cache and look for local dependencies. The option that you do have is setting the With a Grails job, you do not have this option. Gradle uses a directed acyclic graph (DAG) to determine the order in which tasks can be run. The option to create a repository per workspace, to avoid collisions between jobs. Gradle is a build automation tool that builds upon the concepts of Apache Ant and Apache Maven and introduces a Groovy-based domain-specific language (DSL) instead of the more traditional XML form of declaring the project configuration. grails:maven-compile Compiles a Grails project. grails:maven-clean Cleans a Grails project and jars in lib directory. grails:list-plugins Lists the available plugins. grails:install-templates Installs the artifact and scaffolding templates.
grails:init-plugin Validate consistency between Grails and Maven settings. When the Jenkins job is a Maven project, I typically choose grails:init Validate consistency between Grails and Maven settings.
Grails applications were using Maven for dependency resolution and not Ivy, they were sharing one local dependency cache. After some digging, I determined the issue was due to the fact that now that the I went to build the application on Jenkins and notice some more funny business with dependencies. The nice thing about this is that when/if the issue is fixed so that the local Maven repository is honored, this fix should not cause any issues. This little hack will allow you to continue checking the local Maven repository when using the Grails command line tools and the Maven dependency resolution support