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.
Related
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
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).
I have a solution that is primarily developed in Visual Studio 2012. I would like to develop in MonoDevelop without major incompatibilities.
Thus far, I have installed mrward's nuget addin for MonoDevelop and things work if I manually add each package in packages.config through that interface. However, this is highly onerous. This addin doesn't have support for automated package restore as of this writing.
I downloaded nuget.exe from CodePlex ("NuGet command line utility", as it's labeled). I use a simple find/xargs combination to install all required packages:
find . -name packages.config | xargs -I '{}' mono nuget.exe install '{}'
This creates several dozen directories in the directory from which it is run instead of putting things under packages/ as expected, and it also doesn't touch the project files so MonoDevelop still thinks that it should be looking for package references in the directory from which MonoDevelop was started.
I therefore opened MonoDevelop from the working directory that contains all of these package folders, and I still get invalid references. I think this is probably because the project is looking for package_name/ reference, but the folders are name package_name.version/ in the working directory.
Any suggestions for a sane, simple way to interact with this solution? I'm next going to try modifying my shell command so that it automatically drops to project/packages and runs nuget from that directory.
Did you try using the -o command line parameter with NuGet.exe? You can use that to get the packages to install into a particular packages folder.
The NuGet addin for MonoDevelop supports package restore from version 0.6 or above. Right click your project and select Restore Packages. This will download all the packages defined in your packages.config for all projects in the solution. It uses NuGet.exe to do this.
Another way to get this working is to use the custom NuGet MSBuild target so the package restore happens at build time when using xbuild. It would require some manual editing of project files though. Under the covers the custom MSBuild target just uses NuGet.exe with a similar command line to what you have already just with the output directory option specified. So I would try the command line approach since that will be less work.
You would have to get the following files from the NuGet repository on codeplex:
NuGet.exe
NuGet.targets
NuGet.config
Put these in a directory somewhere. Typically these are put in a .nuget directory in the same directory as your solution file. Then you need to edit your project files to include the NuGet.targets file and also define the SolutionDir property. So something like this:
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" />
You will also need to enable package restore on your machine. You can do this using the NuGet addin for MonoDevelop in the Options dialog. Under Linux this is available from the Edit menu under Preferences. Then look in the NuGet - General options and there is a checkbox for enabling package restore.
There is an example project on GitHub created by Jonathan Channon which uses package restore and works when building with xbuild inside MonoDevelop. There is also an issue on GitHub about using NuGet restore on Linux which might be helpful.
Update: 2014-05-14: NuGet addin for MonoDevelop now supports package restore.
I'm looking for some build automation tool for JRuby project. Result of this project should be some library that can do stuff. I need to use some Java libraries but I want to work with Ruby. So that's why JRuby.
In this stage, I'm looking for build automation tool that can handle dependencies and download them from remote repository.
I could use Maven for this, but I'm interested in other alternatives that could be more fun to work with.
So yeah, if you are looking for something sexier than Mave, SBT is good option.
Other options are:
Gradle - http://www.gradle.org/ - if you want Groovy rather than scala orientation.
Or Gant - http://gant.codehaus.org/ - for some more in the lines of Ant.
Buildr - http://buildr.apache.org/ - Is another interesting project
I also came across this dead project - http://raven.rubyforge.org/ - But I wonder if something new came to tackle the same item, i.e. using Rake , the ruby build tool, to build java as well.
From a dependency management perspective only, jbundler is a bridge between Maven and bundler that can help you manage your dependencies, whether they are gems or maven artefacts.
I have a few repositories in Mercurial with the following structure:
Core
Integration
Admin
MyApp
From the MyApp repo, I want to include Core and Integration.
I add those as a sub-repo to MyApp, and place it inside an Externals folder.
Folder structure for MyApp looks roughly as this:
MyApp
- BusinessLogic
- DataAccess
- Externals
-- Core
-- Integration
- Web
- packages
The problem has got to do with the packages folder. I use package restore in all solutions, and NuGet downloads all packages fine. The folder contains the packages that my external projects rely on.
Only problem is, that the relative path from Core and Integration to the packages folder is now wrong.
Is there any way I can solve this?
I think you can fix it manually, your references should have relative hint path which starts with ../../packages. But to avoid this in future All you solutions which include this projects must have the same structure.
For example for other solution you have structure like:
MyOtherApp
- BusinessLogic
- DataAccess
- Externals
-- SubFolder
--- Core
--- Integration
- Web
- packages
If in this case you add nuget package to Core project, reference will be ../../../packages/.... And Core will be broken in other solutions again.
Other solution is make package from Core and Integration projects and use them in other solutions via nuget. My team uses for this TeamCity, it can pack projects, publish nuget packages and work as nuget feed out the box.
If you still want to keep it as a sub-repository (as opposed to referencing the projects as NuGet packages) you can modify the the hint paths to always search the solution directory.
For instance, I changed
<HintPath>..\..\packages\Moq.4.2.1312.1622\lib\net40\Moq.dll</HintPath>
to
<HintPath>$(SolutionDir)packages\Moq.4.2.1312.1622\lib\net40\Moq.dll</HintPath>