I have developed few Maven plugins for Maven 2, but I am wondering what are the main changes when I want to develop a plugin (or migrate the existing ones) for Maven 3.0.
The documentation on the Maven site in not up-to-date (what a surprise!) and all related pages still deal with Maven 2.0, like this one:
This guide is intended to assist users
in developing Java plugins for Maven
2.0.
As an example, in Maven 2 plugin, I defined a configuration parameter like this:
/**
* Some parameter.
*
* #parameter
* #required
*/
private String foo;
So now, using the new Maven Plugin API, I expect real Java annotations...
Question: Where can I find documentation / information about the development of Maven 3 plugins?
There is now a work-in-progress implementation of annotations for Maven plugins developments! Read the following links:
https://cwiki.apache.org/confluence/display/MAVEN/Java+5+Annotations+for+Plugins
http://olamy.blogspot.fr/2012/05/java5-annotations-support-for-maven.html
for the record you can have a look http://maven.apache.org/plugin-tools/maven-plugin-plugin/examples/using-annotations.html
Just saw this... maybe it's helpful.
http://www.sonatype.com/people/2010/11/whats-in-maven-3-0-for-plugin-authors/
I think the best source is http://www.sonatype.com/books/mvnref-book/reference/index.html
Maybe it is not up to date but it is the best choice in my oppinion.
For developing maven plugins see section 11.
I hope it was helpfull.
Don't know if this is still relevant but this plugin provides annotation support
Maven Anno Mojo
In meantime the official doc seems to be up to date:
http://maven.apache.org/guides/plugin/guide-java-plugin-development.html
(they use annotations everywhere)
This is the best I have been able to find regarding plugin development.
http://maven.apache.org/guides/plugin/guide-java-plugin-development.html
Often the best way to work with maven is to use the archetype and play around with that.
Related
I'm looking into creating an app with typescript and angular 1.6.0. But everywhere I look is using webpack, babel, grunt, gulp, there is no single consensus on which is the best way to proceed with an app like this.
Anyone got any hints?
Thank you.
Do you have a specific need for using angular 1.6.0? As opposed to creating an angular2 project?
You can get more information here: Angular-cli
Angular cli currently includes webpack and you will not need to use gulp or grunt at all. In addition to the angular cli bundling your app together it allows easy build for Ahead of Time Compilation and tree shaking. Having these two features is nice for when you are ready to deploy your application to a production server you can bundle the application into a small package and serve a small amount of JS files.
Using the angular cli also helps you to code with best practices within an angular2 application. You generate new components/directives/pipes with a simple ng generate [component] [name] command.
I would strongly suggest reading through the angular quickstart for ts guide located here: Angular-Quickstart
Also, if you do not want to generate your own projects using the angular-cli. There are various templates online that you can start your application with.
Good luck!
If you are planning to start from scratch, then why not Angular2 ?
My suggestion is Typescript2 + Angular2 with webpack. As stated by #Andy Angular-cli is good to go.
I'm using appengine-sdk 1.9.3.
In devserver, works in Eclipse and Ant normally.
When I deploy (update) to appengine (production environment), I get this error:
event.getResults(): [<pre>Error for /p7/formPanelServlet
java.lang.NoClassDefFoundError: Could not initialize class
com.google.appengine.tools.cloudstorage.oauth.OauthRawGcsServiceFactory
at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createRawGcsService(GcsServiceFactory.java:42)
at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createGcsService(GcsServiceFactory.java:34)
at com.bitvisio.p7.server.FormPanelServlet.<init>(FormPanelServlet.java:27)
At FormPanelServlet.java:27, the code is:
private final GcsService gcsService = GcsServiceFactory
.createGcsService(new RetryParams.Builder()
.initialRetryDelayMillis(10)
.retryMaxAttempts(10)
.totalRetryPeriodMillis(15000)
.build());
I put the lib appengine-gcs-client-0.3.9.jar in war/WEB-INF/lib. I think there is a problem with this lib.
Thanks for help.
Always use tools like Maven or Ivy to resolve dependencies for you. Copying JARs to war/WEB-INF/lib/ directory and editing .classpath file manually will be painful and may not help you always. If you use Eclipse & Google App Engine plugin, use Add Google APIs... as mentioned here - Google Plugin for Eclipse. In my case, adding Cloud Storage API via Google Plugin for Eclipse helped resolve this NoClassDefFoundError.
I had the same problem. I use Ivy to resolve dependencies and always get the latest.integration (with Maven use RELEASE) for revisions.
However I usually ignore transitive libraries. It looks like Google is expanding the API family - at least splitting out discrete functionality.
There are now quite a few transitive dependencies and it seems they released a new version of the GCS client around the same time as 1.9.3.
Getting all dependencies and packaging them in my deployment fixed my issue. I did not have the issue in development which made it more confusing.
You are facing this issue because you are not adding the some of the jar like
google-api-services-storage-v1-rev78-1.22.0.jar download link
joda-time-2.94.jar download link
guava-19.0.jar link to download
you can use the different version of jar according to your appengine-gcs-client jar file.
Note : Add all these jar and build path with the project and problem will get solve.
I'm trying to use Google Cloud Endpoints with Android client, built by Maven.
The problem is that appengine-maven-plugin v1.8.3+ require Maven v3.1.0+
[ERROR] Failed to execute goal com.google.appengine:appengine-maven- plugin:1.8.4:endpoints_get_discovery_doc (default) on project pro-gae: The plugin com.google.appengine:appengine-maven-plugin:1.8.4 requires Maven version 3.1.0 -> [Help 1]
while android-maven-plugin v3.6.1 doesn't (and will not) work with Maven v3.1.0 (see devs discussion at https://code.google.com/p/maven-android-plugin/issues/detail?id=395). The error
A required class was missing while executing com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.1:generate-sources: Lorg/sonatype/aether/RepositorySystem;
So I'm kinda locked out. One plugin asks for v3.1.0+, while the other one claims Maven 3.1.0 to be fatally buggy. So I left out to generate Endpoints client sources manually.
Any other ideas, besides waiting for fixed Maven 3.1.1? It doesn't seem to happen soon, because Maven 3.1.0 was released more than two months ago.
The latest version of the Android Maven Plugin is 3.8.0 and it now requires Maven 3.1.1+. This should allow you to use the latest appengine plugin as well. And Maven 3.1.1 has been released in the meantime as well.
Update Sept 2015: Latest version of the plugin is 4.3.0 with 4.3.1 around the corner. The 4x branch works with Maven 3.0.5+ but we strongly encourage users to use the latest Maven release.
Hmm, looks resolved by just using older version (1.8.2) of appengine-maven-plugin.
One other way of building is to configure the Run Configuration to use an external Maven Runtime.
To do this in Eclipse for Windows :
Right Click Project -> Run Configuration -> Create a new configuration -> In Main tab configure Maven Runtime.
I hope this helps.
I am writing an application in Java 6 (I have to stick with this).
I need to write a module for file watcher.
After googling around, I found that Java 7 java.nio package is good.
I want to import this sub package alone to maven [my repository] and create the module.
Can any one guide me how can i achieve this? is there any maven repo for such sub-modules?
All the java.nio packages are part of the rt.jar of the basic JRE. So they are not present in any other Maven package, since they assume you already have it.
If you want to use NIO from Java 7, you could package and deploy all or part of the rt.jar as a Maven module onto your own repo, but I wouldn't recommend it.
You can add this:
compile group: 'com.jtransc', name: 'jtransc-rt', version: '0.3.1'
I use paperclip plugin for Ruby on Rails app.
What is the defacto standard file upload plugin like paperclip for CakePHP2?
https://github.com/davidpersson/media supports only CakePHP1.3?
There is no default plugin defined, a suggestion would be to use the Uppy Plugin with ajax request, for more information go to:
[1]: https://uppy.io/docs/plugins/
I hope this helps.
David Persson's Media Plugin doesn't have a 2.0 compatible release, but somebody forked it to make it run on newer versions of Cake. This fork is actively developed (which also means things might still be broken) and with no official release incumbent it seems the best option to run the Media Plugin.
Apart from Persson's plugin there's MeioUpload which is also widely used and seems to be compatible with Cake 2.0.
There's Uploader (currently at version 3.3), which is compatible with Cake 2.0 (probably 2.1 as well).
Lastly, the plugin FileUpload by WebTechnick (known for his Facebook plugin for Cake) has a 2.0 branch which hasn't seen an official release, so proceed with caution.