0

I have a dependency that sometimes cannot be resolved (don't get to it... it is ok)

<dependency>
<groupId>com.g.g</groupId>
<artifactId>art123</artifactId> 
<version>1</version>
<type>rar</type>  
<scope>system</scope
    <systemPath>some location</systemPath>
</dependency>

when I clean install the entire project I get warning for this dependency (when it cannot be resolved). Is there any way to turn off this warning? I tried to add

<optional>true</oprional>

to the dependency but still got the warnings.

user1116377
  • 629
  • 3
  • 15
  • 31

2 Answers2

1

I think that you have misunderstood how optional dependencies work.

To solve your problem, I suggest that you create two profiles with different dependencies (see also https://stackoverflow.com/a/167284/303598).

Community
  • 1
  • 1
matsev
  • 32,104
  • 16
  • 121
  • 156
0

You should never use system-scoped dependencies. Put this dependency into a repository manager and change your dependency to a usual dependency. I recommend really to use a repository manager (alphabetical order: archiva, artifactory, nexus).

khmarbaise
  • 92,914
  • 28
  • 189
  • 235