Solved

maven install takes long time

Posted on 2014-09-17
6
189 Views
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">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.compUI.searMan</groupId>
	<artifactId>searMan</artifactId>
	<version>1</version>
	<packaging>war</packaging>
	<name>searManAdmin</name>

....
...
</project>

Open in new window


Any sugessions will be appreciated.
Thanks
Jay
0
Comment
Question by:royjayd
[X]
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
6 Comments
 
LVL 35

Expert Comment

by:mccarl
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?
0
 

Author Comment

by:royjayd
ID: 40330557
yes javascript files, war file size is close to 50 mb.
can i use exclude option something specified in this site:
http://maven.apache.org/plugins/maven-resources-plugin/examples/include-exclude.html

thanks.
0
 

Author Comment

by:royjayd
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.
Thanks.
0
Independent Software Vendors: 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 35

Expert Comment

by:mccarl
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?
0
 

Author Comment

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

Accepted Solution

by:
mccarl earned 500 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"
0

Featured Post

Independent Software Vendors: 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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to install java on RHEL image on EC2 4 57
eclipse buid path vs tomcat lib path 10 38
collection output issue 9 65
running on tomcat not jboss eap 7.0 3 31
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
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…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

733 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