jvanzyl 2002/11/12 08:41:01
Modified: src/java/org/apache/maven MavenUtils.java
src/java/org/apache/maven/app RepoConfigException.java
UnknownGoalException.java
src/java/org/apache/maven/project BaseObject.java
Removed: src/java/org/apache/maven/project Profile.java
Workspace.java
Log:
o Removing workspace and profile notions from Maven proper. We'll leave
that to wrapping applications like Continuum and the like.
Revision Changes Path
1.56 +1 -98 jakarta-turbine-maven/src/java/org/apache/maven/MavenUtils.java
Index: MavenUtils.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/MavenUtils.java,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- MavenUtils.java 12 Nov 2002 04:04:36 -0000 1.55
+++ MavenUtils.java 12 Nov 2002 16:41:00 -0000 1.56
@@ -86,8 +86,6 @@
import org.apache.maven.app.MavenJellyContext;
import org.apache.maven.project.Project;
-import org.apache.maven.project.Profile;
-import org.apache.maven.project.Workspace;
import org.apache.tools.ant.DirectoryScanner;
import org.apache.maven.util.StringInputStream;
@@ -435,101 +433,6 @@
{
return false;
}
- }
-
- /**
- * Create a Profile object given a file descriptor.
- *
- * @param profileDescriptor A reactor profile
- * @return the Maven profile object for the given profile descriptor
- * @throws Exception when any errors occur
- */
- public static Profile getProfile(String profileDescriptor)
- throws Exception
- {
- return getProfile(new File(profileDescriptor));
- }
-
- /**
- * Create a Profile object given a file descriptor.
- *
- * @param profileDescriptor a maven profile descriptor
- * @return the Maven profile object for the given profile descriptor
- * @throws Exception when any errors occur
- */
- public static Profile getProfile(File profileDescriptor)
- throws Exception
- {
- BeanReader reader = createBeanReader(Profile.class);
- Profile profile = (Profile) reader.parse(
- new FileInputStream(profileDescriptor));
-
- return profile;
- }
-
- /**
- * Create a Workspace object given a workspace and profile descriptor.
- *
- * @param workspaceDescriptor the file name of a maven workspace descriptor
- * @param profileDescriptor the file name of a maven project descriptor
- * @param mavenLocalRepo a local maven repository
- * @return a maven {@link Workspace} specifed by the given descriptors
- * @throws Exception when any error occurs
- */
- public static Workspace getWorkspace(String workspaceDescriptor,
- String profileDescriptor,
- String mavenLocalRepo)
- throws Exception
- {
- return getWorkspace(new File(workspaceDescriptor),
- new File(profileDescriptor),
- new File(mavenLocalRepo));
- }
-
- /**
- * Create a <code>{@link Workspace}</code> object given a workspace
- * descriptor, a project descriptor and a local repository.
- *
- * @param workspaceDescriptor the xml file describing the workspace
- * @param profileDescriptor the xml file describing the projects to build
- * @param mavenLocalRepo the local maven repository
- * @return a {@link Workspace} object ready for building
- * @throws Exception when an error occurs
- */
- public static Workspace getWorkspace(File workspaceDescriptor,
- File profileDescriptor,
- File mavenLocalRepo)
- throws Exception
- {
- // Create our workspace.
- BeanReader workspaceReader = createBeanReader(Workspace.class);
- Workspace workspace = (Workspace) workspaceReader.parse(
- new FileInputStream(workspaceDescriptor));
-
- // Create our profile.
- Profile profile = getProfile(profileDescriptor);
-
- // Set the workspace profile.
- workspace.setProfile(profile);
-
- // Create our set of project.
- for (Iterator i = profile.getProjectIds().iterator(); i.hasNext();)
- {
- String projectId = (String) i.next();
- // This should take care of any trailing slashes, or the directory
- // formatted in any arbitrary fashion. I don't want to expect a
- // particular format because people do everything different.
- File baseDir = new File(new File(mavenLocalRepo, "project"),
- projectId);
- File projectDescriptor = new File(baseDir, "project.xml");
-
- // Map the project descriptors and add them to the profile.
- Project project = getProject(projectDescriptor);
-
- profile.addProject(project);
- }
-
- return workspace;
}
/**
1.6 +3 -2
jakarta-turbine-maven/src/java/org/apache/maven/app/RepoConfigException.java
Index: RepoConfigException.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/app/RepoConfigException.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- RepoConfigException.java 30 Sep 2002 01:56:10 -0000 1.5
+++ RepoConfigException.java 12 Nov 2002 16:41:01 -0000 1.6
@@ -63,7 +63,8 @@
* @author <a href="mailto:bob@;eng.werken.com">bob mcwhirter</a>
* @version $Id$
*/
-public class RepoConfigException extends MavenException
+public class RepoConfigException
+ extends MavenException
{
/**
* Constructs a RepoConfigException with the specified detail message.
1.4 +5 -2
jakarta-turbine-maven/src/java/org/apache/maven/app/UnknownGoalException.java
Index: UnknownGoalException.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/app/UnknownGoalException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- UnknownGoalException.java 30 Sep 2002 01:56:10 -0000 1.3
+++ UnknownGoalException.java 12 Nov 2002 16:41:01 -0000 1.4
@@ -56,12 +56,15 @@
* ====================================================================
*/
+import org.apache.maven.MavenException;
+
/** Indicates an attempt to access an unknown werkz goal.
*
* @author <a href="mailto:bob@;eng.werken.com">bob mcwhirter</a>
* @version $Id$
*/
-public class UnknownGoalException extends Exception
+public class UnknownGoalException
+ extends MavenException
{
/** Name of unknown goal. */
private String goalName;
1.17 +1 -2
jakarta-turbine-maven/src/java/org/apache/maven/project/BaseObject.java
Index: BaseObject.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/project/BaseObject.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- BaseObject.java 25 Aug 2002 15:04:39 -0000 1.16
+++ BaseObject.java 12 Nov 2002 16:41:01 -0000 1.17
@@ -294,5 +294,4 @@
return super.hashCode();
}
}
-
}
--
To unsubscribe, e-mail: <mailto:turbine-maven-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-maven-dev-help@;jakarta.apache.org>