11 Important Maven Commands

1.Creating a maven standalone project

mvn archetype:generate -DgroupId=org.cloudhadoop -DartifactId=myproject

This is the starting step for any java project to create. This command runs at command prompt and create myproject with project name i.e. artifact id. This project is located in group “org.cloudhadoop” using groupid,.
After running this command for the first time, this tries to download all the required artifacts downloaded from remote repositories ( from maven .. etc) and copy to your localrepository and after that it create a project. This project contains the src/main/java and src/test/java folders which contain the hellowold java program in main folder, and test class for hell0world program in test folder.

2.Creating a web standalone project

mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes
-DarchetypeArtifactId=maven-archetype-webapp -DgroupId=com.cloudhadoop
-DartifactId=mywebapp

Most of the times, we usually create a web based projects in eclipse. With this command also, we can create web project like spring, struts which contains, WEB-INF, lib, classes folders and web.xml. This command runs at command prompt and create mywebapp with project name i.e. artifact id. This project is located in group “org.cloudhadoop” using groupid,.
After running this command for the first time, this also tries to download all the required artifacts downloaded from remote repositories ( from maven .. etc) and copy to your localrepository and after that it create a project.
The directory structure is different from the #1 command and creates as per maven directory structure for web applications.

3. Cleaning project

mvn clean

As you know target folder contains all your compiled classes, as well as jar,war files when you run project with maven install.
Clean is maven predefined goal, this command delete all the contents in the target folder.

4. compile maven project

mvn compile

compile is maven predefined goal ,this command complie all your java classes which includes src files as well as test files in your project.

5.Build web apps

mvn package

maven package goal is used to build maven applications.
As you know any java project can be packed as jar or war.
Package is maven predefined goal. By giving this command, first compile all the java files(using compile goal) and run all your test classes and copy all this files to target folder and create a jar, war file. The final out put for this command is jar/war of your project located in target folder.

6.Deploy project

mvn install or
mvn deploy

When we run this command under your project, it will do all the tasks in “mvn package” and create the required jar/war file in target folder.
Maven install goal is used to deploy the project(jar/war) to the local repository. and local repository location is /.m2/repositories/groupid/.
Maven deploy goal is used to deploy the project to the remote repository like nexus. so that other developers can use this artifact in their module. remote repository location is specified in pom.xml.

7. Run unit and integration tests

mvn test

Test goal is used to run only the test classes in your project. The test files are located under src/test/java and copy the result to your target/test-classes, target/reports if any.

8. Ignore test execution

mvn package –DskipTests or
mvn package -Dmaven.test.skip

In 4#, with maven package command run, tests are also executed. If you want to skip the unit tests, The we can use this command. You can use this option with install goal also.

9.Generate java documentation for project

maven javadoc:javadoc

This will generate java documentation for your project. And the generated java doc report can be found in target folder
This will includes API documentation for your java classes in your project.
10. Debug maven

mvn -X

This command is used to start the maven goals in debug mode and gives logging information. This command gives more information like what artifact is failing for what reason .
This command can be used when you are not getting any clue for your maven project execution failure.

11.Generate site

mvn site

Predefined goal in maven is used to generate site documentation in formatted style.

Node

Node.js is now the developer’s first choice when it comes to creating scalable, efficient program code for businesses. It helps systems work more efficiently and compensates for slowdowns or bottleneck issues. Because of this popularity there is an increasing need to train new and existing developers in Node.js.  Common every-day corporations such as Walmart, Mozilla, Voxer, Microsoft and others rely heavily on Node.js and have done so since 2010. The reasons are many, but primarily because it enables fast development and has a robust scalability.

Node

Essentially, Node has reinvented the way websites are built. With this new framework, developers build critical functionality in a fraction of the time that it once took.

To respond to this demand, training courses and consulting services have now developed. These allow expert Node.js users to help less experienced developers with strategy, code reviews and support packages.

 What Courses Can Give Me the Most Benefit?

Developers can benefit from training courses like the Node.js Core Foundations and Advanced Node.js development. These offer solutions to problems developers can run into as novice users.

This type of training is beneficial because Node.js is projected to be the next big programming trend, much like Java or Ruby on Rails. Node.js is a new way of thinking about the way software systems should work.

What is Seen in a Core Foundations Course?

When you take a Core foundations course you learn how to use the event-driven, non-blocking I/O model to build real time applications that are data intensive. Node.js changes the way developers build applications, allowing to do so in a fraction of the time and much more efficiently.  Here developers learn to create expressive, clear and robust modular code.  They command callbacks, event emitters and streams, which they can use to stream data that otherwise wouldn’t fit in application memory.

