Author: carnold
Date: Fri Sep 7 14:13:03 2007
New Revision: 573712
URL: http://svn.apache.org/viewvc?rev=573712&view=rev
Log:
Remove unused IntelliJ code
Removed:
maven/sandbox/trunk/plugins/maven-xcode-plugin/src/main/java/org/apache/maven/plugin/xcode/Library.java
maven/sandbox/trunk/plugins/maven-xcode-plugin/src/main/java/org/apache/maven/plugin/xcode/XcodeModuleMojo.java
maven/sandbox/trunk/plugins/maven-xcode-plugin/src/main/java/org/apache/maven/plugin/xcode/XcodeProjectMojo.java
maven/sandbox/trunk/plugins/maven-xcode-plugin/src/main/java/org/apache/maven/plugin/xcode/XcodeWorkspaceMojo.java
maven/sandbox/trunk/plugins/maven-xcode-plugin/src/main/java/org/apache/maven/plugin/xcode/XcodeXmlWriter.java
maven/sandbox/trunk/plugins/maven-xcode-plugin/src/test/java/org/apache/maven/plugin/xcode/LibraryTest.java
maven/sandbox/trunk/plugins/maven-xcode-plugin/src/test/java/org/apache/maven/plugin/xcode/XcodeModuleTest.java
maven/sandbox/trunk/plugins/maven-xcode-plugin/src/test/java/org/apache/maven/plugin/xcode/XcodeProjectTest.java
maven/sandbox/trunk/plugins/maven-xcode-plugin/src/test/java/org/apache/maven/plugin/xcode/XcodeWorkspaceTest.java
maven/sandbox/trunk/plugins/maven-xcode-plugin/src/test/module-plugin-configs/
maven/sandbox/trunk/plugins/maven-xcode-plugin/src/test/project-plugin-configs/
maven/sandbox/trunk/plugins/maven-xcode-plugin/src/test/remote-repo/
maven/sandbox/trunk/plugins/maven-xcode-plugin/src/test/workspace-plugin-configs/
Modified:
maven/sandbox/trunk/plugins/maven-xcode-plugin/STATUS
maven/sandbox/trunk/plugins/maven-xcode-plugin/src/main/java/org/apache/maven/plugin/xcode/AbstractXcodeMojo.java
maven/sandbox/trunk/plugins/maven-xcode-plugin/src/main/java/org/apache/maven/plugin/xcode/XcodeMojo.java
Modified: maven/sandbox/trunk/plugins/maven-xcode-plugin/STATUS
URL:
http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-xcode-plugin/STATUS?rev=573712&r1=573711&r2=573712&view=diff
==============================================================================
--- maven/sandbox/trunk/plugins/maven-xcode-plugin/STATUS (original)
+++ maven/sandbox/trunk/plugins/maven-xcode-plugin/STATUS Fri Sep 7 14:13:03
2007
@@ -14,7 +14,7 @@
The xcode:xcode mojo will create (if necessary) your-project.xcodeproj
and your-project.xcodeproj/project.pbxproj. The mojo will write
-the .pbxproj file in the XML Serialization of PropertyList, XCode 2.4.1
+the .pbxproj file in the XML Property List Serialization, XCode 2.4.1
will immediately rewrite the file in the old-style serialization.
The following issues are known to exist:
@@ -37,7 +37,7 @@
Manifests are not incorporated into the generated jars.
Really kludgy code is used to determine the absolute path
-for the dependencies. I don't know Maven internals enough
+for the dependencies. I don't know Maven internals
to do any better.
XCode apparently has JUnit integration, but I've never seen
@@ -47,10 +47,12 @@
Multiple source code or resource trees are not supported, or at
least not tested.
-Remove lots of stray IntelliJ code is still present.
-
Test with XCode 3.0. I can't do that until Leopard is released,
but maybe others have access.
+
+Source Code Repository integration.
+
+Web, EAR, EJB modules.
Curt Arnold
Modified:
maven/sandbox/trunk/plugins/maven-xcode-plugin/src/main/java/org/apache/maven/plugin/xcode/AbstractXcodeMojo.java
URL:
http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-xcode-plugin/src/main/java/org/apache/maven/plugin/xcode/AbstractXcodeMojo.java?rev=573712&r1=573711&r2=573712&view=diff
==============================================================================
---
maven/sandbox/trunk/plugins/maven-xcode-plugin/src/main/java/org/apache/maven/plugin/xcode/AbstractXcodeMojo.java
(original)
+++
maven/sandbox/trunk/plugins/maven-xcode-plugin/src/main/java/org/apache/maven/plugin/xcode/AbstractXcodeMojo.java
Fri Sep 7 14:13:03 2007
@@ -125,82 +125,6 @@
this.overwrite = overwrite;
}
- protected Document readXmlDocument( File file, String altFilename )
- throws DocumentException
- {
- SAXReader reader = new SAXReader();
- if ( file.exists() && !overwrite )
- {
- return reader.read( file );
- }
- else
- {
- File altFile = new File( executedProject.getBasedir(),
"src/main/idea/" + altFilename );
- if ( altFile.exists() )
- {
- return reader.read( altFile );
- }
- else
- {
- return reader.read( getClass().getResourceAsStream(
"/templates/default/" + altFilename ) );
- }
- }
- }
-
- protected void writeXmlDocument( File file, Document document )
- throws IOException
- {
- XMLWriter writer = new XcodeXmlWriter( file );
- writer.write( document );
- writer.close();
- }
-
- /**
- * Finds element from the module element.
- *
- * @param module Xpp3Dom element
- * @param name Name attribute to find
- * @return component Returns the Xpp3Dom element found.
- */
- protected Element findComponent( Element module, String name )
- {
- return findElement( module, "component", name );
- }
-
- protected Element findElement( Element element, String elementName, String
attributeName )
- {
- for ( Iterator children = element.elementIterator( elementName );
children.hasNext(); )
- {
- Element child = (Element) children.next();
- if ( attributeName.equals( child.attributeValue( "name" ) ) )
- {
- return child;
- }
- }
- return createElement( element, elementName ).addAttribute( "name",
attributeName );
- }
-
- protected Element findElement( Element component, String name )
- {
- Element element = component.element( name );
- if ( element == null )
- {
- element = createElement( component, name );
- }
- return element;
- }
-
- /**
- * Creates an Xpp3Dom element.
- *
- * @param module Xpp3Dom element
- * @param name Name of the element
- * @return component Xpp3Dom element
- */
- protected Element createElement( Element module, String name )
- {
- return module.addElement( name );
- }
/**
* Translate the absolutePath into its relative path.
@@ -257,23 +181,6 @@
return absolutePath;
}
- /**
- * Remove elements from content (Xpp3Dom).
- *
- * @param content Xpp3Dom element
- * @param name Name of the element to be removed
- */
- protected void removeOldElements( Element content, String name )
- {
- for ( Iterator children = content.elementIterator();
children.hasNext(); )
- {
- Element child = (Element) children.next();
- if ( name.equals( child.getName() ) )
- {
- content.remove( child );
- }
- }
- }
protected void doDependencyResolution( MavenProject project,
ArtifactRepository localRepo )
throws InvalidDependencyVersionException, ProjectBuildingException,
InvalidVersionSpecificationException
@@ -321,25 +228,6 @@
}
}
- /*
- * @todo we need a more permanent feature that does this properly
- */
- protected String getPluginSetting( String artifactId, String optionName,
String defaultValue )
- {
- for ( Iterator it = executedProject.getBuildPlugins().iterator();
it.hasNext(); )
- {
- Plugin plugin = (Plugin) it.next();
- if ( plugin.getArtifactId().equals( artifactId ) )
- {
- Xpp3Dom o = (Xpp3Dom) plugin.getConfiguration();
- if ( o != null && o.getChild( optionName ) != null )
- {
- return o.getChild( optionName ).getValue();
- }
- }
- }
- return defaultValue;
- }
private Set getProjectArtifacts()
throws InvalidVersionSpecificationException
Modified:
maven/sandbox/trunk/plugins/maven-xcode-plugin/src/main/java/org/apache/maven/plugin/xcode/XcodeMojo.java
URL:
http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-xcode-plugin/src/main/java/org/apache/maven/plugin/xcode/XcodeMojo.java?rev=573712&r1=573711&r2=573712&view=diff
==============================================================================
---
maven/sandbox/trunk/plugins/maven-xcode-plugin/src/main/java/org/apache/maven/plugin/xcode/XcodeMojo.java
(original)
+++
maven/sandbox/trunk/plugins/maven-xcode-plugin/src/main/java/org/apache/maven/plugin/xcode/XcodeMojo.java
Fri Sep 7 14:13:03 2007
@@ -546,6 +546,16 @@
}
+ /**
+ * Create PBXTool target (aka product jar or test classes).
+ * @param buildConfigurationList configurations.
+ * @param buildPhases build phases.
+ * @param dependencies dependencies.
+ * @param name name.
+ * @param productInstallPath product install path.
+ * @param productName product name.
+ * @return tool target.
+ */
private static PBXObjectRef createPBXToolTarget(
final PBXObjectRef buildConfigurationList,
final List buildPhases,
@@ -569,6 +579,15 @@
return new PBXObjectRef(map);
}
+ /**
+ * Create PBXContainerItemProxy. Appears to let
+ * the test target refer to the output of the main target.
+ * @param project project.
+ * @param proxyType proxy type.
+ * @param target target.
+ * @param targetName target name.
+ * @return proxy.
+ */
private static PBXObjectRef createPBXContainerItemProxy(
final PBXObjectRef project,
final String proxyType,
@@ -584,6 +603,12 @@
return new PBXObjectRef(map);
}
+ /**
+ * Creates a PBXTargetDependency.
+ * @param target target.
+ * @param targetProxy proxy for target.
+ * @return target dependency.
+ */
private static PBXObjectRef createPBXTargetDependency(
final PBXObjectRef target,
final PBXObjectRef targetProxy) {
@@ -709,56 +734,6 @@
}
- public PBXObjectRef addProjectConfigurationList(final Map objects,
- final Map debugSettings,
- final Map releaseSettings)
{
- //
- // Create a configuration list with
- // two stock configurations: Debug and Release
- //
- List configurations = new ArrayList();
- PBXObjectRef debugConfig = createXCBuildConfiguration("Debug",
debugSettings);
- objects.put(debugConfig.getID(), debugConfig.getProperties());
- configurations.add(debugConfig);
-
- PBXObjectRef releaseConfig =
- createXCBuildConfiguration("Release", releaseSettings);
- objects.put(releaseConfig.getID(), releaseConfig.getProperties());
- configurations.add(releaseConfig);
- PBXObjectRef configurationList =
createXCConfigurationList(configurations);
- Map projectConfigurationListProperties =
configurationList.getProperties();
-
projectConfigurationListProperties.put("defaultConfigurationIsVisible", "0");
- projectConfigurationListProperties.put("defaultConfigurationName",
"Debug");
- objects.put(configurationList.getID(),
configurationList.getProperties());
-
- return configurationList;
-
- }
-
- /**
- * @param propertyList
- * @TODO
- */
- private static final void addWebModule(final Map propertyList) {
-
- }
-
- /**
- * @param propertyList
- * @TODO
- */
- private static final void addEarModule(final Map propertyList) {
-
- }
-
- /**
- * @param propertyList
- * @TODO
- */
- private static final void addEjbModule(final Map propertyList) {
-
- }
-
/**
* Create PBXProject.
*
@@ -797,27 +772,6 @@
return new PBXObjectRef(map);
}
-
- private PBXObjectRef addPBXGroup(final Map objects,
- final PBXObjectRef rootGroup,
- final Map groups,
- final String sourceTree,
- final File directory) {
- PBXObjectRef group = (PBXObjectRef) groups.get(directory.getPath());
- if (group == null) {
- File parentDir = directory.getParentFile();
- PBXObjectRef parentGroup = rootGroup;
- if (parentDir != null) {
- parentGroup = addPBXGroup(objects, rootGroup, groups,
sourceTree, parentDir);
- }
- group = createPBXGroup(directory.getName(), sourceTree, new
ArrayList());
- List children = (List) parentGroup.getProperties().get("children");
- children.add(group.getID());
- groups.put(directory.getPath(), group);
- objects.put(group.getID(), group.getProperties());
- }
- return group;
- }
/**
* Create PBXFileReference.