I need a to add maven-checkstyle-plugin to my master pom. In order to have a common place for checkstyle.xml for all users to use my master pom, I need to add checkstyle.xml to a separate maven project called in my case build-tools-resources and then add this dependency to my maven-checkstyle-plugin as a dependency. Its not working because I am want this maven resource project to be locate under libs-snapshot-local but somehow maven is looking for at http://artifactory.kmd.dk/artifactory/plugins-snapshot, why ??? I want to decide where to keep my maven projects.
Can anyone explain?
Thx in advance :)
You need to add libs-snapshot-local as a pluginrepository in your settings.xml then it works! :)
Related
Every example I've seen for Jenkins shared library setup on the web is based on Git/GitHub.
Can anyone help me with that using Subversion?
I've struggled a lot but could not figure out what should be specified as the Default version.
I've tried many different combinations of Project Repository Base, Include branches, Library Name and Default version but none worked.
Attached is the screenshot of my SVN repository setup. I know it's not as per the standards though, it should work somehow as it's just a demo project.
if your lib svn path is https://192.168.1.1:8443/svn/trunk/JenkinsLib, then Project Repository Base will be https://192.168.1.1:8443/svn/trunk/ and Default version is JenkinsLib.
While setting up the shared library in Configure System --> Global Pipeline libraries select Retrival Methond : Morden SCM and Source Code Management : Subversion like below picture :
and When you select Subversion it will ask you to choose subversion specific branching name like below:
I didn't want to tag a specific branch in SVN, so I just used a period (i.e. '.') in the DEFAULT VERSION field and that takes that HEAD of the repo.
The project repo base is just the svn:// path to your repo.
I hope that helps.
In jenkins, how do I design a plugin to take user's input on where to create the workspace on the filesystem?
I came across WorkspaceLocator but not sure how to use it. An example would be great.
[edit]
I want to be able to do this from the plugin's code. As in, for a particular type of project, the workspace should be created in some hard coded location that is declared in the code.
You can change the workspace at Advance Project options -> Use custom workspace under your job configuration.
One of the tips Burt Beckwith provides when creating plugins is to delete files you don't use.
So if you don't use UrlMappings.groovy - delete it.
I was wondering about directories. If you have no controllers, should you delete the controller directory?
Thanks
The short answer is "Yes, you should." Looking at some of the other plugins you can see this is pretty standard practice. For example the Redis plugin on GitHub.
You can delete directories, but they'll get re-created after running various scripts, in particular package-plugin. I tend to remove them as source folders in GGTS so they're not distracting - I like to only see directories that are being used. I used to use an Ant script to do various build tasks for plugins, but at this point all I use them for is the post-package-cleanup task that deletes unused folders, e.g .https://github.com/grails-plugins/grails-spring-security-core/blob/master/build.xml.
It turns out that only three plugin files are required - all of the rest can be deleted if they're not used. These are the plugin descriptor, application.properties (although this is only used to specify the Grails version), and BuildConfig.groovy. BuildConfig.groovy might be optional too if you don't need to publish the plugin to a repo and have no dependencies. At a minimum it's needed to specify the release plugin, but if you don't need that they you can probably get by with just 2 files :)
My requirement is as below:
I will be having three projects.
Main project (Grails project)
Main project adaptor (Grails project)
Domains plugin project (Grails project)
Domains plugin project will be having all of the domain classes and its test cases in it. So, I want to use those domain classes in other two projects. Here, I want to build Domains plugin project first, and the output of this build project should be the dependency of other two projects. I should be able configure this in BuildConfig.groovy.
Presently, I have done in the following way:
Created a plugin project using create-plugin and followed by package plugin command. Now, I kept that ZIP file in my lib folder and configured in Build-config.groovy. This works as expected. But, when ever I change domain classes, I need to do lot stuff. Like coping it to lib.
Is there any possibility to do in the first way I explained..!! Please help me out in this..!!
Thanks in advance
You can use inline plugins - put all of your three projects at the same level (in the same directory) and then configure adaptor and domain plugin as inline plugins in Main project.
That way you dont have to build each project separately, you can do changes in your domain plugin or adapter and they will get picked in main project automatically.
Inside your main project's BuildConfig.groovy
grails.plugin.location.'adapter' = "../path-to-adapter-plugin"
grails.plugin.location.'domain' = "../path-to-domain-plugin"
Note - putting all three projects at same level isn't required, but doing that will let you use relative paths - but if you want you can use absolute paths as well
I've got a solution to build an installer with InstallShield. The solution worked local. Now I've checked it in to the version control of our TFS2010 and I want to build the InstallShield-solution after all other solutions have been built.
What is the best way to build this solution?
Integrate this solution into the normal build as one of the many solutions and build it as the last one? How can I set special folders (pathvariables) I defined in the InstallShield-solution (PATH_TO_APP1, PATH_TO_APP2) to look for all the assemblies to put together in the setup?
Or, is it better to extend the build definition by an command-line call of MSBuild.exe with the InstallShield-solution after all the other solution have been built? But how do I set the path variables calling MSBuild.exe? Is every path variable a MSBuild-property and I set it via /p:PATH_TO_APP1="xxx"?
Set up the InstallShieldPathVariableOverrides itemgroup, or if you're not using the standard .isproj support, pass your own itemgroup into the InstallShield task's PathVariables property.
Aidan Ryan shows how to do the former, which looks like this. I believe his comment about needing to override the whole tree is no longer necessary in IS2012.
<ItemGroup>
<InstallShieldPathVariableOverrides
Include="((location))">
<PathVariable>((PATH_VARIABLE_NAME))</PathVariable>
</InstallShieldPathVariableOverrides>
</ItemGroup>