Why is Checkstyle Not in Maven Central? - checkstyle

Why is it that I have to download checkstyle to get it to work? Why can I not just pop it in my build file as a dependency?

You do not have to download JAR in order to use Checkstyle
For Maven you can use: https://maven.apache.org/plugins/maven-checkstyle-plugin/usage.html or
For Gradle you can use: https://docs.gradle.org/current/userguide/checkstyle_plugin.html
Plugins come with ready Checkstyle configurations (based on Google and Sun Microsystems code standards), but you can use custom config file
Here (https://github.com/timurt/checkstyle-samples) you can find my old repository, how to use Checkstyle with Maven and Gradle

Related

Where I can find Primefaces 3.4.1 bundle package (dev package)?

The official link in the official Primefaces download page is broken, and in Maven repository I can find only the bin, not the bundle.
The bundle package is a bin package with the source code and the javadocs.
Someone can point me to a safe link, if it exists?

Where is signed-aligned apk output? (Maven)

Where does the signed and aligned apk go when I do Maven release?
The only place I can find a "app-signed-aligned.apk" is in ./trunk/target/checkout/projectname/target/app-signed-aligned.apk
Is this the apk that I should use to send to Play? Or where is it? In .m2 folder? Checkout dir seems a strange place to put the output in...
It depends on the Maven lifecycle phase you run
package: find it in target
install: find it in .m2/...
deploy: find it in the repository in your Maven repository manager (like Sonatype Nexus Repository Manager)

what a part does bower/bower-asset play in php application such as yii2

Recently I deployed some projects like trntv/yii2-starter-kit and so on.but all applications are publishing assets on '#vendor/bower' instead of'#vendor/bower/bower-asset'. I have read the question Yii2 Composer manage package in bower and bower-vendor and solved it . but I still feel confused about the directory vendor/bower/bower-asset.
What's the part does bower/bower-asset play in php application? it is not a composer package but many theme store in there. Furthermore, bower is a dependency management for javascript just like Composer for PHP , but how does it solve dependency for js package by PHP on this occasion that I have not install node.js environment?
The idea of Composer Asset Plugin is to download Bower / NPM packages and manage their dependencies without having Node JS, Bower and NPM installed (through PHP / Composer). Also it adds possibility to add JavaScript dependencies for PHP packages that use JavaScript libraries.
See for example yii2-bootstrap Yii2 extension (PHP) has a dependency on Bootstrap (JS + CSS):
"bower-asset/bootstrap": "3.3.* | 3.2.* | 3.1.*"
When you run composer install or composer update, all JS dependencies will be installed to vendor/bower folder.
This is built into the core, but very ambiguous, receives a lot of criticism and there are plans to remove it in 2.1.0 (as far as I remember, it was included before release of 2.0 even it was unstable). Unfortunately this is required and there is no normal way to disable it.
You can read more info on the extension's Github page.
As for folder name, it should be named bower, not bower-asset, if you installed everything correctly.
It's named like so automatically, make sure you have the latest version of plugin:
composer global require "fxp/composer-asset-plugin:~1.1.1"
I'd recommend to even switch to:
composer global require "fxp/composer-asset-plugin:*"
If you have problems or errors, execute:
composer global remove "fxp/composer-asset-plugin"
Then reinstall it again, delete vendor and composer.lock in your application folder and run:
composer install

How to integrate Parasoft (JTest) in Hudson?

I normally use JTest Parasoft as a plugin in Eclipse.
But now, I need to integrate JTest in Hudson, at a way that in the Post-build, JTest should run its tests over a Maven project.
So my questions are :
How to integrate JTest in Hudson? I found a plugin CppTest by Parasoft and not JTest...
How to specify the tests which should be run on the project? For example, configure JTest to run "Find unused code" which is included in "Static Analysis"...?
Thank you a lot.
Jtest has fully functional command line interface so generally integration should not be a problem.
As for your questions:
1) there is a Jtest plugin for Maven, so you will be able to trigger your post-build action easily. It's thoroughly described on http://build.parasoft.com .
2) you can specify the Test Configuration of your choice by using -Dparasoft.config option (i.e.: mvn parasoft:jtest -Dparasoft.config="user://Unused Code").
You can find all the parameters which can be used with parasoft:jtest goal described here: http://build.parasoft.com/docs/maven-parasoft-plugin/jtest-mojo.html .
We have integrated Jenkins with Jtest (Linux)
Downloaded the Jtest installers and installed in Jenkins server (in slaves too if you have slaves attached)
Env variables for same has been set (JTEST_HOME)
And now without any entries for Jtest in Pom or build.xml files, we
can directly call the jtestcli commands either in invoke shell
section or use Jtest goals with maven too.
We need to make sure that we have maven-parasoft-plugin 3.12 and Jtest dependencies available in maven repo (for maven projects) and we should have parasoft-ant-3.12.jar available which we need to place in ant lib folder (for ant projects).

How to install and use JFreeChart in Play Framework

I'm using play 1.2.4 and I would like to add JFreeChart in to my project
Does anyone know how to install and a simple use? I have try google for examples but didn't find any with play framework.
thanks in advance
dependencies file
require:
- play
- jfree ->jfreechart 1.0.13
Play project's dependencies are configured in conf/dependencies.yml file (see Play documentation about dependency management).
Since various versions of JFreeChart can be found from central Maven repository, all you have to do is add the following (last) line into your dependencies file:
# Application dependencies
require:
- ...
- org.jfree -> jfreechart 1.0.14
After that, run play dependencies command, which should download the needed JARs and install them into lib folder of your project. You should now be set to use JFreeChart classes in your project.