아래 코드로 해결됨.
ArtifactMetadataSource artifactMetadataSource = (ArtifactMetadataSource) embedder
.lookup(ArtifactMetadataSource.ROLE);
System.out.println("retrieve hibernate dependencies.");
ResolutionGroup group = artifactMetadataSource.retrieve(artifact,
localRepository, remoteRepositories);
for (Object o : group.getArtifacts()) {
Artifact a = (Artifact)o;
System.out.println(a.getGroupId() + " " + a.getArtifactId() + " " + a.getBaseVersion() );
}
retrieve hibernate dependencies.
net.sf.ehcache ehcache 1.2.3
swarmcache swarmcache 1.0RC2
jboss jboss-cache 1.2.2
jgroups jgroups-all 2.2.8
javax.transaction jta 1.0.1B
commons-logging commons-logging 1.0.4
c3p0 c3p0 0.9.1
asm asm-attrs 1.5.3
javax.security jacc 1.0
dom4j dom4j 1.6.1
antlr antlr 2.7.6
cglib cglib 2.1_3
opensymphony oscache 2.1
asm asm 1.5.3
commons-collections commons-collections 2.1.1
proxool proxool 0.8.3
ArtifactMetadataSource artifactMetadataSource = (ArtifactMetadataSource) embedder
.lookup(ArtifactMetadataSource.ROLE);
System.out.println("retrieve hibernate dependencies.");
ResolutionGroup group = artifactMetadataSource.retrieve(artifact,
localRepository, remoteRepositories);
for (Object o : group.getArtifacts()) {
Artifact a = (Artifact)o;
System.out.println(a.getGroupId() + " " + a.getArtifactId() + " " + a.getBaseVersion() );
}
retrieve hibernate dependencies.
net.sf.ehcache ehcache 1.2.3
swarmcache swarmcache 1.0RC2
jboss jboss-cache 1.2.2
jgroups jgroups-all 2.2.8
javax.transaction jta 1.0.1B
commons-logging commons-logging 1.0.4
c3p0 c3p0 0.9.1
asm asm-attrs 1.5.3
javax.security jacc 1.0
dom4j dom4j 1.6.1
antlr antlr 2.7.6
cglib cglib 2.1_3
opensymphony oscache 2.1
asm asm 1.5.3
commons-collections commons-collections 2.1.1
proxool proxool 0.8.3




덧글