I created a maven plugin (plugin api 3.0.4 + plugin annotations 3.2) that should only run on the parent (for multi module projects). Is there a way to do that in the Mojo instead of telling the user to run it with "-N" (non recursive) Option?
#aggregator true
within comments didn't work
thx in advance
Related
Are there any API that helps to find dependency of maven packages.
I used the examples present in the answer of Programmatically resolving Maven dependencies outside of a plugin - get RepositorySystemSession and RepositorySystem
However the dependency list that I get using aether is different from the list given by APIs
AFAIK. The API did not resolve ranges, I am not sure whether it handles exclusions.
Is there any readily available API that takes care of resolving version ranges, exclusions (simillar to what i get when using "mvn dependency-list/tree)
I am looking for API that exactly returns result provided by mvn dependency:list/tree
Note: My code is running outside mvn plugin
I recommend to use two tools:
mvn help:effective-pom
This tool provides effective pom - the very detailed pom.xml with all actual dependencies and versions
mvn dependency:tree
Provides the dependency tree
I have a Play 2.2 Application which strickly used only to implement REST API.
I have in an independent GIT repo a AngularJS application. This application uses Grunt and NodeJS to do the build.
The Result of the frontend application is an index.html + 1 js file and 1 css file.
Ideally I would like to invoke the Grunt build script from SBT which builds the angularjs app.
Is there a SBT plugin I can use to do this ?
What is the best approach I should use to do this the most simple way ?
At the moment I build it manually and copy the static resources into my PLAY's public folder.
Thanks in advance
I've never done it before, but a quick Google search gave me sbt-grunt-plugin whose the last commit was authored on Feb 20, 2013 :(
The plugin is a bit outdated, but is doing what I'd propose -- offers a command (could also be a task) that wraps grunt (as the plugin above does). You may also want to read the official documentation of sbt about Commands.
I would then declare a dependency on the angularjs/frontend project using RootProject for the root project with frontend (angularjs) and backend (Play Framework) submodules - see How can sbt pull dependency artifacts from git?:
lazy val frontend = RootProject(uri("git://..."))
lazy val backend = project ...
The root project is auto-created by sbt as described in Default root project:
If a project is not defined for the root directory in the build, sbt
creates a default one that aggregates all other projects in the build.
frontend would need to have build.sbt with the task created and it should work fairly well (it might be the only viable solution to not tie the projects too much and create unnecessary inter-dependencies).
I am looking for a tool like Angularjs explorer viewer that can generate mvc diagram including all the controller/services and the dependencies between them from existing angularjs code. This one is a plugin in eclipse. And I failed to installed it when I tried to followed the instruction Getting started.
the error said :
Cannot complete the install because one or more required items could
not be found. Software being installed: tern feature
0.3.0.201406242125 (tern-feature.feature.group 0.3.0.201406242125) Missing requirement: Tern - Server - Nodejs 0.3.0.201406242125
(tern.server.nodejs 0.3.0.201406242125) requires 'package
org.apache.http 0.0.0' but it could not be found Missing
requirement: Tern - Server - Nodejs 0.4.0.201407211814
(tern.server.nodejs 0.4.0.201407211814) requires 'package
org.apache.http 0.0.0' but it could not be found Cannot satisfy
dependency:
From: tern feature 0.3.0.201406242125 (tern-feature.feature.group 0.3.0.201406242125)
To: tern.eclipse.ide.core [0.3.0.201406242125] Cannot satisfy dependency:
From: Tern - Eclipse - Core IDE 0.3.0.201406242125 (tern.eclipse.ide.core 0.3.0.201406242125)
To: bundle tern.server.nodejs 0.2.0
Is there any?
Thanks
This question is about installation of AngularJS Eclipse. It seems that your Eclipse has not the plugin org.apache.http.
I suggest you to use Eclipse Luna (4.4) and the distribution Eclipse IDE for Java EE Developers.
AngularJS Eclipse is based on tern.java which is based on tern.js a JS inference engine. So you could use just tern.js with Grunt task for instance to call angular tern plugin which will parse your JS files and returns a JSON with Module, Contrroller, etc. Never done that but I think it's possible.
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'm writing a web app using Google AppEngine and Spring MVC. I carefully upgraded to the v2 of the DataNucleus pluging by following these steps: http://code.google.com/p/datanucleus-appengine/wiki/UpgradingToVersionTwo (I use Eclipse).
When I try to run the Enhancer Tool I get following error:
Exception in thread "main" Plugin (Bundle) "org.datanucleus" is already registered. Ensure you dont have multiple JAR versions of the same plugin in the classpath. The URL
"file:/.../eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.6.4.v201203300216r37/appengine-java-sdk-1.6.4/lib/opt/user/datanucleus/v2/datanucleus-core-3.0.6.jar" is already registered, and you are trying to register an identical plugin located at URL
"file:/.../eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.6.4.v201203300216r37/appengine-java-sdk-1.6.4/lib/opt/tools/datanucleus/v2/datanucleus-core-3.0.6.jar."
I formatted the message so that you could see the tiny difference, one jar is loaded from "user" directory, the other one from "tools" directory. I don't understand why. In the project build path, there is only the one from "user" and to the DataNucleus configuration I added the one from "tools", just like the howto above suggested.
In other cases I've seen around this message was mostly caused by conflicting versions of datanucleus plugin but it doesn't apply to me. I guess it's just some stupid thing in my case... so what am I doing wrong?
So after all, I didn't read the instructions as carefully as I thought. The problem was really that the jars were there twice, one in the project build path, one in the datanucleus configuration. It shouldn't be in the project build path (or in fact, it shouldn't be in one of them, doesn't matter which one). I added it there automatically when I copied libs to the war directory and I assumed it had to be done. But the instructions clearly say that only jdo-api needs to be in the project build path.
One thing I don't understand though. In one step of the instructions I had to uncheck "use project classpath when running tools" in the DataNuclues configuration. So how is it possible that the plugin was still using the libs configured in the project build path?