There are five choices listed in the maven documentation on testing maven plugins:
maven-verifier
maven-invoker-plugin
shitty-maven-plugin
maven-it-plugin
maven-plugin-management-plugin
I've tried a few of these and had a number of problems:
maven-verifier appears to have only a limited set of verifications -- I need to be able to make arbitrary assertions
shitty-maven-plugin has a bug that prevents it working with maven 3
nethier maven-plugin-management-plugin nor maven-it-plugin are stable and don't seem to be under active development
Is anyone able to recommend any of these plugins? Can you provide some example configuration?
The best thing i can recommend is the maven-invoker-plugin, cause it's can handle many situations and produces a real maven environment with all things which you really need to do integration test in relationship with Maven Plugins.
Related
I've just started using an sbt plugin for packaging JavaFx/ScalaFx applications sbt-javafx. This under Java 7.
While the plugin seems to work pretty well, it is not able to properly package multi-module project. A workaround they have found is to use exportsJars := true in all the modules on which the JavaFX modules depends on.
I also have IntelliJ IDEA that can produce a JavaFX application for me, though that would break the automated build. I'd very much like to have the executable automated.
I need to understand the broad implication of that parameter on my sbt build. Why is the setting needed to be true?
Here is the help definition:
Determines whether the exported classpath for this project contains classes (false) or a packaged jar (true).
It sounds like by default it's false. Why?
p.s. If someone has a cleaner solution to package JavaFX/ScalaFX applications using sbt, please feel free to share.
Is there any tutorial for the scripted plugin? Or maybe a new way to test plugins. I've found a tutorial that seems to be a bit old.
If I have to resort to Scripted, some questions that come to my mind:
Do I need to publish local my plugin before running scripted?
Can I refer to the version located in version.sbt from my tests?
For the record, I'm also using the cross-build plugin, so if possible, the tests would need to cover both 0.12 and 0.13 versions.
(Author of the linked testing sbt plugins here) There hasn't been major changes to scripted since I first wrote it, but I updated some of the details.
To test the plugin end-to-end, publishing locally I think makes sense.
See the updated post. You can pass version number as a property using scriptedLaunchOpts, and catch it with System.getProperty on the other side.
Eugene's answer is still relevant, but now, Sbt Plugins Testing has a proper documentation page in the official sbt documnetation site:
http://www.scala-sbt.org/release/docs/Testing-sbt-plugins.html
We are looking to use Karaf, but their introduction/quick start (main Karaf website) has almost nothing to say about deploying apps to the container - I know, amazing yet true. Anyone know of a useful introduction for someone completely new to Karaf? Thanks.
I guess you looked at the wrong places the, cause the user and developer dokumentation tells you that you either deploy your artefacts either by dropping in the deploy folder, by installing with osgi:install url, by adding/installing features and so forth. I really recommend RTFM, it's there. In case you still didn't find what your looking for ask the users mailing-list.
At this site you'll find the Karaf Online Documentation
A google for keywords: java, osgi bundle, activator
will turn up examples of how to code for Karaf. For example: http://www.javaworld.com/javaworld/jw-03-2008/jw-03-osgi1.html?page=2
Also, after learning the keywords (OSGI and bungle) I noticed netbeans has a project type of "OSGi Bundle". How nice.
Here are some useful links:
How to use Karaf console: http://karaf.apache.org/manual/latest/users-guide/console.html
Christian Schneider has some useful tutorials as well: http://www.liquid-reality.de/display/liquid/Karaf+Tutorials
Jean-Baptiste Onofre blog (search on Google)
Pay attention that Karaf 3 has slightly different shell commands, so make sure that you are pointing to the right Karaf or you learn how to translate Karaf 2.x commands to Karaf 3.
I have just mavenized the Apache Flex 4.9 SDK. Now, how can I build my application with maven?
Does anybody have an example pom-File for this?
Is there a flex-mojos version out yet, which is working with this flex version? Or are there any alternatives?
Btw.: My application is running, when I build it with Flash Builder 4.7.
I'm the guy currently in charge of continuing the development of Flexmojos.
I have to say, that RIAstars comment is not correct. I created the Mavenizer for usage with an updated version of Flexmojos and it is reported to work quite nicely together with it. Unfortunately I haven't released FM6 yet as I wanted to have it stable first. Because of this you have to fetch my github fork from https://github.com/chrisdutz/flexmojos ... I was planning on merging my changes back to the public repo as soon as Atlassian finally sets up our GIT repo at https://flexmojos.atlassian.net
I am currently working on making FM6 a parity release to the FM5 but with the difference that it works with the fdks generated by the mavenizer. What is true, is that I will not add any new features to FM, such as native Air bundling for mobile devices and support for falcon.
This is because we have already started the development of a purely Apache maven plugin that should replace FM one day. The main reason is the enormous effort you have to invest in maintaining a plugin that builds all FDKs starting with Flex 2.x and eliminating some design problems that were causing a lot of support traffic on the mailinglist.
So I would say: Yes you can use the Mavenizer to mavenize your FDKs and then you use FM6 to build your apps with it because that's what I created them for :-)
FlexMojos as it is will no longer be developed for future versions of Flex. As such I don't think you'll be able to use it with your mavenized version of Flex (but I might be wrong; I'm not exactly certain how it all works).
However the current maintainer of FlexMojos (Christofer Dutz) is working on a brand new Flex/Maven plugin. So for future versions you should be able to use that. Unfortunately to my knowledge this projects is far from finished.
As an alternative there is GradleFx which is a plugin for Gradle. You can set up an Apache Flex SDK dependency simply like this:
dependencies {
flexSDK group: 'org.apache', name: 'apache-flex-sdk', version: '4.9.0', ext: 'zip'
}
repositories {
add(new org.apache.ivy.plugins.resolver.URLResolver()) {
name = 'Apache'
addArtifactPattern 'http://apache.cu.be/flex/4.9.0/binaries/[module]-[revision]-bin.[ext]'
}
}
Personally I find Gradle much easier to work with than Maven. (Disclaimer: I am a contributor to the GradleFx project, but I only became one because I loved it so much).
I've got a bunch of projects which build on their own, creating static libraries, that I've dropped into another project. I've added the static libraries created by these sub-projects to the "Link Binary With Libraries" and "Target Dependencies" build phases for the main project.
When I build the main project, absolutely nothing happens with the sub-projects. They don't get built, and, even crazier, the main project reports no link errors even though it has five required libraries that don't exist.
I've googled and read several blog posts about setting this up, and it seems like I've done everything correctly. But clearly not, unless this is an Xcode bug (I've seen plenty of people saying this has been unstable in Xcode 4).
Can anyone suggest steps I may have missed, or anything else that might make this work?
Did you add the targets for these subprojects to the build scheme? Edit the scheme and make sure you add a target for each one of the subprojects. Theoretically you shouldn't have to add target dependencies, as Xcode should figure out the dependencies between all the targets in a scheme.