You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by jv...@apache.org on 2002/11/30 18:18:41 UTC
cvs commit: jakarta-turbine-maven/src/java/org/apache/maven/jelly/tags/project MavenTag.java
jvanzyl 2002/11/30 09:18:41
Modified: src/java/org/apache/maven/jelly/tags/project MavenTag.java
Log:
refactoring
Revision Changes Path
1.17 +16 -7 jakarta-turbine-maven/src/java/org/apache/maven/jelly/tags/project/MavenTag.java
Index: MavenTag.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/jelly/tags/project/MavenTag.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- MavenTag.java 24 Nov 2002 23:58:44 -0000 1.16
+++ MavenTag.java 30 Nov 2002 17:18:41 -0000 1.17
@@ -119,8 +119,13 @@
//[ model for embedding maven ]
Maven maven = getMaven( output, MavenUtils.getProject( getDescriptor(), getBasedir() ) );
// How come no verfication of the project?
- maven.runtimeInitialization();
+
+ System.out.println("1");
+
+ maven.initialize();
+ System.out.println("2");
maven.attainGoals();
+ System.out.println("3");
}
catch ( Exception e )
{
@@ -149,21 +154,25 @@
{
Maven parent = (Maven) getContext().getVariable( MavenConstants.MAVEN_OBJECT );
-
// Use the descriptor file to get the base directory.
File basedir = new File( project.getFile().getParent() );
- System.out.println( "basedir: " + basedir );
- System.out.println( "descriptor: " + project.getFile() );
Maven maven = new Maven();
maven.setProject( project );
+ //MavenJellyContext c = MavenUtils.createContext( basedir, parent.getContext() );
+ // I can't seem to do the inherit thing property as i'm picking things up
+ // from the parent project that i don't want when values are not present
+ // in the child. So i need to populate some basic values here.
MavenJellyContext c = MavenUtils.createContext( basedir );
+ c.setXMLOutput( parent.getContext().getXMLOutput() );
+ c.setDebugOn( parent.getContext().getDebugOn() );
+ c.setOnline( parent.getContext().getOnline() );
maven.setContext( c );
- maven.setMavenHome( parent.getMavenHome() );
+
+ /* @todo use the context */
maven.setDir( basedir );
- maven.setXMLOutput( output, parent.isDebug() );
addGoals( maven );