Publish Artifact with <scope>test</scope>

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Publish Artifact with <scope>test</scope>

Mohamed Ennahdi El Idrissi
Dear all,

What should I mention in pom.xml to make my dependency published with
<scope>test</scope>?
https://stackoverflow.com/questions/59360773/publish-artifact-with-scopetest-scope

--
Merci,
Mohamed ENNAHDI EL IDRISSI

Oracle Certified Professional, Java SE 6 Programmer
<https://www.youracclaim.com/badges/dd563cd0-d35f-458c-bc0a-dac60362416e/public_url>
Reply | Threaded
Open this post in threaded view
|

Re: Publish Artifact with <scope>test</scope>

Anders Hammar
You never specify the scope of an artifact when you publish it. When
someone declares a dependency to your artifact, they can specify the scope
for that dependency (e.g. "test").

/Anders

On Mon, Dec 16, 2019 at 7:01 PM Mohamed Ennahdi El Idrissi <
[hidden email]> wrote:

> Dear all,
>
> What should I mention in pom.xml to make my dependency published with
> <scope>test</scope>?
>
> https://stackoverflow.com/questions/59360773/publish-artifact-with-scopetest-scope
>
> --
> Merci,
> Mohamed ENNAHDI EL IDRISSI
>
> Oracle Certified Professional, Java SE 6 Programmer
> <
> https://www.youracclaim.com/badges/dd563cd0-d35f-458c-bc0a-dac60362416e/public_url
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Publish Artifact with <scope>test</scope>

Paul Hammant
Following what Anders said: This is because some folks may use your
intended testing tech in a production capacity.

I co-created Selenium (a functional testing tool), and plenty of people use
it from scraping live websites/webapps for various good (also nefarious)
reasions. Specifically: not for testing at all.