The Advanced Node.js Course

Node.js for those who are aware of the basic configurations extends further into what developers expect from a web platform. This type of training course explores how dynamic systems are used, and how they operate across the entire network. Because Node.js fundamentally uses a single-threaded event loop, this course explores the strategies in handling complex, CPU intensivetasks and how you can take advantage of the modern multi-processor environment with Node.js.

Why Do I Need a Course?

As an experienced developer you may be able to see your way around Node.js without the help of a training course, but the learning will certainly come at the cost of more than a few mistakes, and these can mean time. Can you really afford to put in several months of learning on your own here? A course can give you the road map to using Node.js effectively and show you the “ins and outs” in just a short time frame, a matter of a few days or weeks.

Cloud server hosting migration 101 – The Training Course You Should Take

we know that keeping data on a private server might at some point resemble the disaster of a tornado hoisting up  your home and smashing it against the ground. The solution, of course, is Cloud server hosting migration. But there are several things you have to do to prepare for a cloud server framework.

Cloud server hosting migration 101

To prepare for this process the best way possible, you should take a specialized training course in cloud migration. This type of course will guide you through the general preparation and the process. To help you see what needs to be done, we’ve listed a few of the preparation tips:

  • Establish a Log Rotation Policy :  Large log files can increase the time a migration takes, or if conducting a full backup can make the clone image of the data much larger than it need be.  You should manually rotate the virtual host and application logs, as these aren’t generally rotated, unless you specifically set up this configuration. Use utility tools like logrotate  to ensure your logs are kept smaller.
  • Archive and Review Old Data : Inspect all your archived log files, and application cache files. Look for old tables and entries. Remove those that are unnecessary. The more files you can remove the less you’ll need to copy to the cloud and the faster the migration will be.  You want to especially look for those Ruby on Rails applications. Many applications or entries using this language can create large session files that are never deleted. Check your apps to see where these sessions and cache files are stored.
  • Review Large Files : Remove unnecessary large files from the server. This will  make the image size smaller. Use special find utilities to find these files.
  • Force Log Rotations : When applications are run, they can generate new log entries. By forcing the log rotation beforehand you make sure these changes are small. Log rotation tools can help you accomplish this.
  • Lock Databases : When you migrate databases you could lose data or even corrupt the database in the image. Bring the database down, or make your tables read-only so they cant be written over during the operations. You can lock your tables using the MySQL.
  • Minimize Application Caches : You’ll also want to clean out all unneeded session and cache files, by doing so you will prevent the slow-down of the migration process.

Conclusion

After completing all of the initial preparation processes, and implementing a few utility tools you’ll be ready for the migration process. But the entire movement to the Cloud will be much more efficient, secure and fast. Taking Cloud migration training courses can help prepare you for the process, making it smooth, and helping you avoid the loss of any important data.

Cloud Applications – Why IT People Need This Specialized Training

Not once, since the emergence of the Internet has a technology prompted such a large change in the way businesses operate. At its most basic level Cloud computing changes the way businesses interact with data and applications. Now, instead of data being stored on local hard drives, it is now stored on a remote host that lets you access it at any moment from any location, simply by using the Internet and a simple web browser.

Cloud Applications

Why Are Cloud Applications Becoming such a Big Trend?

Cloud applications are changing the way corporate IT works, and it is also changing the way IT professionals work in this arena too. With the help of Cloud applications and storage, companies no longer need to store, purchase and use expensive server and network equipment. This in turn, reduces the monetary expense, time and employment resources involved in maintaining computer systems.  By the same token the use of the cloud allows a business to grow their business, but also shrink their computer resources and expenses, paying only for the resources and services they actually need.  Another great advantage to cloud computing applications is that employees can access important and sometimes even very expensive applications from any computer in any location. This gives employees a great deal of flexibility, especially for those that travel a great deal.

How Do Cloud Computing Applications Change the Role of the IT Professional?

Cloud offers a world of possibility, yet it is in this area that there is a gap. The space between the knowledge of IT professionals trained 5 to 20 years ago, and those that are just now graduating with cloud experience. Although cloud technology is a new trend, one that will have great impact on the business world, many existing IT professionals are unfamiliar with working with, maintaining, and securing cloud applications. The migration into the cloud will increase the need for professionals who are experienced in maintenance, repair and the upgrade of cloud related technology, that’s why training courses in cloud applications is so important.

IT personnel working in this area will need to know how to innovate instead of support. Developers, programmers and coders who know how to work in the cloud environment and how to support business needs with better applications will be in demand, especially when it comes to mobile and handheld device integration needs. These professionals will also need to be well versed in higher security measures, those needed by cloud technology.

 The Importance of Training in Cloud Applications

