How to find a detailed document about what is Liberty Maven Plugin? - maven

Maybe it is a dumb quesion but I really cannot find a good document about what is Liberty Maven Plugin and what it is used for ?
I have checked some posts like How to redeploy artifact with liberty-maven-plugin? but it is not about the basic things. I need a good basic document,
what is it?
why should we use it?
why should not we use it?
what are the advantages ?...

The Liberty Maven Plugin provides a number of goals for managing a Liberty runtime, including downloading and installing the runtime, starting/stopping a server, installing features, and deploying applications. The plugin is open source and the code and documentation is available on Github here: https://github.com/OpenLiberty/ci.maven
There is a guide and sample project on building and testing a simple web application using the Liberty Maven Plugin and Open Liberty here: https://openliberty.io/guides/maven-intro.html

Related

Can a plugin a developed without using Maven?

We would like to start developing custom/internal SonarQube plugins (rules) in our organization but we can't get our hands on Apache Maven at the moment. All development tools must go through a rigorous certification process.
Ant being the current build tool of choice in our organization, is it possible to create a new SonarQube plugin (not being published to the marketplace) by replicating the same standard structure that is expected from SonarQube?
I've already read the following post from the SonarQube archives, but was wondering if that would still be possible to do with a little bit of elbow grease?
Concerning the answer from Simon Brandhof, I think that the plugin key, manifest generation and mandatory properties could easily be generated from well crafted Ant build script, as long as putting all required JARs in the classpath.
As far I know for developping new rules It is mandatory to create a new Sonarqube plugin and can be only build with the maven way.
see https://docs.sonarqube.org/display/DEV/Build+Plugin

How to enable spring support in IntelliJ Community Edition 2016.1.3

I have very good pure Java basic knowledge. As long as there are no XML config and no project management tools involved, I am very good.
The things that really confused me are the project management tools, e.g.: Maven, Gradle.
I am learning Spring, and it is so confusing to me since it involves many XML files and there is no clear explanation for it.
I am learning Spring from this set of video tutorials, Lecture 6
Spring "Hello World".
I couldn't get a Spring hello world done because it requires a xxxxx.xml file to config the beans (Java object). To generate the XML files, I need to generate an XML file using a plugin on IntelliJ 2016.
The question is I can't find the plugin to generate a XML file for the bean by following this official tutorial. There is no such plugin called " Spring Support".
What should I do to generate the beans.xml? (The file to manage beans for Spring)
You can't enable Spring support with IntelliJ community Edition, it only available with paying version (Ultimate).
However, you can create the .xml file manually and CE version also supports it (a little bit).
To working with Spring or J2EE, you should get familiar with build tools like Maven, Gradle (or Ant in some special case). The concept is simple and you can get it easily from the official website (https://maven.apache.org/ - http://gradle.org/).
For Spring, if you are not familiar with creating a .xml file, you can use Java configuration instead or move to use Spring-boot to forget this configuration file (almost).
However, at first, I think you should get the basic concept of Spring and try to work well with .xml files configure. It'll be helpful in the future when you work with it deeply.
Let's take things one by one:
Your problem understanding builds management tools like maven and gradle. Try these links for tutorials: Maven in 5 Minutes, gradle is very advance build automation tool with continuous Integration features, you can find a good comparison between gradle and maven here.
If you are confused about spring to try this book: Spring in Action 3rd Edition (4th Edition is also available, I recommend 3rd edition as you will be able to link XML to annotations.)
You do not need any tool to generate XML files. Copy a sample spring configuration file from the internet, remove unwanted elements and write your own beans.
The Spring support plugin is a feature of IntelliJ IDEA Ultimate, which is a commercial IDE. It's not available in the free Community Edition.
You don't need any plugin to generate the beans.xml file; you can write it manually in the source code editor.
For Spring support, did you try "Spring Assistant" plugin ?
https://plugins.jetbrains.com/plugin/10229-spring-assistant
Good part it is it has active development.
Edit on Aug 21, 2020:
Seems like this plugin has no more active development. Its last release was in 2018 April.
No need to worry. We sill have some good news :-)
Its Github repository is here. We can clone the repo and make necessary changes what ever we specifically need.
I know you are asking about IntelliJ Idea but as it is a commercial tool, you should pay to let you use its plugins. Another way is using "Spring Tools for Eclipse" which is a great environment to develop Spring applications. But you need to be familiar with eclipse.
It can be downloaded from:
Spring Tools 4 for Eclipse

What is Workflow management using Maven?

I have only little experience using maven with eclipse. One of the job descriptions which I received has "Workflow management using Maven" as a required skill. What does this mean ? What do they possibly expect?
I think they want you to correct them? :D
I'm not sure what they refer to. I would guess it relates to the developer workflow of creating and delivering software with eclipse (?) and maven.
So setting up a project from scratch is often done from an maven archetype (a project template if you like). A lot of open source frameworks offer archetypes to start with.
For existing projects you would check out the code from version control and import it into eclipse. the m2eclipse plugin is required to do that (but I think its quite common to have it)
Then there is building the software. Which is done through executing maven phases (which will then execute plugins). See maven-phases for more details. Maven phases have default plugins that execute (for example compile will run the compiler plugin).
So your workflow would look like this: you modify the files. compile them, test them, package them, deploy the artifacts into the maven repository. the maven install phase will store the artifacts in you local repository, the maven deploy phase will upload them into the company's repository.
From there the the files are installed. Yet you can use maven plugins to install the software into a application server. That depends on the traditions of the company.
I would not think of workflow as some strict step by step think like BPMN. Development is usually done with huge amounts of personal practices (are tests written in advance or while implementing, and so on).
Hope that will help :)

Maven Support to web Application

I have a web Application ( its a .war file to be specific) to be deployed in run time.
The requirement is provide a Maven support.
My questions
1. What maven support means here?
2. Also how to achieve this in current web Application project
Thanks,
Faraz
P.S. I am totally new to Maven
Maven is project management tool, Maven provides developers ways to manage following:
Builds
Documentation
Reporting
Dependencies
Releases
It can do wonders in your project. You have to do a lot of reading in order to understand the features provided my maven. Maven's official site is the key for u.

Is Maven a framework that provides mainly an archetype like domain.controller-view in grails?

I´ve been reading lot about, but since there are several web frameworks that uses Maven for the project, I got confused, so I´m not entirely sure if Maven is an archetype that defines an schema to start developing apps by following good practices, or is just some piece of sdk that converts my code to bytecode. Thanks in advance to anyone who can drag me out of my confusion and gave me the required info. BTW is that rigth to say an archetype is a directory structure?
I am not sure if you are reading enough about maven, Maven is a build system which can help you build your application, manage your dependencies, run your tests, create reports and many other things.
First link in google result is http://maven.apache.org/
Apache Maven is a software project management and comprehension tool.
Based on the concept of a project object model (POM), Maven can manage
a project's build, reporting and documentation from a central piece of
information.
Each application has many dependencies and many small tasks that needs to be done before you can run your application, developers define them in a file called POM and that will be a instruction for Maven to build the application. Maven can do pretty much everything other than writing your code. In that sense it is like Genie in the story of Aladdin, you wish for something it will bring it for you.
There is a Grails maven plugin that can populate Grails project with the same convention that Grails uses. It can work with Grails to execute your commands and many other. More importantly it will manage your dependencies.

Resources