How to install Apache Archiva in Windows

Apache Archiva is a powerful repository manager, and usually hook up with Maven development.

Apache Archiva installation

1. Download Apache Archiva

Visit Apache Archiva official website, Click on the download link, e.g Archiva 1.2.2.

P.S Choose the standalone version (Archiva will use jetty as build-in web container)

2. Extract it

Extract the downloaded zip file to folder “D:\apache-archiva-1.2.2\”

3. Install as Windows srvice

Find the archiva.bat “{Archiva_Home}\bin” folder, and issue the “archiva install” command to register it as a Windows service.


D:\apache-archiva-1.2.2\bin>archiva install
wrapper  | Apache Archiva installed.

4. Start Archive

Two ways to start the Apache Archive :

1. Start it with Archiva command – “archiva start”.


D:\apache-archiva-1.2.2\bin>archiva start
wrapper  | Starting the Apache Archiva service...
wrapper  | Apache Archiva started.

2. Start it as Windows service under control panel.

4. Archive web admin

Access your Apache Archiva web admin via 8080 post – http://localhost:8080/archiva/.

P.S Apache Archiva standalone version is using jetty as build-in web container and 8080 as default port.

5. Done

Post Installation

Please change the Apache Archiva default 8080 port to avoid port conflict issue, as you know, the 8080 is a very hot port number.

1. Archiva configuration file

Locate the Apache Archiva web container configuration file – “D:\apache-archiva-1.2.2\conf\jetty.xml

2. Update port number

Find the following pattern


<Call name="addConnector">
   <Arg>
       <New class="org.mortbay.jetty.nio.SelectChannelConnector">
         <Set name="host"><SystemProperty name="jetty.host"/></Set>
         <Set name="port"><SystemProperty name="jetty.port" default="8080"/></Set>
         <Set name="maxIdleTime">30000</Set>
         <Set name="Acceptors">2</Set>
         <Set name="statsOn">false</Set>
         <Set name="confidentialPort">8443</Set>
	 <Set name="lowResourcesConnections">5000</Set>
	 <Set name="lowResourcesMaxIdleTime">5000</Set>
       </New>
   </Arg>
</Call>

Change the jetty port to other port – “8888”.


 <Set name="port"><SystemProperty name="jetty.port" default="8888"/></Set>

3. Restart Apache Archiva

Restart it to take effect. Now you can access the Apache Archive web admin via http://localhost:8888/archiva/.

About the Author

author image
mkyong
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities.

Comments

avatar
7 Comment threads
1 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
6 Comment authors
cdallosbIbanSAGUN MANDISanketNorman Valencia Recent comment authors
newest oldest most voted
SAGUN MANDI
Guest
SAGUN MANDI

Hi, i have followed the processes and installed the archiva . But after starting when i am trying to access archiva it showing me Error 404. Could you please tell me how to fix this problem?

cdallosb
Guest
cdallosb

Hi, change url and access with this: http://localhost:8080/

Iban
Guest
Iban

For those who get the error: “Problem accessing /archiva 404” and you want to use the url http://localhost:8888/archiva/
You have to change in the file “yourPathcontextsarchiva.xml” this line:
/
For this:
/archiva

If not, simply go to http://localhost:8888/

Sanket
Guest
Sanket

Hi I am setting up archiva and getting below error while creating admin user

Problem accessing /archiva/security/register.action. Reason:

Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;
nested exception is:
java.net.ConnectException: Connection refused: connect
Caused by:

org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;
nested exception is:
java.net.ConnectException: Connection refused: connect
at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:419)
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:342)
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:338)
at org.codehaus.redback.integration.mail.MailerImpl.sendMessage(MailerImpl.java:131)
at org.codehaus.redback.integration.mail.MailerImpl.sendAccountValidationEmail(MailerImpl.java:73)
at org.codehaus.plexus.redback.struts2.action.RegisterAction.register(RegisterAction.java:154)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:88)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)

Norman Valencia
Guest
Norman Valencia

Thanks!!!

Armando
Guest
Armando

Hi, I´m learning how to use apache archiva in my work, and I just want to congratulate you for this apportation to the community who lives in the IT world.

Best Regards from México!!

trackback
Apache Archiva Tutorials | Tutorials

[…] Install Apache Archiva in Windows A guide to install the Apache Archiva in Windows. […]

trackback
How to integrate between Apache Archiva and Maven | Maven

[…] Install Apache Archiva in Windows […]