Solved

maven install takes long time

Posted on 2014-09-17
6
171 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
  • 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
topping1 challenge 7 73
firstChar challenge 13 110
Responding to Java JComponent extended classes's resize event 4 51
HSSFWorkbook cannot be resolved error 10 50
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now