(note: replace ORGANIZATION
and PROJECT
)
git clone git clone git@github.com:ORGANIZATION/PROJECT.git my-repository
cd my-repository
git branch repository
git checkout repository
rm -rf file1 file2 file3 .. etc
(note: replace YOUR_GROUP
, YOUR_ARTIFACT
, YOUR_VERSION
and YOUR_JAR_FILE
)
mvn install:install-file -DgroupId=YOUR_GROUP -DartifactId=YOUR_ARTIFACT -Dversion=YOUR_VERSION -Dfile=YOUR_JAR_FILE -Dpackaging=jar -DgeneratePom=true -DlocalRepositoryPath=. -DcreateChecksum=true
YOUR_JAR_FILE
should point to an existent jar file, this is why it's best to create your repository branch in a different folder, so you can reference the existing jar in /your/project/path/target/artifact-x.y.z.jar
git add -A . && git commit -m "released version X.Y.Z"
git push origin repository
The repository url you just created is https://raw.github.com/YOUR_ORGANIZATION/YOUR_ARTIFACT/repository/