If you do mvn dependency:tree
you'll see that org.osgl:osgl-storage:jar:0.3-SNAPSHOT is bringing org.osgl:osgl-tool:jar:0.3-SNAPSHOT as a dependency too, which will conflict with you own version of this same artifact.
[INFO] org.osgl:osgl-tool:jar:0.4.1-SNAPSHOT
[INFO] +- junit:junit:jar:4.10:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.1:test
[INFO] +- commons-codec:commons-codec:jar:1.8:compile
[INFO] +- com.carrotsearch:junit-benchmarks:jar:0.7.2:test
[INFO] \- org.osgl:osgl-storage:jar:0.3-SNAPSHOT:provided
[INFO] +- org.osgl:osgl-tool:jar:0.3-SNAPSHOT:provided
[INFO] \- org.osgl:osgl-logging:jar:0.2:provided
All you need to do is tell Maven to exclude this transitive dependency:
<dependency>
<groupId>org.osgl</groupId>
<artifactId>osgl-storage</artifactId>
<version>0.3-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.osgl</groupId>
<artifactId>osgl-tool</artifactId>
</exclusion>
</exclusions>
</dependency>
What happened is you had two versions of the same artifact together (your 0.4.1-SNAPSHOT and the other 0.3-SNAPSHOT version). The solution above excludes the 0.3-SNAPSHOT version brought transitively by org.osgl:osgl-storage:jar:0.3-SNAPSHOT.
You also created a cyclic dependency by making your org.osgl:osgl-tool depend on org.osgl:osgl-storage, since org.osgl:osgl-storage originally depends on org.osgl:osgl-tool.
org.osgl:osgl-storage <──┐ ... you added this dependency
│ │
└──> org.osgl:osgl-tool
Your org.osgl.util.IO
class is the one that depends on org.osgl.storage.ISObject
and org.osgl.storage.impl.SObject
. You should avoid cyclic dependencies if you don't want further issues.
EDIT: Regarding the _
class, it has a valid name. But if such name is being used to avoid repeating a long class name, like in your example:
void foo(_.Func2<Integer, String> f) {
F2<Integer, String> newF = _.f2(f);
...
}
then you should consider renaming the class and using static imports:
import static org.osgl.Osgl.*; // Osgl instead of _
void foo(Func2<Integer, String> f) { // Func2 statically imported
F2<Integer, String> newF = f2(f); // f2 statically imported
...
}