Alexandre Archambault
d329f31137
Allow to force the value of Maven properties during resolution ( #886 )
2018-08-02 15:02:41 +02:00
Alexandre Archambault
c6fb16de5b
Add option to disable copying files in non standalone bootstraps ( #884 )
2018-07-17 18:46:48 +02:00
Ryo Fukumuro
c5b43d8d35
Make bootstrap safe for arguments including spaces ( #882 )
2018-07-16 14:05:22 +02:00
Martynas Mickevičius
e4f40b6a1d
Partition system and app args to bootstrapped executable ( #852 )
2018-05-21 18:29:27 +02:00
Alexandre Archambault
b59ada58df
Add option not to add preamble to generated bootstraps ( #854 )
2018-05-08 17:34:37 +02:00
Alexandre Archambault
104368a551
Allow to generate assemblies via the bootstrap command
...
Just pass '-a' or '--assembly' as option
2018-04-30 00:09:06 +02:00
Alexandre Archambault
7d40ba0134
Move assembly generation stuff to coursier.cli.util.Assembly
2018-04-30 00:02:03 +02:00
Alexandre Archambault
23b8ef67f7
Tweak assembly
2018-04-30 00:02:03 +02:00
Alexandre Archambault
cf1e0a0a5a
Small refacto in Bootstrap
2018-04-30 00:02:02 +02:00
Alexandre Archambault
962debc050
Take into account --property options in bootstrap
2018-04-30 00:02:02 +02:00
Alexandre Archambault
d0e9e41ca9
Actually pass Java options to bootstraps
2018-04-30 00:02:02 +02:00
Dorothy Ordogh
c469899040
Copy local artifact to cache ( #831 )
2018-04-26 11:16:09 +02:00
Martynas Mickevičius
05049a235d
Use vendor-id when discovering main classes ( #839 ) ( #841 )
2018-04-17 10:30:42 +02:00
Alexandre Archambault
1af1c6b11d
Replace some uses of java.io with NIO
2018-03-19 10:48:50 +01:00
Alexandre Archambault
817d6b6d44
Remove now unnecessary helper functions
...
They were useful on Java 6, and aren't anymore now that we require Java >= 8
2018-03-19 10:48:50 +01:00
Alexandre Archambault
3381727832
Simplify bootstrap artifacts handling a bit ( #810 )
...
If using bootstrap with "isolated" classloaders, optional artifacts weren't added to the "isolated" loaders before that…
I'm not sure anyone except me uses that, so commiting that straightaway for now… (I'm using it in the context of jupyter-scala, to isolate classloaders from there)
2018-03-13 16:48:09 +01:00
Alexandre Archambault
dc2e4996f4
Require Java 8 from now on
2018-03-12 21:50:35 +01:00
Alexandre Archambault
5bd162d5fe
Tweak scalac options
2018-03-12 21:50:35 +01:00
Alexandre Archambault
29f8d7b680
Remove scalaz dependency from core and cache, add scalaz-interop module
2018-03-12 21:50:35 +01:00
Alexandre Archambault
fb5a2fde12
Merge cache and fetch-js projects
2018-03-12 20:50:22 +01:00
Ruben Berenguel
cf365ea27a
Resets the connection (and sets partial download to false) if the range is not satisfiable by the server ( #795 )
2018-03-12 11:19:57 +01:00
Yi Cheng
a7605ff900
Retry on ChecksumError ( #797 )
...
Fix for #780
2018-03-10 12:57:47 -08:00
Nick Howard
d0b46864c8
json-report: one file per dependency instead of multiple; use m2 coords ( #782 )
...
When classifiers are used as part of dependency specifications, it's important to be able to select just the classified artifact. Unfortunately, in the current json, dependencies don't specify classifiers, so it isn't possible to just get one of the artifacts for a dependency when a classifier is required.
This patch introduces maven style artifact prefixes in order to include classifier and packaging information in the coordinates. By doing that, we can use them as keys in dependency lists more easily and it allows consumers of the json to treat those dependency keys as mostly opaque ids rather than having to parse them.
Addresses #743
2018-03-09 14:47:27 -08:00
Alexandre Archambault
f4fe44fe2c
Clean-up helper method to fully read InputStream
2018-03-03 15:09:02 +01:00
Alexandre Archambault
838a340b89
Remove deprecated stuff
2018-03-03 14:57:14 +01:00
Alexandre Archambault
a83df3e1c8
Add coursier.util.ValidationNel
2018-03-03 14:55:46 +01:00
Yi Cheng
76768c3479
Remove redundant test ( #788 )
...
Forgot to do so in #769 `CliIntegrationTest.scala` was split into `CliFetchIntegrationTest.scala` and `CliBootstrapIntegrationTest.scala`
2018-02-24 01:05:51 -08:00
Alexandre Archambault
1816b25b84
Stop using scalaz.{EitherT, \/}
...
Use scala.Either instead of \/
Use the custom coursier.util.EitherT instead of scalaz.EitherT
2018-02-22 18:20:34 +01:00
Dorothy Ordogh
3e4a65d5ee
Add ability to fetch artifact with a given url ( #774 )
...
* changes
* changes to Attributes
* make changes
* add test and fix bug
* add more tests
* fix failing tests
* fix parentheses
* remove comments I added and add test that's guarenteed not to exist in a repo
* remove Attributes third parameter and refactor Parse's moduleVersionConfig to return a tuple of Dependency and a Map of String to String representing extra parameters for the dependency
* update some return types and methods in the Helper class
* return FallbackDependenciesRepository back to original state
* refactor helper
* remove url from attributes
* fix tests and add cache to extra in build.sbt
* remove FallbackDepsRepo from sbt-coursier
* add variable for url and call encode in tests
* update tests and helper to have proper behavior
* remove setting deps to intransitive when url is present and add two tests
* add more tests, implement @wisechengyi's comments
* fix nits
* update ParseTests because some failed
* fix tests
* incorporate feedback from @alexarchambault and @wisechengyi
* update ParseTests to check for returned error vs thrown error
* remove one test that is covered in ParseTests
* fix nits
* add back deleted brackets
* return errors in Left without using return statement
* revert change because it's broken
* fix some positional things
* add return statement or else error won't be processed
* fix nits. thanks @wisechengyi
* Remove return statements
2018-02-22 18:06:06 +01:00
Yi Cheng
c8d191401c
Separate out bootstrap integration test ( #769 )
...
Separate bootstrap test because Pants does not pre-build the bootstrap.jar
2018-02-07 16:04:58 -08:00
wisechengyi
18434fdcd3
Update pants build
2018-02-07 10:23:07 +01:00
Alexandre Archambault
506e14a90b
Switch cli to scala 2.12 and latest case-app
2018-02-07 10:23:07 +01:00
Yi Cheng
f6ceba5b44
Add json report version and documentation ( #749 )
...
* Add version number to the json report
* Add documentation and borrow Pants' export versioning guideline: afa6a286f1/src/python/pants/backend/project_info/tasks/export.py (L49-L59)
2018-02-01 10:44:05 -08:00
Alexandre Archambault
8c72303ae9
Ensure POM files aren't added to classpath by bootstraps
...
They were when using the "isolated" classloader thing (that
https://github.com/jupyter-scala/ammonium and
https://github.com/jupyter-scala/jupyter-scala should probably be the only user of…)
2018-02-01 16:18:47 +01:00
Alexandre Archambault
14bc756b5b
Allow to deactivate Maven profiles from the CLI
...
And add extra tests for profile deactivation
2018-01-30 17:26:07 +01:00
Yi Cheng
849d128b90
Specify classifier on module level on CLI ( #735 )
2018-01-29 21:02:49 +01:00
Alexandre Archambault
5992c1d2d7
Remove deprecated "source repository" stuff
2018-01-21 22:28:05 +01:00
Bohdan Yavorskyi
2d5f7c3eb4
mixing urls and jars in bootstrap ( #742 )
2018-01-21 21:55:46 +01:00
Yi Cheng
5da2210d7f
Performance improvements for cli json report and minor refactoring ( #724 )
...
Major change:
* Identified hotspot in `JsonElem.hashCode` because it hashes children recursively. Hence simplified hashing scheme, reducing CPU time on `JsonReport.apply()` from 64.7 sec to 2.5 sec
Other minor changes:
* Make `JsonRequirement` use immutable classes
* Simplify `JsonRequirement` composition
2018-01-01 11:55:43 -08:00
Yi Cheng
a4258f48ce
Add json report to fetch and local exclusion option ( #692 )
...
This patch introduces changes for cli with json output #659 . Format as follows:
```
{
"conflict_resolution": {
"org:name:version" (requested): "org:name:version" (reconciled)
},
"dependencies": [
{
"coord": "orgA:nameA:versionA",
"files": [
[
<classifier>,
<path>
]
],
"dependencies": [ // coodinates for its transitive dependencies
<orgX:nameX:versionX>,
<orgY:nameY:versionY>,
]
},
{
"coord": "orgB:nameB:versionB",
"files": [
[
<classifier>,
<path>
]
],
"dependencies": [ // coodinates for its transitive dependencies
<orgX:nameX:versionX>,
<orgZ:nameZ:versionZ>,
]
},
]
}
```
For example:
```
fetch -t org.apache.avro:trevni-avro:1.8.2 org.slf4j:slf4j-api:1.7.6 --json-output-file x.out
Result:
├─ org.apache.avro:trevni-avro:1.8.2
│ ├─ org.apache.avro:trevni-core:1.8.2
│ │ ├─ org.apache.commons:commons-compress:1.8.1
│ │ ├─ org.slf4j:slf4j-api:1.7.7
│ │ └─ org.xerial.snappy:snappy-java:1.1.1.3
│ └─ org.slf4j:slf4j-api:1.7.7
└─ org.slf4j:slf4j-api:1.7.6 -> 1.7.7
```
would produce the following json file:
```
$ jq < x.out
{
"conflict_resolution": {
"org.slf4j:slf4j-api:1.7.6": "org.slf4j:slf4j-api:1.7.7"
},
"dependencies": [
{
"coord": "org.apache.avro:trevni-core:1.8.2",
"files": [
[
"",
"/Users/yic/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/apache/avro/trevni-core/1.8.2/trevni-core-1.8.2.jar"
]
],
"dependencies": [
"org.slf4j:slf4j-api:1.7.7",
"org.xerial.snappy:snappy-java:1.1.1.3",
"org.apache.commons:commons-compress:1.8.1"
]
},
{
"coord": "org.apache.avro:trevni-avro:1.8.2",
"files": [
[
"",
"/Users/yic/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/apache/avro/trevni-avro/1.8.2/trevni-avro-1.8.2.jar"
]
],
"dependencies": [
"org.apache.avro:trevni-core:1.8.2",
"org.slf4j:slf4j-api:1.7.7",
"org.xerial.snappy:snappy-java:1.1.1.3",
"org.apache.commons:commons-compress:1.8.1"
]
},
{
"coord": "org.slf4j:slf4j-api:1.7.7",
"files": [
[
"",
"/Users/yic/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.7/slf4j-api-1.7.7.jar"
]
],
"dependencies": []
},
{
"coord": "org.apache.commons:commons-compress:1.8.1",
"files": [
[
"",
"/Users/yic/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar"
]
],
"dependencies": []
},
{
"coord": "org.xerial.snappy:snappy-java:1.1.1.3",
"files": [
[
"",
"/Users/yic/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/xerial/snappy/snappy-java/1.1.1.3/snappy-java-1.1.1.3.jar"
]
],
"dependencies": []
}
]
}
```
2017-12-26 10:46:35 -08:00
Yi Cheng
1296459de3
Add Pants build tool ( #709 )
2017-12-11 17:50:04 +01:00
Alexandre Archambault
db3679dce4
Factor default max # of iterations
2017-07-19 02:07:15 +02:00
Alexandre Archambault
7d69815f64
Allow to generate native bootstraps
2017-07-08 14:32:16 +02:00
Alexandre Archambault
fd8272fdd4
Add stub to make proguard happy on 2.12 CI
2017-06-17 18:08:14 +02:00
Alexandre Archambault
310364ed93
Don't include optional artifacts by default
...
Except for classifiers artifacts, where they were already assumed to be
optional
2017-06-13 14:24:48 +02:00
Alexandre Archambault
4cdd95b37e
Really close http connections
2017-06-06 18:01:28 +02:00
Alexandre Archambault
f5ef7d8179
Add non-reg tests for Nexus proxies
...
Ensure everything work fine again with those (things went bad at
1.0.0-RC1, because of the use of directory listings, that may not be
exhaustive in proxies - or may be just empty, e.g. currently with nexus 3)
2017-05-31 21:19:27 +02:00
Alexandre Archambault
18be2e2dd2
Add support for binary checksum files
2017-05-30 16:59:46 +02:00
Alexandre Archambault
70906fcc8e
Add sbt-plugin: and typesafe: repo syntaxes
2017-05-18 02:50:20 +02:00
Alexandre Archambault
e76f6170f1
Move typelevel-related things to new extra module
2017-05-12 00:00:14 +02:00