Skip to content
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

Link to Maven coordinates in the maven_jar documentation. #856

Closed
wants to merge 1 commit into from

Conversation

dfabulich
Copy link
Contributor

Maven coordinates can be more sophisticated than we want to document here (alternate packaging/classifiers).

Specifically, I needed to link to json-lib-2.4-jdk15.jar at https://repo1.maven.org/maven2/net/sf/json-lib/json-lib/2.4/json-lib-2.4-jdk15.jar. In Maven, you'd refer to that like this:

<dependency>
  <groupId>net.sf.json-lib</groupId>
  <artifactId>json-lib</artifactId>
  <version>2.4</version>
  <classifier>jdk15</classifier>
</dependency>

It turns out that this works great in Bazel, too, if you use Maven coordinates.

maven_jar (
    name = "net.sf.json-lib_json-lib",
    artifact = "net.sf.json-lib:json-lib:jar:jdk15:2.4",
)

But it took me some effort to find it. Adding this link would have helped me, and will probably help somebody else, too.

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.

Maven coordinates can be more sophisticated than we want to document here (alternate packaging/classifiers).
@googlebot
Copy link

CLAs look good, thanks!

@kchodorow
Copy link
Contributor

LGTM, I'll merge it in. Thanks for the contribution!

bazel-io pushed a commit that referenced this pull request Feb 9, 2016
[Maven coordinates](https://maven.apache.org/pom.html#Maven_Coordinates) can be more sophisticated than we want to document here (alternate packaging/classifiers).

Specifically, I needed to link to `json-lib-2.4-jdk15.jar` at https://repo1.maven.org/maven2/net/sf/json-lib/json-li[].4/json-lib-2.4-jdk15.jar. In Maven, you'd refer to that like this:

```
<dependency>
  <groupId>net.sf.json-lib</groupId>
  <artifactId>json-lib</artifactId>
  <version>2.4</version>
  <classifier>jdk15</classifier>
</dependency>
```

It turns out that this works great in Bazel, too, if you use Maven coordinates.

```
maven_jar (
	name = "net.sf.json-lib_json-lib",
	artifact = "net.sf.json-lib:json-lib:jar:jdk15:2.4",
)
```

But it took me some effort to find it. Adding this link would have helped me, and will probably help somebody else, too.

--
Reviewed-on: #856
MOS_MIGRATED_REVID=114135334
@damienmg
Copy link
Contributor

damienmg commented Feb 9, 2016

This was merged, thanks again for your contribution!

@damienmg damienmg closed this Feb 9, 2016
luca-digrazia pushed a commit to luca-digrazia/DatasetCommitsDiffSearch that referenced this pull request Sep 5, 2022
    [Maven coordinates](https://maven.apache.org/pom.html#Maven_Coordinates) can be more sophisticated than we want to document here (alternate packaging/classifiers).

    Specifically, I needed to link to `json-lib-2.4-jdk15.jar` at https://repo1.maven.org/maven2/net/sf/json-lib/json-li[].4/json-lib-2.4-jdk15.jar. In Maven, you'd refer to that like this:

    ```
    <dependency>
      <groupId>net.sf.json-lib</groupId>
      <artifactId>json-lib</artifactId>
      <version>2.4</version>
      <classifier>jdk15</classifier>
    </dependency>
    ```

    It turns out that this works great in Bazel, too, if you use Maven coordinates.

    ```
    maven_jar (
            name = "net.sf.json-lib_json-lib",
            artifact = "net.sf.json-lib:json-lib:jar:jdk15:2.4",
    )
    ```

    But it took me some effort to find it. Adding this link would have helped me, and will probably help somebody else, too.

    --
    Reviewed-on: bazelbuild/bazel#856
    MOS_MIGRATED_REVID=114135334
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants