Skip to content
This repository was archived by the owner on Sep 8, 2022. It is now read-only.

Make ant a provided dependency #23

Merged
merged 1 commit into from
Oct 7, 2014

Conversation

gourlaysama
Copy link
Contributor

Ant is only needed to compile the Partest ant task. At runtime, the
task is run by the Ant runner, so ant.jar and friends are already
provided.

In the scala build, this removes ant from the compile classpath of
partest-extras, and from the runtime classpath of test.junit and the
test/partest script. Nothing in partest other than the task depends
on Ant, so there is no need to explicitly provide ant anywhere. Both
ant test.run and test/partest should work fine with this change.

The motivation for this is to prevent ant from appearing several time on
the classpath, see [1].

[1] https://groups.google.com/d/topic/scala-internals/EuMX5xu347o/discussion

Ant is only needed to compile the Partest ant task. At runtime, the
task is run by the Ant runner, so ant.jar and friends are already
provided.

In the scala build, this removes ant from the compile classpath of
partest-extras, and from the runtime classpath of test.junit and the
`test/partest` script. Nothing in partest other than the task depends
on Ant, so there is no need to explicitly provide ant anywhere. Both
`ant test.run` and `test/partest` should work fine with this change.

The motivation for this is to prevent ant from appearing several time on
the classpath, see [1].

[1]: https://groups.google.com/d/topic/scala-internals/EuMX5xu347o/discussion
@gourlaysama
Copy link
Contributor Author

To manually test that it works:

  • in scala-partest:
sbt 'set publishTo := Some(Resolver.file("file",  new File(Path.userHome.absolutePath+"/.m2/repository")))' publish
  • in scala:
sed -i 's/partest.version.number=1.0.1/partest.version.number=1.0.2-SNAPSHOT/g' versions.properties
test/partest # should start fine
ant test.run # should work too
ant test.junit # no more ant warning

@gourlaysama
Copy link
Contributor Author

review @adriaanm

@adriaanm
Copy link
Contributor

adriaanm commented Oct 7, 2014

LGTM! That was quick!

@adriaanm
Copy link
Contributor

adriaanm commented Oct 7, 2014

I'll cut a new partest release after 2.11.3 is out. Since partest doesn't ship & it's not urgent, I'd like to fiddle with as few levers as possible in the homestretch before the next release.

adriaanm added a commit that referenced this pull request Oct 7, 2014
@adriaanm adriaanm merged commit 026f5f8 into scala:master Oct 7, 2014
@som-snytt
Copy link
Contributor

You guys are good. I mean, like, the good guys.

@gkossakowski
Copy link
Contributor

My face goes 🌞 when I see good guys in action.

@gourlaysama gourlaysama deleted the topic/ant-provided branch November 12, 2014 14:08
lrytz pushed a commit to lrytz/scala-partest that referenced this pull request May 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants