<!DOCTYPE html>
<html lang="en">
	<head>
		<title>Maven repository for lucares.org</title>
	</head>
	<body>
		<h1>Lucares Repository</h1>

		<h2>Browse</h2>

		<table>
			<tr>
				<th>Group Id</th>
				<th>Artifact</th>
			</tr>

		<?php

		ini_set('display_errors', 'on');

		$groupId = "org.lucares";
		$groupIdPath = str_replace(".", "/", $groupId);


		$artifacts = glob($groupIdPath."/*");
		usort($artifacts, 'strcasecmp');

		foreach($artifacts as $filename)
		{
			if(is_dir($filename))
			{
				$artifactId = str_replace($groupIdPath."/", "", $filename);
				echo '<tr>';
				echo '<td><a href="'.$groupIdPath.'">'.$groupId.'</a></td>';
				echo '<td><a href="'.$filename.'">'.$artifactId.'</a></td>';
				echo '</tr>'."\n";
			}
		}

		?>
		</table>

		<h2>How To Use</h2>

		<ol>
			<li><a href="#gradle">Gradle</a></li>
			<li><a href="#ivy">Ivy</a></li>
		</ol>


		<h3 id="gradle">How to use with Gradle</h3>
		For single project builds add to your build.gradle:
		<pre>
apply plugin: 'maven'
repositories {
	mavenCentral()
	jcenter()
	maven { url 'https://repo.lucares.org/' }
}
		</pre>

		For multi project builds add to your main build.gradle:
		<pre>
subprojects {
	apply plugin: 'maven'
	repositories {
		mavenCentral()
		jcenter()
		maven { url 'https://repo.lucares.org/' }
	}
}
		</pre>

		<h3 id="ivy">How to use with Ivy</h3>
		Use an ivy settings.xml like this:
		<pre>
&lt;ivysettings&gt;
	&lt;settings defaultResolver="myChain" /&gt;
	&lt;resolvers&gt;
		&lt;chain name="myChain"&gt;
			&lt;ibiblio name="maven2" m2compatible="true" /&gt;
			&lt;ibiblio name="lucares-repo" m2compatible="true" root="https://repo.lucares.org"/&gt;
		&lt;/chain&gt;
	&lt;/resolvers&gt;
&lt;/ivysettings&gt;
		</pre>
	</body>
</html>
