Skip to content

Instantly share code, notes, and snippets.

@baroquebobcat
Created June 24, 2012 19:30
Show Gist options
  • Select an option

  • Save baroquebobcat/2984620 to your computer and use it in GitHub Desktop.

Select an option

Save baroquebobcat/2984620 to your computer and use it in GitHub Desktop.
Mirah Office Hours: June 24th 2012
  • Maven Matriculation -- push mirah to sonatype

reading https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide

-DpushChanges=false

so I don't screw up git.

put some settings in ~/.m2/conf/settings.xml

mvn release:clean -DpushChanges=false
mvn release:prepare -DpushChanges=false

Ctrl-C. Not what I wanted

I want to push a snapshot version first.

https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-7a.2.PublishSnapshots

mvn clean deploy

gets a 401. hmm. sez to try the nexus UI. ok. http://www.sonatype.org/nexus/go

So, that wasn't it. That's how to run nexus locally. The oss nexus install is at https://oss.sonatype.org/index.html#welcome

dur. I put settings.xml in the wrong place. It's supposed to be in ~/.m2/settings.xml

success!

It pushed it. Now, did it work?

co SavageGames.

update maven-mirah-plugin to 1.1-SNAPSHOT and dep to 0.0.12-SNAPSHOT and run mvn clean install.

nope.

[ERROR] Failed to execute goal org.mirah.maven:maven-mirah-plugin:1.1-SNAPSHOT:compile (default) on project savagegames: (NameError) Class 'mirah.impl.Map' not found. -> [Help 1]

Now trying to build a 0.0.11 artifact.

AAARGH!

so, I had the wrong version of the release plugin so it ignored my pushChanges=false and pushed them anyway.

also now I'm getting

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0:prepare (default-cli) on project shared: You don't have a SNAPSHOT project in the reactor projects list. -> [Help 1]

which sucks, because I'm not sure how to resolve it. I'll try adding -SNAPSHOT and see what happens.

argh. nope.

gives up

my final way to run release:prepare

mvn -DsuppressCommitBeforeTag=true -DpushChanges=false -DremoteTagging=false release:prepare

futzed about with versions and reran ^^ and it worked. Now, will release perform work after doing...

docs sez to do this: cd target && ln -s ../../bitescript bitescript, so doing

cd target && ln -s `bundle show bitescript` bitescript

then

mvn  -DsuppressCommitBeforeTag=true -DpushChanges=false -DremoteTagging=false  release:perform

argh!

first I needed to bundle install

then reran with -rf :mirah and ran into this little doozy.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.3.2:perform (default-cli) on project mirah: No SCM URL was provided to perform the release from -> [Help 1]

http://jira.codehaus.org/browse/MRELEASE-103

I guess I should add connectionURL or something....

something got borked again.

git reset HEAD^ ...release:clean ...release:prepare

Oh you!

You don't have a SNAPSHOT project in the reactor projects list.

Ah, when I said "futze with the version" I meant change the version in the pom from 0.0.11 to 0.0.11-SNAPSHOT.

Oh, now you want my changes committed?? ok I guess.

And you want to make a tag too? And it's already there? so sad.

$ git tag -d shared-0.0.11

blargh!

once more into the breach:

mvn  -DsuppressCommitBeforeTag=true -DpushChanges=false -DremoteTagging=false -DlocalCheckout=true -DlocalRepoDirectory=`pwd` -Dtag=0-0-11-maven-release-2-electric-boogaloo -DconnectionUrl=scm:git:git@github.com:baroquebobcat/mirah.git release:perform

Hurgh! -Dtag=<me> was a bad idea as the checkout was wrong.

git reset HEAD^
git co .

Let's do this!

aeohtaueohsiuadseauotns

I think bundle install should be part of the build exec step.

Urgh!

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.3.2:perform (default-cli) on project mirah: Can't run goal [deploy]: Working directory "/Users/nick/hacking/mirah_hacking/mirah/dist/checkout/mirah" does not exist! -> [Help 1]


  • Constructors w/ optional args
  • Code cleanup
  • android tutorials
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment