private void testKieModuleMetaDataInMemoryUsingPOM( boolean useTypeDeclaration ) throws Exception {
//Build a KieModule jar, deploy it into local Maven repository
KieServices ks = KieServices.Factory.get();
ReleaseId dependency = ks.newReleaseId( "org.drools", "drools-core", "5.5.0.Final" );
ReleaseId releaseId = ks.newReleaseId( "org.kie", "metadata-test", "1.0-SNAPSHOT" );
InternalKieModule kieModule = createKieJarWithClass( ks, releaseId, useTypeDeclaration, 2, 7, dependency );
String pomText = getPom( dependency );
File pomFile = new File( System.getProperty( "java.io.tmpdir" ), MavenRepository.toFileName( releaseId, null ) + ".pom" );
try {
FileOutputStream fos = new FileOutputStream( pomFile );