maven install takes long time

Posted on 2014-09-17
Medium Priority
Last Modified: 2014-10-17
hi experts

i have a web project (front end is javascript and back end is java).

currently i am doing maven -clean first
then maven -install

When i do maven clean , it wipes out the taret folder
maven install creates the target folder again

The problem is target folder contains too may javascript specific files and to create it the entire maven
install process takes close to 30 minutes.

I want to avoid this. I dont want to touch javascript files in target and only compile the
java files.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">


Open in new window

Any sugessions will be appreciated.
Question by:royjayd
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
LVL 36

Expert Comment

ID: 40329387
maven install process takes close to 30 minutes.
Wow, that IS a long time. Are you sure that it is the Javascript files though? How many Javascript files (and other "resource" files, CSS, fonts, images that get packaged into the WAR) and what is the total size of these files? How big is the resultant WAR file that is produced?

Unfortunately, I don't think there is anyway to get Maven to print timestamps along with the console logging that it produces (so that you could post it here for us to look at), but if you just watch the console output produced, is there a particular point that is sits at for the majority of that 30 mins?

Author Comment

ID: 40330557
yes javascript files, war file size is close to 50 mb.
can i use exclude option something specified in this site:


Author Comment

ID: 40338205
hi mccarl,
I was able to reduce the time from 30 mins to 10 mins , all  do now is maven install, and i skip the maven clean.
That way the entire target folder is not wiped out.
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 36

Expert Comment

ID: 40338269
It still sounds like a long time though, even for 50mb. You didn't mention how many files there are? Javascript files that is, that are being copied into the final WAR file?

Author Comment

ID: 40338907
yeah, the ext-js library is huge though, close to 5000 javascript files.
LVL 36

Accepted Solution

mccarl earned 2000 total points
ID: 40340554
the ext-js library is huge though, close to 5000 javascript files.
Are you sure that you are using it correctly. That sounds like you may have unzipped the entire SDK into your webapp. Theoretically, you should just have a couple of Ext JS files and a handful of the resource files (images, css, etc). I haven't used Ext JS before but by looking at the docs & other forums, etc it looks as though there are two ways to go about this...

1 - (the proper way) is to use the tools that come with Ext JS to "build" a version of the library that uses only the components, themes, etc that you require. All this gets compiled and minified into one JS file and there associated resources.

2 - If you don't want to go through the above procedures, and you are not worried about having a larger JS file for the client to download, I believe that you can just take the one big "ext-all.js" file that contains all the components built in and put that in your webapp (again with the necessary other resources)

But if I'm right it sounds like you may have included the whole SDK in your webapp, which would include all the documentation and build tools and examples etc, all the stuff required for "development" but not what should be deployed for "runtime"

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month12 days, 6 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question