/** * Lookup the mojo leveraging the actual subprojects pom * * @param goal * @param pom * @return a Mojo instance * @throws Exception */ protected Mojo lookupEmptyMojo( String goal, File pom ) throws Exception { File pluginPom = new File( getBasedir(), "pom.xml" ); Xpp3Dom pluginPomDom = Xpp3DomBuilder.build( ReaderFactory.newXmlReader( pluginPom ) ); String artifactId = pluginPomDom.getChild( "artifactId" ).getValue(); String groupId = resolveFromRootThenParent( pluginPomDom, "groupId" ); String version = resolveFromRootThenParent( pluginPomDom, "version" ); return lookupMojo( groupId, artifactId, version, goal, null ); }
/** * Lookup the mojo leveraging the actual subprojects pom * * @param goal * @param pom * @return a Mojo instance * @throws Exception */ protected Mojo lookupMojo( String goal, File pom ) throws Exception { File pluginPom = new File( getBasedir(), "pom.xml" ); Xpp3Dom pluginPomDom = Xpp3DomBuilder.build( ReaderFactory.newXmlReader( pluginPom ) ); String artifactId = pluginPomDom.getChild( "artifactId" ).getValue(); String groupId = resolveFromRootThenParent( pluginPomDom, "groupId" ); String version = resolveFromRootThenParent( pluginPomDom, "version" ); PlexusConfiguration pluginConfiguration = extractPluginConfiguration( artifactId, pom ); return lookupMojo( groupId, artifactId, version, goal, pluginConfiguration ); }
/** * Lookup the mojo leveraging the actual subprojects pom * * @param goal * @param pom * @return a Mojo instance * @throws Exception */ protected Mojo lookupEmptyMojo( String goal, File pom ) throws Exception { File pluginPom = new File( getBasedir(), "pom.xml" ); Xpp3Dom pluginPomDom = Xpp3DomBuilder.build( ReaderFactory.newXmlReader( pluginPom ) ); String artifactId = pluginPomDom.getChild( "artifactId" ).getValue(); String groupId = resolveFromRootThenParent( pluginPomDom, "groupId" ); String version = resolveFromRootThenParent( pluginPomDom, "version" ); return lookupMojo( groupId, artifactId, version, goal, null ); }
/** * Lookup the mojo leveraging the actual subprojects pom * * @param goal * @param pom * @return a Mojo instance * @throws Exception */ protected Mojo lookupMojo( String goal, File pom ) throws Exception { File pluginPom = new File( getBasedir(), "pom.xml" ); Xpp3Dom pluginPomDom = Xpp3DomBuilder.build( ReaderFactory.newXmlReader( pluginPom ) ); String artifactId = pluginPomDom.getChild( "artifactId" ).getValue(); String groupId = resolveFromRootThenParent( pluginPomDom, "groupId" ); String version = resolveFromRootThenParent( pluginPomDom, "version" ); PlexusConfiguration pluginConfiguration = extractPluginConfiguration( artifactId, pom ); return lookupMojo( groupId, artifactId, version, goal, pluginConfiguration ); }