Netbeans 7.3.1 - Group maven modules - maven

does anyone know if it is possible in Netbeans 7 to group modules of a multimodule maven project (like e.g. in Intellij)? Right now every module is kind of like its own project...
Another issue: Is it somehow possible to access the maven targets without going through the netbeans IDE goals via rightclick? I would like to have a window with a list of all maven targets (clean, validate, compile etc.) and use them via click... Is that possible in Netbeans?

Another view to multimodule maven projects is the plugin Geertjan provides https://blogs.oracle.com/geertjan/entry/maven_integrated_view_for_netbeans
But it is experimental.

Related

how the best way to create project with maven on eclips?

i know there are 2 methode to create project with Maven.
Create Dynamic project on eclipse and convert it into maven project
Create Maven project with command line and then import the project into eclips.
i always do the 1. choise.
If You have latest eclipse IDE then its very simple.
Go to Create new Project wizard and search maven project. (if its old eclipse IDE then you probably need to install m2e plug in from market place).
select maven project and next. Check (Create a simple project) if you want customization other wise just click Next and You will be presented a number of ready made archtypes.
For simple console projects you can chose maven-archtype-quickstart. or what ever project you want to create.
Now Give groupId e.g. com.yourcompany or com.yourprojectgroup and artifactId e.g. projectname-alias . and Click Finish.
First Time eclipse will create local repo if its not already created and then put default dependencies defined by provided pom in your local repo. Further you just need maven knowledge to customize project. e.g. New Dependencies and build system etc.
I hope this will clear your mind. I prefer this way because its fast and easy.
If you create a new project in Eclipse (at least in Mars or Neon), you can choose "Maven Project" and get everything you need. Don't use eclipse goals of Maven. They are deprecated.

create gradle multimodule project for AEM using lazybones templates

I had heard of lazybones, which is a command line tool for project creation and it is more interactive or customizable than Maven Archetypes. Thus, I created a maven multimodule aem project using lazybones.
The Command and template for AEM multimodule project is:
lazybones create aem-multimodule-project <target-folder>
This creates a maven multimodule project for AEM. Then, I tried to find the same for Gradle, but I didn't find any template regarding that.
Can anyone give me any direction how can I achieve the same.
Please consider using gradle aem plugin. It has a lot of features and might be good for your case
https://github.com/Cognifide/gradle-aem-plugin

Add a remote Archetype Catalog in IntelliJ

I am new to IntelliJ but coming from Eclipse I expected Maven support to be far better. It really is but I could not find how to define a remote archetype catalog in IntelliJ (14.1).
All I could find was a way to add a Archetype manually but that is not what I need. I would like to point to a XML file on a remote server that contains the list of all archetypes available.
In Eclipse, it looks like this :
Maybe you would like to try an Intellij Plugin that I wrote yesterday. It enables you to add remote archetype catalogs to Idea: Maven Archetype Catalog plugin
To make my answer more clear: I had the same issue that it struggles me that you can add Maven Archetype Catalog files in Eclipse, but not in IntelliJ IDEA. So I tried to write a plugin for IntelliJ IDEA, so that you can actually define URLs to archetype-catalog.xml.
The plugin just parses those URLs and provides the Maven Archetypes to the list of available Archetypes in IntelliJ IDEA.
After installing the Plugin you can find a new entry in the Settings menu at File - Settings - Build, Execution and Deployment - Build tools.
I know this is kinda old thread, but in the future if some one will look for it.
This Maven Archetype Catalogs is a plugin for intellij that allows import external archetypes from a URL.
It solved my problem on Linux, haven't tried it on Windows.
To add this plugin go to File->Settings->Plugins->Browse repositories
in the search bar type "Maven Archetype Catalogs". Install and restart.
To use it go to File -> Settings -> Build, Execution, Deployment -> Build Tools -> Maven Archetype Catalogs. click the '+' and add the archetype-catalog
It seems that there is a plugin to do this - Maven Archetypes. The reviews are not favourable, and I have never used it though so cannot comment to its effectiveness.
You could also (assuming Windows/IntelliJ 14), edit C:\Users\<username>\.IntelliJIdea14\system\Maven\Indices\UserArchetypes.xml and add the archetypes manually. Not ideal, but still workable.
Screenshots are made in IDEA 14, I've also checked IDEA 13, it's also true for it.
If this is what you need
Then it's in the Preferences:

Why i should add dynamic web module when installing maven facet?

I want to add Maven facet to some project in Eclipse, but when I do that, it adds Dynamic Web Module to the project.
The first question is why ?
Second is how can I make it without adding web module??
thanks :)
I assume you are using MyEclipse, rather than just eclipse, with the m2e plugin. Also, I'm assuming the latest release of MyEclipse (2015 CI). If these assumptions are correct, note that the facet your are adding is for Maven Support of Java EE projects, which is why it is asking for the web project facet version. If you simply want to convert a java project to a maven project, right click on the project then select Configure->Convert to Maven project.

Maven plugin to check if a module's build it recent, and skip if thats the case

I have a huge multi-module project , which is being built using maven.
Most of them are core modules , which are used in other modules for various purposes.
But , 9 of 10 times, there is no change in the core modules and there is just some change in the depending modules.
Sometimes, there might be a small change in 1 core module of the many.
The issue is, I want maven to know, if the current build in target folder of the core modules is the latest accroding to the code, i.e no changes were made to the core for that.If thats the case, then I want maven to skip building that module during the maven phases.except the assembly plugin phase, which takes care of assembling all my modules at one place.
Is there a neat way to do this.I.e some maven plugin already taking care of stuff like this??
Some light on this will be great help.
Thanks,
Neeraj
May be you can use the maven incremental build plugin or use Hudson/Jenkins to do an incremtal build.
Just use Hudson - it will scan your source repository for changes and only run a build once that has occurred. It works well with Maven out of the box too.

Resources