Skip to content

Developer profiles #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Developer profiles #7

wants to merge 2 commits into from

Conversation

hinerm
Copy link
Member

@hinerm hinerm commented Apr 16, 2014

@dscho @ctrueden this PR updates bump-pom-scijava.sh to work with the developer-profiles branch of pom-scijava.

I just wanted @dscho especially to sign off on these changes, that I'm updating the profile properties correctly.

Thanks!

hinerm added 2 commits April 16, 2014 14:10
As the pom-scijava pom.xml now contains multiple properties ranges, it
is not enough to search and replace within the properties tag. A special
start/end anchor was added to the pom.xml to define the non-profiled
properties section, so this is used instead.
When bumping pom properties, also bump the corresponding properties in
any profile sections to the latest SNAPSHOT versions.
@dscho dscho changed the title Develper profiles Developer profiles Apr 17, 2014
@dscho
Copy link
Contributor

dscho commented Apr 17, 2014

I fear that we cannot really ask maven-helper to give us the current -SNAPSHOT version after a release was deployed and pom-scijava is to be updated.

Imagine, for example, if someone deploys a new release of, say, imglib2-ij and then immediately bumps pom-scijava, without giving Jenkins a chance to deploy the new -SNAPSHOT version first. That's the situation I am most concerned about...

@ctrueden
Copy link
Member

Note that I, as the inconsiderate person that I am, merged developer-profiles into pom-scijava master but without the start/end anchor comments. I didn't like them.

I would like to find a different approach to fixing the bump-pom-scijava script that does not need them.

@hinerm
Copy link
Member Author

hinerm commented Apr 17, 2014

@ctrueden yep I am on board.

@dscho
Copy link
Contributor

dscho commented Apr 18, 2014

I took the branch, renamed it to developer-profiles, fixed a few things here and there, and then merged it in afcae7f (and fixed my premature merge up in 57c353d).

@dscho dscho closed this Apr 18, 2014
@dscho dscho deleted the develper-profiles branch April 18, 2014 17:29
@ctrueden
Copy link
Member

Thanks!

ctrueden added a commit that referenced this pull request Oct 22, 2014
Just for you, Dscho!

Unfortunately, and surprisingly, performance is not much better:

export jar1=org/python/jython-standalone/2.7-b3/jython-standalone-2.7-b3.jar
export jar2=org/python/jython-standalone/2.5.3/jython-standalone-2.5.3.jar

== Using javap ==

$ time class-version.sh $jar1 $jar2
org/python/jython-standalone/2.7-b3/jython-standalone-2.7-b3.jar: J2SE 7 (51.0)
org/python/jython-standalone/2.5.3/jython-standalone-2.5.3.jar: J2SE 5.0 (49.0)

real    0m2.538s
user    0m4.616s
sys     0m0.810s

$ time class-version.sh $jar1 $jar2
org/python/jython-standalone/2.7-b3/jython-standalone-2.7-b3.jar: J2SE 7 (51.0)
org/python/jython-standalone/2.5.3/jython-standalone-2.5.3.jar: J2SE 5.0 (49.0)

real    0m2.382s
user    0m4.467s
sys     0m0.786s

== Using unzip ==

$ time class-version.sh $jar1 $jar2
org/python/jython-standalone/2.7-b3/jython-standalone-2.7-b3.jar: J2SE 7 (51.0)
org/python/jython-standalone/2.5.3/jython-standalone-2.5.3.jar: J2SE 5.0 (49.0)

real    0m3.026s
user    0m4.443s
sys     0m1.158s

$ time class-version.sh $jar1 $jar2
org/python/jython-standalone/2.7-b3/jython-standalone-2.7-b3.jar: J2SE 7 (51.0)
org/python/jython-standalone/2.5.3/jython-standalone-2.5.3.jar: J2SE 5.0 (49.0)

real    0m3.061s
user    0m4.486s
sys     0m1.161s

== Simplifying further ==

Even if you cut out the sed and expr commands like so:

  # extract byte #7
  major="$(unzip -p "$jar" "$(jar tf "$jar" | grep \.class$ | head -n 1)" | head -c 8 | hexdump -s 7 -e '1/1 "%d\n"')"

The results are no more impressive:

$ time class-version.sh $jar1 $jar2
org/python/jython-standalone/2.7-b3/jython-standalone-2.7-b3.jar: J2SE 7 (51)
org/python/jython-standalone/2.5.3/jython-standalone-2.5.3.jar: J2SE 5.0 (49)

real    0m3.053s
user    0m4.526s
sys     0m1.151s

$ time class-version.sh $jar1 $jar2
org/python/jython-standalone/2.7-b3/jython-standalone-2.7-b3.jar: J2SE 7 (51)
org/python/jython-standalone/2.5.3/jython-standalone-2.5.3.jar: J2SE 5.0 (49)

real    0m3.063s
user    0m4.656s
sys     0m1.151s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants