Java7
Posts tagged CI
Apache Archiva: The request was rejected because its size exceeds the configured maximum
Aug 23rd
Somewhere today i installed Apache Archiva (Build Artifact Repository Manager) on my Linux box for testing and was trying to upload an artifact that is 30MB in size (think it was weblogic.jar) and was refused due to file size limit (10MB by default).
I am using Linux, but if you using Windows then its fairly “simpler” to open and write to the below mentioned files.
Modify maximum file upload size
Locate struts.properties and open using your favorite text editor
Locate the struts.multipart.maxSize key, change out the value to a higher value.
Increase timeout threshold (to accommodate a longer file transfer)
Locate jetty.xml and open using your favorite text editor
This is usually located in the conf folder of your Apache Archiva installation
Locate maxIdleTime
Change out the default configured value to a higher threshold
Restart Apache Archiva to let the s
To save a modified file in VI editor and quit to prompt, issue <Esc>, “:wq”, <Enter>.
To discard changes made to a file in VI editor, and quit to prompt, issue <Esc>, “:q!”, <Enter>.
To toggle between edit and view modes of VI editor, issue <Esc> or <Insert> or “i”.
Revolutionize the way you create anymore new Java applications – with Maven 3
Jan 2nd
Make a vow, that from 2011 you will not build by hand, you will not manually manage dependencies. You will, use Maven tool.
When i started out listening in parts of what Maven is from various sources, i simply did not pay attention or try to understand what its goal is. And its a true pity that, yes, Maven is more than dependency management – the team has been trying to sell Maven in its full entirety that the people (developers) are so “scared” to get started out with it. And frankly not all developers like changes. (frequent and rapid change that is)
Lets put a stop to this and help all developers and organizations save that effort and money spent on dependency management respectively.
What are the odds that your web / j2se / connector application isn’t using any third party libraries? And by that i mean anything which you needed to manually configure to your build path, by hand or by ant. Those have been hacks that have been working till Maven came up with this beautiful solution.
Consider this, when your application requires say Spring framework libraries, core and bean. Normally without Maven tool, one would download to a local directory, write some ant line so that ant may compile and build, then also set up the build path on Eclipse (assuming that is the IDE you are working on), and repeatedly perform this for every library you require.
This is not so a problem because you are already familiar, and the odds are there that you have done this not in one sitting, rather each time you realize you need something (a library), you search for and put it in use your project using the above manner.
What if, you are working on a team, or what if you are expecting turnovers, or simply new head counts? Well these are the people who come in, spend a day or two trying to figure out the dependencies to add in order to take away all the build errors from Eclipse, playing the guessing game on which version you were using, and bingo, that is money wasted, and the least surest way of building an enterprise application – by chancing with dependency versions.
Lets highlight how to get started with Maven, and assuming we are on the Eclipse IDE page:
1- Download the standard Eclipse EE version. (Skip if you already have one).
2- Install the Maven for Eclipse IDE plugin directly from your IDE. http://m2eclipse.sonatype.org/installing-m2eclipse.html Eclipse Update Site

3- Create a new Maven project using the wizard.

4- Volah, your project dependency is now fully managed by Maven.
5- Lets take this a step forward by adding Spring library dependency using Maven. Right click on the project created in the previous step, navigate to and select “Add Dependency” from the context menu.
6- Type “Spring” into the text field and wait for the list of dependency appear. Select 3.0.5 release, which is what we are going for right now. Notice that once you do so, Maven downloads the required files, and actually caches on your local directory so that the next time you request for the same dependency, it loads from locally.


7- Once it is done, expand the “Maven Dependencies” tree to discover the Spring libraries it has just downloaded and linked for us. Subsequently, we will only need to go through the same step to add another dependency, such as libraries from Apache Commons.
Thats all for Maven for now, and hopefully it gets you started and excited about a whole new paradigm of project source and build dependency management.












