ant-metricstask.jar - ant

Warning : since version 1.3.6 the anttask.jar as been renamed ant-metricstask.jar
As of version 1.3.2 the metrics plugin contains some ant tasks that can be used for headless operations as part of a nightly build for example. This section describes how to do this.
Where can i get it? I can not find it anywhere.

Are you looking for ant-metricstask.jar?
It's available in the eclipse plugin downloadable at
http://sourceforge.net/projects/metrics/files/
Point eclipse directly at the URL or download the updatesite_1.3.6.zip and you can get the jar inside.

Related

Failed to read schema document 'http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd'

I have installed Liquibase runner 1.3.0 plugins in Jenkins and trying to execute liquibase changelog script file which I got after executing 'diffChangeLog' command. While executing script file, I am getting Failed to read schema document 'http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd' as exception.
I have checked my changelog file and it has below mentioned header.
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd
http://www.liquibase.org/xml/ns/pro
http://www.liquibase.org/xml/ns/pro/liquibase-pro-3.8.xsd
http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd">
But now here, when I replace '3.8' to '3.5' in both the location in the header, then its getting executed successfully. I want this to get executed with '3.8' only.
Please help.
The header in the changelog specifies only which xsd (XML Schema Description) is used when parsing the changelog xml file into objects. That xsd is embedded in the liquibase jar file that is being used when the command runs. The issue that you are facing is that the Liquibase Runner plugin for Jenkins v 1.3.0 has an older version of the liquibase jar embedded in it. If you look at the change history for that plugin, you will see that it includes version 3.5.3 of Liquibase, so you can only use XML tags that were available in that version. You can set the xsd to reference version 3.5.
The folks at Liquibase (including myself) are currently working on releasing a newer version of the Liquibase runner plugin for Jenkins that would have a newer version of Liquibase in it. I am working with the original author to resolve the security issues that the Jenkins team has flagged. I don't have a date when that will be done. You could build the plugin yourself if you need it sooner, applying PR#16 to your local copy before building it. The source code for the plugin is at https://github.com/jenkinsci/liquibase-runner-plugin
If you'd like to learn more about Liquibase XML and xsd, I have written a section in the Liquibase FAQ that covers this topic.
I saw this error when running a Spring Boot project, but SteveDonie's answer still led me to my solution. The cause of the error is that the changelog file was created with a newer version of Liquibase than what is running. For me, I had to update the liquibase version in my maven pom.
Maybe i can help somebody!:)
Check all your files in resources/db/changelog/* ! If you change in one file -> you must do it anywhere! I think it must be similar;
Check https://docs.liquibase.com/concepts/basic/xml-format.html official documentation liquibase, its best for you, because information in official doc is actualite.
PS sorry for my english:)

Upgrading a plugin fails going from Grails 3.1.11 to 3.2.2

I'm working on a Grails plugin whose main contribution is a taglib. In Grails 3.1.11 it worked ok. I also have a simple Grails app just for testing the plugin. Enter Grails 3.2.2.
After migrating plugin and app to 3.2.2 the plugin shows no signs of life. The plugin doWithApplicationContext closure is no longer executed at app startup. The taglib is not found by gsp:s. I did the migration by creating a new plugin and app with Grails 3.2.2 and then fill in the sources.
Sorry for this vague question, but what strings should I pull to find out what's wrong?
Edit 1: Yes, I did the sanity check to have the app depend on a non-existing version of the plugin and got the expected conflict. So it's not that the plugin is totally decoupled from the app.
Edit 2: After setting DEBUG logging on packages grails.plugins and org.grails.plugins a warning message appeared. It came from org.grails.plugins.CorePluginFinder. It couldn't find the plugin descriptor (...Plugin.groovy). I examined the plugin jar, found the plugin descriptor class in a file hierarchy rooted in BOOT-INF. Clearly the plugin loader didn't look into that hierarchy. I thought I was seeing a Grails bug because I didn't know about Boot repackaging. I added a post here to that effect, but after getting Graeme's answer I deleted the post because it detracted attention.
What you are seeing is that if you run gradle assemble on a plugin then the bootRepackage task is run which re-packages the plugin JAR as a runnable JAR which is not what you want when you plan to use the plugin from an application.
If you simply run gradle publish or gradle publishToMavenLocal or gradle jar then you get the JAR file that has not been re-packaged by Boot. As far as I am aware this is not a change from Grails 3.1.
You can also disable Boot repackaging all together in the plugin build.gradle if you never plan to use the plugin as an actual application or runnable JAR file:
bootRepackage.enabled = false

How do I configure installation of plugins in Grails 3.0.4?

I'm porting an application from Grails 2.4.2 to Grails 3.0.4, and I'm having problems with some plugins that were installed previously. Specifically one that is referenced in a GSP page. The particular plugin is called google-visualizer, and I've found some info here:
https://github.com/bmuschko/grails-google-visualization/blob/master/grails-app/views/formatter/index.gsp
However, I am clueless as to how to install this. I have not found the particular jar file in any maven repo, so I can't add it as a Gradle dependency. In general, where is it documented how to install existing plugins in Grails 3.X? I've read the documentation on how to port existing plugins, but that's not what I'm trying to do. I simply want to tell Grails/Gradle that I'd like to use this particular plugin and have it resolve the dependencies for me. I've tried this syntax as shown here:
https://grails.org/plugins/tag/grails3
Example:
compile ":quartz:1.0.2"
I've put that line in the dependencies block in my build.gradle file, but it doesn't work. I get errors from Gradle. Is there a particular Maven repo that has to be added for plugins? Any help with this is appreciated. Thanks.
Grails 1.x and 2.x plugins are sadly not compatible with Grails 3.x.
You can find the plugins that already have been ported to Grails 3 at: https://bintray.com/grails/plugins/
The grails-google-visualization plugin is not released in a Grails 3 version, but from the repo, it appears that work has started on upgrading.
You can see the progress on a Grails 3 version in this issue: https://github.com/bmuschko/grails-google-visualization/issues/49
Benjamin searched for a new maintainer back some time ago, and found a volunteer - see this tread for details: https://twitter.com/bmuschko/status/498610606896066560
For those plugins that are most important, the Grails Core team maintains a list here: https://github.com/grails/grails-core/wiki/Grails-3-Priority-Upgrade-Plugins
Some of the old plugins will be replaced by their Gradle counterpart, fx. the codenarc plugin, that exist in a Gradle version already.
A simple way is to find out the JAR file for the plugin and then use them in Grails 3.0.4. In this way there is no need to change the source code of the plugin

Include ant libs from within the build file

My problem is the following:
I would like to use the propertyregex task in ant. The project I am working on is built on various different servers and I don't want to configure (install the ant-nodeps.jar) every server. The source needs to include everything, that is not installed on the system by default.
So now I would need to add the ant-nodeps.jar to the ant classpath from within the build file. Does somebody know how to do that?
Cheers,
Robert
The propertyregex task is part of ant-contrib and can be installed as part of your build using Apache ivy
Checkout the following example, which demonstrates how to download and use the "for" task (also from the ant-contrib project):
Problems getting my ANT builds to work after OS upgrade
The one downside is that ivy does not come pre-packaged with ANT, so the following answer has a tip on how to bootstrap your ANT builds. Once ivy is started it can be used to pull down everything else your build needs.
Ivy fails to resolve a dependency, unable to find cause
Update
While I understand you requirement to have no change on the target platforms, it's a very difficult problem to solve if you must also match several old versions of the build software. I have found incompatibilities between the latest ANT and 5 year old versions like 1.7 (ANT 1.6.5 is now 8 years old....)
What I do is install a very limited number of ANT versions on my Jenkins slave nodes. Build jobs can then only choose from these and then use ivy to download all other 3rd party software dependencies (This setup emulates how you'd manage a set of Maven projects).
I suspect you're using ANT to run your deployments? If that is the case I would suggest switching to something like Groovy, which can be deployed as a single jar file and can pull down dependencies on the fly, using Grape.

NullPointerException from the com.cloudbees.jenkins.plugins.license

After upgrading my jenkins install on ubuntu using ubuntu packages, I'm getting an error with the cloudbees licence plugin.
java.lang.NullPointerException
at com.cloudbees.jenkins.plugins.license.BootHook.innerOnLoaded(BootHook.java:59)
at com.cloudbees.jenkins.plugins.license.BootHook.onLoaded(BootHook.java:49)
at jenkins.model.Jenkins.<init>(Jenkins.java:845)
at hudson.model.Hudson.<init>(Hudson.java:81)
at hudson.model.Hudson.<init>(Hudson.java:77)
at hudson.WebAppMain$2.run(WebAppMain.java:214)
My jenkins version is 1.492
If I disable the plugin, that works, but I cannot see some project that are in folders.
How can I do ?
A change in core affected the plugin.
Briefly, there is a conflict between versions of Bouncy Castle in core and the plugin. As the plugin has to support a wide range of Jenkins versions, it includes a version of Bouncy Castle, and requests that this be loaded in an isolated classloader... Under certain circumstances core will resolve the classloaders differently when looking for extensions, and the extension can end up resolving a different version of Bouncy Castle... which results in the extension (free-license-plugin) not being found, and the corresponding NPE.
We fixed this issue a couple of days after 1.490 was released. The fix is in cloudbees-license 3.5 and free-license 3.2 (also in nectar-license 3.3 - but that is only of relevance if you are running any of the Jenkins Enterprise plugins)
To get a borked system back to working here is the set of steps to follow:
Stop Jenkins (if you haven't already)
Remove the following directories $JENKINS_HOME/plugins/cloudbees-license, $JENKINS_HOME/plugins/free-license and if present $JENKINS_HOME/plugins/nectar-license
Remove the following files $JENKINS_HOME/plugins/cloudbees-license.hpi, $JENKINS_HOME/plugins/cloudbees-license.jpi, $JENKINS_HOME/plugins/free-license.hpi, $JENKINS_HOME/plugins/cloudbees-license.jpi, and if present $JENKINS_HOME/plugins/nectar-license.hpi or $JENKINS_HOME/plugins/nectar-license.jpi (Note: normally there will only be either the .hpi or the .jpi file present. Which is present depends on what version of Jenkins was installed when you downloaded the plugin originally. It doesn't matter which.
Download the latest versions of the plugins that you removed: (Note: only download the nectar-license plugin if you removed it in steps 2 and 3)
cloudbees-license
free-license
nectar-license (only if needed)
It is up to you whether you rename the .hpi to .jpi. Jenkins will pick it up either way, but for longer-term compatibility I would recommend renaming them to the .jpi extension.
Start Jenkins
Do the funky-chicken dance

Resources