Why not have it included in maven central. This is quite easy for open
source projects and much more practical for your users. See
https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide
Kind regards,
Joachim
On 03/05/2014 09:23 PM, Howard wrote:
Hi all
I should preface this all by saying that I am not an experienced maven
user, though I would not describe myself as a complete newbie, so I
won't be too surprised if I am just doing something stupid here.
Please let me know if this is the wrong group for this type of question.
I've got a project where we are keeping all of our code on GitHub. The
project name is DataBridge Because this is an National Science
Foundation funded Open Source project I thought it might make sense to
store the jar files we produce in a maven repository on GitHub. I
found this web page
http://stackoverflow.com/questions/14013644/hosting-a-maven-repository-on-github
and followed the instructions for one project that produces one jar.
It seems to have worked great for putting the jar file up on Github.
The problem is occurring when I try to download the jar as an artifact
in another pom for another project that depends on it. I can download
the jar and it's pom using wget at the following addresses:
wget
https://github.com/HowardLander/DataBridge/blob/mvn-repo/org/renci/databridge-util/1.0-BETA/databridge-util-1.0-BETA.jar
wget
https://github.com/HowardLander/DataBridge/blob/mvn-repo/org/renci/databridge-util/1.0-BETA/databridge-util-1.0-BETA.pom
but I don't seem to be able to find the magic to get maven to grab
them. I'm thinking the problem is that I have the repository set
incorrectly. It's set to
<repositories>
<repository>
<id>github</id>
<url>https://github.com/HowardLander/DataBridge/blob/mvn-repo</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
Here's what I get from mvn -e compile
how...@databridge.renci.org:/projects/databridge/howard/DataBridge/network/BigData/XMLSim
$ mvn -e compile
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building XMLTest 1
[INFO]
------------------------------------------------------------------------
Downloading:
https://github.com/HowardLander/DataBridge/blob/mvn-repo/org/renci/databridge-util/databridge-util/1.0-BETA/databridge-util-1.0-BETA.pom
[WARNING] The POM for
org.renci.databridge-util:databridge-util:jar:1.0-BETA is missing, no
dependency information available
Downloading:
https://github.com/HowardLander/DataBridge/blob/mvn-repo/org/renci/databridge-util/databridge-util/1.0-BETA/databridge-util-1.0-BETA.jar
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1.593s
[INFO] Finished at: Wed Mar 05 11:56:41 EST 2014
[INFO] Final Memory: 4M/15M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal on project XMLTest: Could not resolve
dependencies for project com.RENCI.app:XMLTest:jar:1: Could not find
artifact org.renci.databridge-util:databridge-util:jar:1.0-BETA in
github (https://github.com/HowardLander/DataBridge/blob/mvn-repo) ->
[Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal on project XMLTest: Could not resolve dependencies for
project com.RENCI.app:XMLTest:jar:1: Could not find artifact
org.renci.databridge-util:databridge-util:jar:1.0-BETA in github
(https://github.com/HowardLander/DataBridge/blob/mvn-repo)
That seems fairly clear: it can't find
https://github.com/HowardLander/DataBridge/blob/mvn-repo/org/renci/databridge-util/1.0-BETA/databridge-util-1.0-BETA.jar.
Any suggestions?
For reference here's the part of the pom that is trying to download
the jar:
<dependency>
<groupId>org.renci.databridge-util</groupId>
<artifactId>databridge-util</artifactId>
<version>1.0-BETA</version>
</dependency>
The jar in question is part of the databridge-util project. Here's the
jar that pushes (successfully as far as I can tell) the jar and it's
related artifacts to the github.
<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>0.8</version>
<configuration>
<message>Maven artifacts for
${project.version}</message> <!-- git commit message -->
<noJekyll>true</noJekyll> <!-- disable webpage processing -->
<outputDirectory>${project.build.directory}/mvn-repo</outputDirectory>
<!-- matches distribution management repository url above -->
<branch>refs/heads/mvn-repo</branch> <!-- remote branch name -->
<includes><include>**/*</include></includes>
<repositoryName>DataBridge</repositoryName> <!-- github repo name -->
<repositoryOwner>HowardLander</repositoryOwner> <!-- github username -->
</configuration>
<executions>
<!-- run site-maven-plugin's 'site' target as part of the
build's normal 'deploy' phase -->
<execution>
<goals>
<goal>site</goal>
</goals>
<phase>deploy</phase>
</execution>
</executions>
</plugin>
Thanks much
Howard Lander
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org