Training in cloud applications allows IT experts to get all of this knowledge easily, without having to go through the educational loopholes of making mistakes and having to reconfigure or change processes. Training courses eliminates the guess work and saves you time in valuable IT resources.

Amazon S3

Running a blog takes time and effort, and of course know how. When you first start Amazon S3 you can use a free blogging platform, but eventually you’ll want to host the blog on either a shared hosting site, a Virtual Private Server or a dedicated server. However, once your blog starts becoming popular, and you start serving something like 50,000 page view per day, your  blog starts consuming anywhere from 60 to 80 Gb of bandwidth on a daily basis and that brings the stability of your site into question.

Amazon S3

That’s when you need to start thinking of scaling your website, when you need to start looking for stable online file hosting.  The reason? Excessive bandwidth usage causes your hosting service to freeze or shutdown your site. This is when Amazon S3 comes in handily.

What is Amazon Simple Storage  (S3)) Service?

This is an online storage facility, one that is cheap, fast and relatively easy to set up, especially if you have a certain foundation or knowledge in its use. This knowledge can come from a simple training course. This storage service is offered by e-commerce giant Amazon, so whatever you store on the S3 system remains very secure.

Who Needs Amazon S3?

S3 is suitable for webmasters, developers and bloggers. It is especially useful for those who are running out of bandwidth. The best part of working with the Amazon S3 platform is that there are no initial costs or setup fees.  You just pay for whatever storage space and bandwidth you use.

The Problem?

When you share hosting, as most bloggers or website owners do, any intensive page view or use, any Stumble Upon or Digg effect can eat up your bandwidth limit, and when that happens the hosting company usually suspends your account until you make an additional payment. This can become cumbersome, especially if you run more than one hosting account. Amazon S3 can solve this issue for you, however, you really do need to know how and when to use it.

The Solution

Taking an Amazon S3 training course can help you understand when and how cloud frameworks like Amazon S3 can help.  Combining this cloud technology with your existing platforms can make your applications and websites work faster, serving pages faster and separating them from normal HTTP requests.  It guarantees better stability.

And while learning to use Amazon S3 on your own is certainly possible, taking a training course only takes a few hours of your time and can help you avoid the pitfalls of bandwidth usage, website and application management.

Bottom Line

Amazon S3 is very useful in cloud management, but often developers have to go through a learning curve to command it effectively. This can take months to learn to dominate. However, when you take a quick training course you immediately learn to avoid the pitfalls, and immediately know where and how to solve your bandwidth issues.

Amazon EC2

Amazon Elastic Compute Cloud (Amazon EC2) is a service that offers compute capacity in the cloud environment. The purpose is to make web-scale computing easier for developers. The interface allows you to configure capacity with reduced friction. It gives you complete control over all your computer resources while running them on Amazons cloud environment.

The Amazon EC2 reduces the amount of time needed to obtain and boot new server instances allowing you to scale capacity to your needs. This new Amazon EC2 changes the way cloud computing works because it only requires you to pay for the capacity you use. It gives you the ability to build failure resilient applications.

amazon-cloud-300x248

How Do I Learn to Use It?

Amazon EC2 offers a true cloud hosting service, but you need to really understand the interface structures. It allows you to launce instances within a variety of operating systems and load them to your custom application environment.  To really understand the full functionality of Amazon EC2, you’re better off taking a training course.  This type of course will teach you to easily use Amazon EC2 to:

  • Select a pre-configured template Amazon Machine Image (AMI) and get it functional immediately.
  • Create an  AMI for your libraries, data and applications.
  • Configure your network access and the security for the EC2 instance.
  • Efficiently manage all your instances using the APIs or other management tools.

The Highlights to Using Amazon EC2

There are more than a few benefits to using EC2 for your cloud computing needs. Amazon EC2 lets you increase or decrease you web capacity within minutes. You can manage thousand of server instances simultaneously, and you have complete control over your instances. You can get root access to every instance and interact with each as you would any physical device.

EC2 offers you access to multiple operating systems and software packages, but also allows you to select the CPU usage, memory configuration, instance storage space and boot partition size that is best for your operating system.

Bottom Line

Amazon EC2 has many benefits for enterprises that are migrating towards the cloud. This is a system that has a lot of future growth. However, understanding its full functionality is a little intimidating, especially if you are taking it on alone. That’s why training courses in Amazon EC2 can help. These can teach you, in a matter of hours, processing methods that could take you months to learn on your own. Training offers an efficient way of managing all of the Amazon EC2 potential without any of the associated headaches.