You are viewing a plain text version of this content. The canonical link for it is here.
Posted to easyant-commits@incubator.apache.org by hi...@apache.org on 2011/02/22 14:53:52 UTC
svn commit: r1073354 [1/2] - in /incubator/easyant/tasks/trunk:
mavenivy-adapters/ mavenivy-adapters/src/main/java/org/apache/easyant/ivy/
mavenivy-adapters/src/main/java/org/apache/easyant/tasks/
mavenivy-adapters/src/main/java/org/apache/easyant/task...
Author: hibou
Date: Tue Feb 22 14:53:51 2011
New Revision: 1073354
URL: http://svn.apache.org/viewvc?rev=1073354&view=rev
Log:
4 spaces in place of tabulations
Modified:
incubator/easyant/tasks/trunk/mavenivy-adapters/module.ivy
incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/ivy/MavenPublishTrigger.java
incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/ivy/PublishedArtifact.java
incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/RegisterTrigger.java
incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/AbstractMavenIvyAdapter.java
incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/DependencyAdapter.java
incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/Deploy.java
incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/InfoAdapter.java
incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/ScopeMappings.java
incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/TypeMappings.java
incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/resources/org/apache/easyant/tasks/adapters/antlib.xml
incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/java/org/apache/easyant/tasks/adapters/DependencyAdapterTest.java
incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/java/org/apache/easyant/tasks/adapters/InfoAdapterTest.java
incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/resources/org/apache/easyant/tasks/adapters/DependencyAdapter/build.xml
incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/resources/org/apache/easyant/tasks/adapters/DependencyAdapter/ivy.xml
incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/resources/org/apache/easyant/tasks/adapters/InfoAdapter/build.xml
incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/resources/org/apache/easyant/tasks/adapters/InfoAdapter/ivy.xml
incubator/easyant/tasks/trunk/partial-jnlp-ant-task/module.ivy
incubator/easyant/tasks/trunk/partial-jnlp-ant-task/src/main/java/org/apache/easyant/tasks/JNLPTask.java
incubator/easyant/tasks/trunk/partial-jnlp-ant-task/src/main/resources/org/apache/easyant/antlib.xml
incubator/easyant/tasks/trunk/xooki-menu-generator/trunk/module.ivy
incubator/easyant/tasks/trunk/xooki-menu-generator/trunk/src/main/java/org/apache/easyant/menu/XookiMenuGenerator.java
incubator/easyant/tasks/trunk/xooki-menu-generator/trunk/src/test/resources/org/apache/easyant/menu/testEmptyMenu.json
incubator/easyant/tasks/trunk/xooki-menu-generator/trunk/src/test/resources/org/apache/easyant/menu/testMenuLifecycle.json
incubator/easyant/tasks/trunk/xooki-menu-generator/trunk/src/test/resources/org/apache/easyant/menu/testMultipleEntries.json
incubator/easyant/tasks/trunk/xooki-menu-generator/trunk/src/test/resources/org/apache/easyant/menu/testSubMenu.json
Modified: incubator/easyant/tasks/trunk/mavenivy-adapters/module.ivy
URL: http://svn.apache.org/viewvc/incubator/easyant/tasks/trunk/mavenivy-adapters/module.ivy?rev=1073354&r1=1073353&r2=1073354&view=diff
==============================================================================
--- incubator/easyant/tasks/trunk/mavenivy-adapters/module.ivy (original)
+++ incubator/easyant/tasks/trunk/mavenivy-adapters/module.ivy Tue Feb 22 14:53:51 2011
@@ -15,28 +15,28 @@
limitations under the License.
-->
<ivy-module version="2.0" xmlns:ea="http://www.easyant.org">
- <info organisation="org.apache.easyant.tasks" module="mavenivy-adapters"
- status="integration" revision="0.1">
- <ea:build module="build-std-java" revision="0.2">
- <ea:property name="project.ivy.instance" value="easyant.ivy.instance"/>
- <ea:property name="release.resolver" value="easyant-shared-modules"/>
- <ea:property name="shared.resolver" value="easyant-shared-modules"/>
- <ea:property name="local.resolver" value="easyant-shared-modules"/>
- </ea:build>
- </info>
- <configurations>
- <conf name="default" visibility="public" description="runtime dependencies artifact can be used with this conf"/>
- <conf name="test" visibility="private" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases."/>
- <conf name="provided" visibility="public" description="this is much like compile, but indicates you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive."/>
+ <info organisation="org.apache.easyant.tasks" module="mavenivy-adapters"
+ status="integration" revision="0.1">
+ <ea:build module="build-std-java" revision="0.2">
+ <ea:property name="project.ivy.instance" value="easyant.ivy.instance"/>
+ <ea:property name="release.resolver" value="easyant-shared-modules"/>
+ <ea:property name="shared.resolver" value="easyant-shared-modules"/>
+ <ea:property name="local.resolver" value="easyant-shared-modules"/>
+ </ea:build>
+ </info>
+ <configurations>
+ <conf name="default" visibility="public" description="runtime dependencies artifact can be used with this conf"/>
+ <conf name="test" visibility="private" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases."/>
+ <conf name="provided" visibility="public" description="this is much like compile, but indicates you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive."/>
- </configurations>
- <dependencies>
- <dependency org="org.apache.maven" name="maven-ant-tasks" rev="2.1.0" conf="default->default">
- <exclude org="ant" module="ant"/>
- </dependency>
- <dependency org="org.apache.ivy" name="ivy" rev="2.1.0" conf="provided->default"/>
- <dependency org="junit" name="junit" rev="4.4" conf="test->default"/>
- <dependency org="org.apache.ant" name="ant" rev="1.8.1" conf="provided->default"/>
- <dependency org="org.apache.ant" name="ant-testutil" rev="1.8.1" conf="test->default" transitive="false" />
- </dependencies>
+ </configurations>
+ <dependencies>
+ <dependency org="org.apache.maven" name="maven-ant-tasks" rev="2.1.0" conf="default->default">
+ <exclude org="ant" module="ant"/>
+ </dependency>
+ <dependency org="org.apache.ivy" name="ivy" rev="2.1.0" conf="provided->default"/>
+ <dependency org="junit" name="junit" rev="4.4" conf="test->default"/>
+ <dependency org="org.apache.ant" name="ant" rev="1.8.1" conf="provided->default"/>
+ <dependency org="org.apache.ant" name="ant-testutil" rev="1.8.1" conf="test->default" transitive="false" />
+ </dependencies>
</ivy-module>
Modified: incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/ivy/MavenPublishTrigger.java
URL: http://svn.apache.org/viewvc/incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/ivy/MavenPublishTrigger.java?rev=1073354&r1=1073353&r2=1073354&view=diff
==============================================================================
--- incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/ivy/MavenPublishTrigger.java (original)
+++ incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/ivy/MavenPublishTrigger.java Tue Feb 22 14:53:51 2011
@@ -33,84 +33,84 @@ import org.apache.ivy.plugins.trigger.Tr
import org.apache.tools.ant.Project;
public class MavenPublishTrigger extends AbstractTrigger implements Trigger {
-
- public static final String MAVEN_PUBLISH_TRIGGER_REFERENCE ="maven.publish.trigger.ref";
- private List<PublishedArtifact> publishedArtifacts = new ArrayList<PublishedArtifact>();
- private String publishUrl = null;
-
- public MavenPublishTrigger() {
- super();
- }
-
- @Override
- public void progress(IvyEvent event) {
-
- Project project = (Project) IvyContext
- .peekInContextStack(IvyTask.ANT_PROJECT_CONTEXT_KEY);
- if (project == null) {
- return;
- }
- if (project.getReference(MAVEN_PUBLISH_TRIGGER_REFERENCE) == null) {
- project.addReference(MAVEN_PUBLISH_TRIGGER_REFERENCE, this);
- }
-
- Map attributes = event.getAttributes();
- String artifact = (String) attributes.get("artifact");
- String artifactFile = (String) attributes.get("file");
- String type = (String) attributes.get("type");
- String ext = (String) attributes.get("ext");
- String resolver = (String) attributes.get("resolver");
-
- PublishedArtifact publishedArtifact = new PublishedArtifact();
- publishedArtifact.setArtifact(artifact);
- publishedArtifact.setExt(ext);
- publishedArtifact.setFile(artifactFile);
- publishedArtifact.setType(type);
-
- publishedArtifacts.add(publishedArtifact);
-
- extractDeployUrl(resolver);
-
- }
-
- /**
- * @param resolver
- */
- protected void extractDeployUrl(String resolver) {
- //try to get publish url if the Resolver used to publish was a IBiblioResolver
- if (publishUrl == null) {
- DependencyResolver dependencyResolver = IvyContext.getContext()
- .getSettings().getResolver(resolver);
- if (dependencyResolver instanceof IBiblioResolver) {
- IBiblioResolver ibiblioResolver = (IBiblioResolver) dependencyResolver;
- publishUrl = ibiblioResolver.getRoot();
- } else if (dependencyResolver instanceof URLResolver) {
- URLResolver urlResolver = (URLResolver) dependencyResolver;
- //get the whole pattern
- publishUrl = (String) urlResolver.getArtifactPatterns().get(0);
- //only keep the token root
- publishUrl = IvyPatternHelper.getTokenRoot(publishUrl);
-
- }
- }
- }
-
- public List<PublishedArtifact> getPublishedArtifacts() {
- return publishedArtifacts;
- }
-
- public void setPublishedArtifacts(List<PublishedArtifact> publishedArtifacts) {
- this.publishedArtifacts = publishedArtifacts;
- }
-
- public String getPublishUrl() {
- return publishUrl;
- }
-
- public void setPublishUrl(String publishUrl) {
- this.publishUrl = publishUrl;
- }
-
-
+
+ public static final String MAVEN_PUBLISH_TRIGGER_REFERENCE ="maven.publish.trigger.ref";
+ private List<PublishedArtifact> publishedArtifacts = new ArrayList<PublishedArtifact>();
+ private String publishUrl = null;
+
+ public MavenPublishTrigger() {
+ super();
+ }
+
+ @Override
+ public void progress(IvyEvent event) {
+
+ Project project = (Project) IvyContext
+ .peekInContextStack(IvyTask.ANT_PROJECT_CONTEXT_KEY);
+ if (project == null) {
+ return;
+ }
+ if (project.getReference(MAVEN_PUBLISH_TRIGGER_REFERENCE) == null) {
+ project.addReference(MAVEN_PUBLISH_TRIGGER_REFERENCE, this);
+ }
+
+ Map attributes = event.getAttributes();
+ String artifact = (String) attributes.get("artifact");
+ String artifactFile = (String) attributes.get("file");
+ String type = (String) attributes.get("type");
+ String ext = (String) attributes.get("ext");
+ String resolver = (String) attributes.get("resolver");
+
+ PublishedArtifact publishedArtifact = new PublishedArtifact();
+ publishedArtifact.setArtifact(artifact);
+ publishedArtifact.setExt(ext);
+ publishedArtifact.setFile(artifactFile);
+ publishedArtifact.setType(type);
+
+ publishedArtifacts.add(publishedArtifact);
+
+ extractDeployUrl(resolver);
+
+ }
+
+ /**
+ * @param resolver
+ */
+ protected void extractDeployUrl(String resolver) {
+ //try to get publish url if the Resolver used to publish was a IBiblioResolver
+ if (publishUrl == null) {
+ DependencyResolver dependencyResolver = IvyContext.getContext()
+ .getSettings().getResolver(resolver);
+ if (dependencyResolver instanceof IBiblioResolver) {
+ IBiblioResolver ibiblioResolver = (IBiblioResolver) dependencyResolver;
+ publishUrl = ibiblioResolver.getRoot();
+ } else if (dependencyResolver instanceof URLResolver) {
+ URLResolver urlResolver = (URLResolver) dependencyResolver;
+ //get the whole pattern
+ publishUrl = (String) urlResolver.getArtifactPatterns().get(0);
+ //only keep the token root
+ publishUrl = IvyPatternHelper.getTokenRoot(publishUrl);
+
+ }
+ }
+ }
+
+ public List<PublishedArtifact> getPublishedArtifacts() {
+ return publishedArtifacts;
+ }
+
+ public void setPublishedArtifacts(List<PublishedArtifact> publishedArtifacts) {
+ this.publishedArtifacts = publishedArtifacts;
+ }
+
+ public String getPublishUrl() {
+ return publishUrl;
+ }
+
+ public void setPublishUrl(String publishUrl) {
+ this.publishUrl = publishUrl;
+ }
+
+
}
Modified: incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/ivy/PublishedArtifact.java
URL: http://svn.apache.org/viewvc/incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/ivy/PublishedArtifact.java?rev=1073354&r1=1073353&r2=1073354&view=diff
==============================================================================
--- incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/ivy/PublishedArtifact.java (original)
+++ incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/ivy/PublishedArtifact.java Tue Feb 22 14:53:51 2011
@@ -18,44 +18,44 @@
package org.apache.easyant.ivy;
public class PublishedArtifact {
-
- private String artifact;
- private String type;
- private String ext;
- private String resolver;
- private String file;
-
- public String getArtifact() {
- return artifact;
- }
- public void setArtifact(String artifact) {
- this.artifact = artifact;
- }
- public String getExt() {
- return ext;
- }
- public void setExt(String ext) {
- this.ext = ext;
- }
- public String getResolver() {
- return resolver;
- }
- public void setResolver(String resolver) {
- this.resolver = resolver;
- }
- public String getFile() {
- return file;
- }
- public void setFile(String file) {
- this.file = file;
- }
- public String getType() {
- return type;
- }
- public void setType(String type) {
- this.type = type;
- }
-
-
+
+ private String artifact;
+ private String type;
+ private String ext;
+ private String resolver;
+ private String file;
+
+ public String getArtifact() {
+ return artifact;
+ }
+ public void setArtifact(String artifact) {
+ this.artifact = artifact;
+ }
+ public String getExt() {
+ return ext;
+ }
+ public void setExt(String ext) {
+ this.ext = ext;
+ }
+ public String getResolver() {
+ return resolver;
+ }
+ public void setResolver(String resolver) {
+ this.resolver = resolver;
+ }
+ public String getFile() {
+ return file;
+ }
+ public void setFile(String file) {
+ this.file = file;
+ }
+ public String getType() {
+ return type;
+ }
+ public void setType(String type) {
+ this.type = type;
+ }
+
+
}
Modified: incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/RegisterTrigger.java
URL: http://svn.apache.org/viewvc/incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/RegisterTrigger.java?rev=1073354&r1=1073353&r2=1073354&view=diff
==============================================================================
--- incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/RegisterTrigger.java (original)
+++ incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/RegisterTrigger.java Tue Feb 22 14:53:51 2011
@@ -27,114 +27,114 @@ import org.apache.tools.ant.types.Refere
import org.apache.tools.ant.util.ClasspathUtils;
public class RegisterTrigger extends IvyTask {
- private String event;
- private String eventFilter;
- private String className;
- private Path classpath;
-
- @Override
- public void doExecute() throws BuildException {
-
- Trigger trigger = (Trigger) ClasspathUtils.newInstance(getClassName(),
- getClassLoader(), Trigger.class);
- if (trigger instanceof AbstractTrigger) {
- AbstractTrigger abstractTrigger = (AbstractTrigger) trigger;
- abstractTrigger.setEvent(getEvent());
- getSettings().addTrigger(abstractTrigger);
- getIvyInstance().getEventManager().addIvyListener(trigger, trigger.getEventFilter());
- }
-
- }
-
- public String getEvent() {
- return event;
- }
-
- public void setEvent(String event) {
- this.event = event;
- }
-
-
-
- public String getEventFilter() {
- return eventFilter;
- }
-
- public void setEventFilter(String eventFilter) {
- this.eventFilter = eventFilter;
- }
-
- /**
- * Get the classname to register
- *
- * @return a classname
- */
- public String getClassName() {
- return className;
- }
-
- /**
- * Set the classname to register
- *
- * @param className
- * a classname
- */
- public void setClassName(String className) {
- this.className = className;
- }
-
- protected AntClassLoader getClassLoader() {
- // defining a new specialized classloader and setting it as the thread
- // context classloader
- AntClassLoader loader = null;
- if (classpath != null) {
- loader = new AntClassLoader(this.getClass().getClassLoader(),
- getProject(), classpath, true);
- } else {
- loader = new AntClassLoader(this.getClass().getClassLoader(), true);
- }
- loader.setThreadContextLoader();
- return loader;
- }
-
- /**
- * Get the classpath used to locate the specified classname
- *
- * @return a classpath
- */
- public Path getClasspath() {
- return classpath;
- }
-
- /**
- * The the classpath used to locate the specified classname
- *
- * @param classpath
- */
- public void setClasspath(Path classpath) {
- createClasspath().append(classpath);
- }
-
- /**
- * Classpath to use, by reference, when compiling the rulebase
- *
- * @param a
- * reference to an existing classpath
- */
- public void setClasspathref(Reference r) {
- createClasspath().setRefid(r);
- }
-
- /**
- * Adds a path to the classpath.
- *
- * @return created classpath
- */
- public Path createClasspath() {
- if (this.classpath == null) {
- this.classpath = new Path(getProject());
- }
- return this.classpath.createPath();
- }
+ private String event;
+ private String eventFilter;
+ private String className;
+ private Path classpath;
+
+ @Override
+ public void doExecute() throws BuildException {
+
+ Trigger trigger = (Trigger) ClasspathUtils.newInstance(getClassName(),
+ getClassLoader(), Trigger.class);
+ if (trigger instanceof AbstractTrigger) {
+ AbstractTrigger abstractTrigger = (AbstractTrigger) trigger;
+ abstractTrigger.setEvent(getEvent());
+ getSettings().addTrigger(abstractTrigger);
+ getIvyInstance().getEventManager().addIvyListener(trigger, trigger.getEventFilter());
+ }
+
+ }
+
+ public String getEvent() {
+ return event;
+ }
+
+ public void setEvent(String event) {
+ this.event = event;
+ }
+
+
+
+ public String getEventFilter() {
+ return eventFilter;
+ }
+
+ public void setEventFilter(String eventFilter) {
+ this.eventFilter = eventFilter;
+ }
+
+ /**
+ * Get the classname to register
+ *
+ * @return a classname
+ */
+ public String getClassName() {
+ return className;
+ }
+
+ /**
+ * Set the classname to register
+ *
+ * @param className
+ * a classname
+ */
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+ protected AntClassLoader getClassLoader() {
+ // defining a new specialized classloader and setting it as the thread
+ // context classloader
+ AntClassLoader loader = null;
+ if (classpath != null) {
+ loader = new AntClassLoader(this.getClass().getClassLoader(),
+ getProject(), classpath, true);
+ } else {
+ loader = new AntClassLoader(this.getClass().getClassLoader(), true);
+ }
+ loader.setThreadContextLoader();
+ return loader;
+ }
+
+ /**
+ * Get the classpath used to locate the specified classname
+ *
+ * @return a classpath
+ */
+ public Path getClasspath() {
+ return classpath;
+ }
+
+ /**
+ * The the classpath used to locate the specified classname
+ *
+ * @param classpath
+ */
+ public void setClasspath(Path classpath) {
+ createClasspath().append(classpath);
+ }
+
+ /**
+ * Classpath to use, by reference, when compiling the rulebase
+ *
+ * @param a
+ * reference to an existing classpath
+ */
+ public void setClasspathref(Reference r) {
+ createClasspath().setRefid(r);
+ }
+
+ /**
+ * Adds a path to the classpath.
+ *
+ * @return created classpath
+ */
+ public Path createClasspath() {
+ if (this.classpath == null) {
+ this.classpath = new Path(getProject());
+ }
+ return this.classpath.createPath();
+ }
}
Modified: incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/AbstractMavenIvyAdapter.java
URL: http://svn.apache.org/viewvc/incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/AbstractMavenIvyAdapter.java?rev=1073354&r1=1073353&r2=1073354&view=diff
==============================================================================
--- incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/AbstractMavenIvyAdapter.java (original)
+++ incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/AbstractMavenIvyAdapter.java Tue Feb 22 14:53:51 2011
@@ -24,43 +24,43 @@ import org.apache.tools.ant.BuildExcepti
public abstract class AbstractMavenIvyAdapter extends IvyPostResolveTask {
- private String pomRefId;
- private Pom pom;
+ private String pomRefId;
+ private Pom pom;
- public AbstractMavenIvyAdapter() {
- super();
- }
-
- public String getPomRefId() {
- return pomRefId;
- }
-
- public void setPomRefId(String pomRefId) {
- this.pomRefId = pomRefId;
- }
-
- public Pom getPom() {
- if (pom == null) {
- pom = (Pom) getProject().getReference(pomRefId);
- }
- return pom;
- }
-
- public Model getModel() {
- return getPom().getModel();
- }
-
- @Override
- protected void prepareTask() {
- super.prepareTask();
- if (pomRefId == null) {
- throw new BuildException("pomRefId is required !");
- }
- if (getPom() == null) {
- throw new BuildException("pomRefId references an unexisting pom instance !");
- }
- }
+ public AbstractMavenIvyAdapter() {
+ super();
+ }
+
+ public String getPomRefId() {
+ return pomRefId;
+ }
+
+ public void setPomRefId(String pomRefId) {
+ this.pomRefId = pomRefId;
+ }
+
+ public Pom getPom() {
+ if (pom == null) {
+ pom = (Pom) getProject().getReference(pomRefId);
+ }
+ return pom;
+ }
+
+ public Model getModel() {
+ return getPom().getModel();
+ }
+
+ @Override
+ protected void prepareTask() {
+ super.prepareTask();
+ if (pomRefId == null) {
+ throw new BuildException("pomRefId is required !");
+ }
+ if (getPom() == null) {
+ throw new BuildException("pomRefId references an unexisting pom instance !");
+ }
+ }
-}
\ No newline at end of file
+}
Modified: incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/DependencyAdapter.java
URL: http://svn.apache.org/viewvc/incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/DependencyAdapter.java?rev=1073354&r1=1073353&r2=1073354&view=diff
==============================================================================
--- incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/DependencyAdapter.java (original)
+++ incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/DependencyAdapter.java Tue Feb 22 14:53:51 2011
@@ -29,59 +29,59 @@ import org.codehaus.plexus.util.StringUt
public class DependencyAdapter extends AbstractMavenIvyAdapter {
- private ScopeMappings scopeMapping;
+ private ScopeMappings scopeMapping;
- @Override
- public void doExecute() throws BuildException {
- prepareAndCheck();
- //create a configuration scope mapping helper with our mapping
- ConfigurationScopeMapping configurationScopeMapping= getScopeMapping().getConfigurationScopeMapping();
- //loop on project dependencies to build maven dependencies entries
- for (Iterator iterator = getResolvedReport().getDependencies().iterator(); iterator.hasNext();) {
- IvyNode node = (IvyNode) iterator.next();
- ModuleRevisionId dependencyRevisionId =node.getResolvedId();
- Dependency mavenDependency = new Dependency();
- log("Building maven dependency entry with " + dependencyRevisionId.toString(), Project.MSG_DEBUG);
- mavenDependency.setGroupId(dependencyRevisionId.getOrganisation());
- mavenDependency.setArtifactId(dependencyRevisionId.getName());
- mavenDependency.setVersion(dependencyRevisionId.getRevision());
- String confToCheck = StringUtils.join(node.getRootModuleConfigurations(),", ");
- log("Checking mapping for configuration : " + confToCheck,Project.MSG_DEBUG);
- String scope = configurationScopeMapping.getScope(node.getRootModuleConfigurations());
+ @Override
+ public void doExecute() throws BuildException {
+ prepareAndCheck();
+ //create a configuration scope mapping helper with our mapping
+ ConfigurationScopeMapping configurationScopeMapping= getScopeMapping().getConfigurationScopeMapping();
+ //loop on project dependencies to build maven dependencies entries
+ for (Iterator iterator = getResolvedReport().getDependencies().iterator(); iterator.hasNext();) {
+ IvyNode node = (IvyNode) iterator.next();
+ ModuleRevisionId dependencyRevisionId =node.getResolvedId();
+ Dependency mavenDependency = new Dependency();
+ log("Building maven dependency entry with " + dependencyRevisionId.toString(), Project.MSG_DEBUG);
+ mavenDependency.setGroupId(dependencyRevisionId.getOrganisation());
+ mavenDependency.setArtifactId(dependencyRevisionId.getName());
+ mavenDependency.setVersion(dependencyRevisionId.getRevision());
+ String confToCheck = StringUtils.join(node.getRootModuleConfigurations(),", ");
+ log("Checking mapping for configuration : " + confToCheck,Project.MSG_DEBUG);
+ String scope = configurationScopeMapping.getScope(node.getRootModuleConfigurations());
if (scope != null) {
- StringBuilder sb = new StringBuilder();
- sb.append("Mapping found for configuration ").append(confToCheck);
- sb.append( " with scope ").append(scope);
- log(sb.toString(),Project.MSG_DEBUG);
- mavenDependency.setScope(scope);
+ StringBuilder sb = new StringBuilder();
+ sb.append("Mapping found for configuration ").append(confToCheck);
+ sb.append( " with scope ").append(scope);
+ log(sb.toString(),Project.MSG_DEBUG);
+ mavenDependency.setScope(scope);
}
if (configurationScopeMapping.isOptional(node.getRootModuleConfigurations())) {
- log("Setting " + dependencyRevisionId.toString() + " as optional" ,Project.MSG_DEBUG);
+ log("Setting " + dependencyRevisionId.toString() + " as optional" ,Project.MSG_DEBUG);
mavenDependency.setOptional(true);
}
- getPom().addConfiguredDependency(mavenDependency);
- }
+ getPom().addConfiguredDependency(mavenDependency);
+ }
- }
+ }
- public void add(ScopeMappings scopeMappings) {
- this.scopeMapping= scopeMappings;
- }
+ public void add(ScopeMappings scopeMappings) {
+ this.scopeMapping= scopeMappings;
+ }
- public ScopeMappings getScopeMapping() {
- if (scopeMapping == null) {
- scopeMapping= new ScopeMappings();
- scopeMapping.setProject(getProject());
- }
- return scopeMapping;
- }
+ public ScopeMappings getScopeMapping() {
+ if (scopeMapping == null) {
+ scopeMapping= new ScopeMappings();
+ scopeMapping.setProject(getProject());
+ }
+ return scopeMapping;
+ }
- public void setScopeMapping(ScopeMappings scopeMapping) {
- this.scopeMapping = scopeMapping;
- }
+ public void setScopeMapping(ScopeMappings scopeMapping) {
+ this.scopeMapping = scopeMapping;
+ }
}
Modified: incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/Deploy.java
URL: http://svn.apache.org/viewvc/incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/Deploy.java?rev=1073354&r1=1073353&r2=1073354&view=diff
==============================================================================
--- incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/Deploy.java (original)
+++ incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/Deploy.java Tue Feb 22 14:53:51 2011
@@ -30,84 +30,84 @@ import org.apache.maven.settings.Server;
import org.apache.tools.ant.Project;
public class Deploy extends DeployTask {
-
- private TypeMappings typeMappings;
+
+ private TypeMappings typeMappings;
- @Override
- protected void doExecute() {
- MavenPublishTrigger trigger = (MavenPublishTrigger) getProject().getReference(MavenPublishTrigger.MAVEN_PUBLISH_TRIGGER_REFERENCE);
-
- RemoteRepository repo = getRemoteRepository();
- if (getRemoteRepository().getRefid() != null) {
- repo = (RemoteRepository) getProject().getReference( getRemoteRepository().getRefid());
- }
- boolean repoUrlIsEmpty = repo.getUrl() ==null || repo.getUrl().equals("");
- if (repoUrlIsEmpty && trigger.getPublishUrl() != null) {
- log("No repository url was specified, will use same as ivy publication context", Project.MSG_VERBOSE);
- log("Repository url is now set to " + trigger.getPublishUrl(),Project.MSG_VERBOSE);
- repo.setUrl(trigger.getPublishUrl());
- }
-
- //the main artifact
- PublishedArtifact mainArtifact = trigger.getPublishedArtifacts().get(0);
- setFile(new File(mainArtifact.getFile()));
- for (PublishedArtifact publishedArtifact : trigger.getPublishedArtifacts()) {
- boolean isIvyFile = "ivy".equals(publishedArtifact.getType())
- && "xml".equals(publishedArtifact.getExt());
- //ignore main artifact and ivy.xml file
- if (!(publishedArtifact.equals(mainArtifact) || isIvyFile)){
- Mapping mapping = getTypeMappings().findTypeMappings(
- publishedArtifact.getType(), publishedArtifact.getExt());
- if (mapping != null) {
- if (mapping.getMvnPackaging() != null) {
- AttachedArtifact artifact = createAttach();
- artifact.setFile(new File(publishedArtifact.getFile()));
- artifact.setType(mapping.getMvnPackaging());
- artifact.setClassifier(mapping.getClassifier());
-
- StringBuilder sb = new StringBuilder();
- sb.append("publishing ").append(publishedArtifact.getFile());
- sb.append(" type='").append(artifact.getType()).append("'");
- if (artifact.getClassifier() != null) {
- sb.append(" classifier='").append(artifact.getClassifier()).append("'");
- }
- log(sb.toString());
- }
- }
- }
- }
-
- super.doExecute();
- }
-
- public void addTypeMappings(TypeMappings typeMappings) {
- this.typeMappings = typeMappings;
- }
-
- public TypeMappings getTypeMappings() {
- if (typeMappings == null) {
- // create a default one
- typeMappings = new TypeMappings();
- typeMappings.setProject(getProject());
- }
-
- return typeMappings;
- }
-
- public void setTypeMappings(TypeMappings typeMappings) {
- this.typeMappings = typeMappings;
- }
-
- @Override
+ @Override
+ protected void doExecute() {
+ MavenPublishTrigger trigger = (MavenPublishTrigger) getProject().getReference(MavenPublishTrigger.MAVEN_PUBLISH_TRIGGER_REFERENCE);
+
+ RemoteRepository repo = getRemoteRepository();
+ if (getRemoteRepository().getRefid() != null) {
+ repo = (RemoteRepository) getProject().getReference( getRemoteRepository().getRefid());
+ }
+ boolean repoUrlIsEmpty = repo.getUrl() ==null || repo.getUrl().equals("");
+ if (repoUrlIsEmpty && trigger.getPublishUrl() != null) {
+ log("No repository url was specified, will use same as ivy publication context", Project.MSG_VERBOSE);
+ log("Repository url is now set to " + trigger.getPublishUrl(),Project.MSG_VERBOSE);
+ repo.setUrl(trigger.getPublishUrl());
+ }
+
+ //the main artifact
+ PublishedArtifact mainArtifact = trigger.getPublishedArtifacts().get(0);
+ setFile(new File(mainArtifact.getFile()));
+ for (PublishedArtifact publishedArtifact : trigger.getPublishedArtifacts()) {
+ boolean isIvyFile = "ivy".equals(publishedArtifact.getType())
+ && "xml".equals(publishedArtifact.getExt());
+ //ignore main artifact and ivy.xml file
+ if (!(publishedArtifact.equals(mainArtifact) || isIvyFile)){
+ Mapping mapping = getTypeMappings().findTypeMappings(
+ publishedArtifact.getType(), publishedArtifact.getExt());
+ if (mapping != null) {
+ if (mapping.getMvnPackaging() != null) {
+ AttachedArtifact artifact = createAttach();
+ artifact.setFile(new File(publishedArtifact.getFile()));
+ artifact.setType(mapping.getMvnPackaging());
+ artifact.setClassifier(mapping.getClassifier());
+
+ StringBuilder sb = new StringBuilder();
+ sb.append("publishing ").append(publishedArtifact.getFile());
+ sb.append(" type='").append(artifact.getType()).append("'");
+ if (artifact.getClassifier() != null) {
+ sb.append(" classifier='").append(artifact.getClassifier()).append("'");
+ }
+ log(sb.toString());
+ }
+ }
+ }
+ }
+
+ super.doExecute();
+ }
+
+ public void addTypeMappings(TypeMappings typeMappings) {
+ this.typeMappings = typeMappings;
+ }
+
+ public TypeMappings getTypeMappings() {
+ if (typeMappings == null) {
+ // create a default one
+ typeMappings = new TypeMappings();
+ typeMappings.setProject(getProject());
+ }
+
+ return typeMappings;
+ }
+
+ public void setTypeMappings(TypeMappings typeMappings) {
+ this.typeMappings = typeMappings;
+ }
+
+ @Override
protected void updateRepositoryWithSettings( RemoteRepository repository )
{
if ( repository.getAuthentication() == null )
{
- Server server = getSettings().getServer( repository.getId() );
- if ( repository.getRefid() != null && server != null)
+ Server server = getSettings().getServer( repository.getId() );
+ if ( repository.getRefid() != null && server != null)
{
- RemoteRepository instance = (RemoteRepository) getProject().getReference( repository.getRefid());
- instance.addAuthentication( new Authentication( server ) );
+ RemoteRepository instance = (RemoteRepository) getProject().getReference( repository.getRefid());
+ instance.addAuthentication( new Authentication( server ) );
}
}
Modified: incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/InfoAdapter.java
URL: http://svn.apache.org/viewvc/incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/InfoAdapter.java?rev=1073354&r1=1073353&r2=1073354&view=diff
==============================================================================
--- incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/InfoAdapter.java (original)
+++ incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/InfoAdapter.java Tue Feb 22 14:53:51 2011
@@ -25,74 +25,74 @@ import org.apache.tools.ant.Project;
public class InfoAdapter extends AbstractMavenIvyAdapter {
- private TypeMappings typeMappings;
- private static final String DEFAULT_GROUP_ID = "org.apache.maven";
- private static final String DEFAULT_ARTIFACT_ID = "super-pom";
- private static final String DEFAULT_VERSION = "2.0";
- private static final String DEFAULT_APPLICATION_NAME = "Maven Default Project";
-
- @Override
- public void doExecute() throws BuildException {
- prepareAndCheck();
-
- ModuleRevisionId mrid = getResolvedReport().getModuleDescriptor()
- .getModuleRevisionId();
- if (getModel().getGroupId().equals(DEFAULT_GROUP_ID)) {
- log("Setting groupId to : " + mrid.getOrganisation(),
- Project.MSG_DEBUG);
- getModel().setGroupId(mrid.getOrganisation());
- }
- if (getModel().getName().equals(DEFAULT_APPLICATION_NAME)) {
- log("Setting name to : " + mrid.getName(), Project.MSG_DEBUG);
- getModel().setName(mrid.getName());
- }
- if (getModel().getArtifactId().equals(DEFAULT_ARTIFACT_ID)) {
- log("Setting artifactId to : " + mrid.getName(), Project.MSG_DEBUG);
- getModel().setArtifactId(mrid.getName());
- }
- if (getModel().getVersion().equals(DEFAULT_VERSION)) {
- log("Setting version to : " + mrid.getRevision(), Project.MSG_DEBUG);
- getModel().setVersion(mrid.getRevision());
- }
- if (getModel().getDescription() == null) {
- log("Setting description to : "
- + getResolvedReport().getModuleDescriptor()
- .getDescription(), Project.MSG_DEBUG);
- getModel().setDescription(
- getResolvedReport().getModuleDescriptor().getDescription());
- }
- // TODO: Handle multiple artifacts
- if (getResolvedReport().getModuleDescriptor().getAllArtifacts().length >= 1
- && getResolvedReport().getModuleDescriptor().getAllArtifacts()[0] != null) {
- Artifact artifact = (Artifact) getResolvedReport()
- .getModuleDescriptor().getAllArtifacts()[0];
- Mapping mapping = getTypeMappings().findTypeMappings(
- artifact.getType(), artifact.getExt());
- if (mapping != null) {
- if (mapping.getMvnPackaging() != null) {
- getModel().setPackaging(mapping.getMvnPackaging());
- }
- }
- }
-
- }
-
- public void addTypeMappings(TypeMappings typeMappings) {
- this.typeMappings = typeMappings;
- }
-
- public TypeMappings getTypeMappings() {
- if (typeMappings == null) {
- // create a default one
- typeMappings = new TypeMappings();
- typeMappings.setProject(getProject());
- }
-
- return typeMappings;
- }
-
- public void setTypeMappings(TypeMappings typeMappings) {
- this.typeMappings = typeMappings;
- }
+ private TypeMappings typeMappings;
+ private static final String DEFAULT_GROUP_ID = "org.apache.maven";
+ private static final String DEFAULT_ARTIFACT_ID = "super-pom";
+ private static final String DEFAULT_VERSION = "2.0";
+ private static final String DEFAULT_APPLICATION_NAME = "Maven Default Project";
+
+ @Override
+ public void doExecute() throws BuildException {
+ prepareAndCheck();
+
+ ModuleRevisionId mrid = getResolvedReport().getModuleDescriptor()
+ .getModuleRevisionId();
+ if (getModel().getGroupId().equals(DEFAULT_GROUP_ID)) {
+ log("Setting groupId to : " + mrid.getOrganisation(),
+ Project.MSG_DEBUG);
+ getModel().setGroupId(mrid.getOrganisation());
+ }
+ if (getModel().getName().equals(DEFAULT_APPLICATION_NAME)) {
+ log("Setting name to : " + mrid.getName(), Project.MSG_DEBUG);
+ getModel().setName(mrid.getName());
+ }
+ if (getModel().getArtifactId().equals(DEFAULT_ARTIFACT_ID)) {
+ log("Setting artifactId to : " + mrid.getName(), Project.MSG_DEBUG);
+ getModel().setArtifactId(mrid.getName());
+ }
+ if (getModel().getVersion().equals(DEFAULT_VERSION)) {
+ log("Setting version to : " + mrid.getRevision(), Project.MSG_DEBUG);
+ getModel().setVersion(mrid.getRevision());
+ }
+ if (getModel().getDescription() == null) {
+ log("Setting description to : "
+ + getResolvedReport().getModuleDescriptor()
+ .getDescription(), Project.MSG_DEBUG);
+ getModel().setDescription(
+ getResolvedReport().getModuleDescriptor().getDescription());
+ }
+ // TODO: Handle multiple artifacts
+ if (getResolvedReport().getModuleDescriptor().getAllArtifacts().length >= 1
+ && getResolvedReport().getModuleDescriptor().getAllArtifacts()[0] != null) {
+ Artifact artifact = (Artifact) getResolvedReport()
+ .getModuleDescriptor().getAllArtifacts()[0];
+ Mapping mapping = getTypeMappings().findTypeMappings(
+ artifact.getType(), artifact.getExt());
+ if (mapping != null) {
+ if (mapping.getMvnPackaging() != null) {
+ getModel().setPackaging(mapping.getMvnPackaging());
+ }
+ }
+ }
+
+ }
+
+ public void addTypeMappings(TypeMappings typeMappings) {
+ this.typeMappings = typeMappings;
+ }
+
+ public TypeMappings getTypeMappings() {
+ if (typeMappings == null) {
+ // create a default one
+ typeMappings = new TypeMappings();
+ typeMappings.setProject(getProject());
+ }
+
+ return typeMappings;
+ }
+
+ public void setTypeMappings(TypeMappings typeMappings) {
+ this.typeMappings = typeMappings;
+ }
}
Modified: incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/ScopeMappings.java
URL: http://svn.apache.org/viewvc/incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/ScopeMappings.java?rev=1073354&r1=1073353&r2=1073354&view=diff
==============================================================================
--- incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/ScopeMappings.java (original)
+++ incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/ScopeMappings.java Tue Feb 22 14:53:51 2011
@@ -29,112 +29,112 @@ import org.apache.tools.ant.types.DataTy
public class ScopeMappings extends DataType {
- private List<Mapping> mappings = new ArrayList<Mapping>();
- private boolean useDefault=true;
- private boolean isDefaultMappingAlreadyLoaded=false;
-
- public Mapping createMapping() {
- Mapping mapping = new Mapping();
- this.mappings.add(mapping);
- return mapping;
- }
-
- public List<Mapping> getMappings() {
- if (isReference()) {
- return ((ScopeMappings) getRefid().getReferencedObject())
- .getMappings();
- } else {
- return mappings;
- }
- }
-
- public void setMappings(List<Mapping> mappings) {
- this.mappings = mappings;
- }
-
- public Map<String, String> getMappingsMap() {
- Map<String, String> mappingsMap = new HashMap<String, String>();
-
- for (Iterator<Mapping> iter = getMappings().iterator(); iter.hasNext();) {
- Mapping mapping = (Mapping) iter.next();
- mappingsMap.put(mapping.getConf(), mapping.getScope());
- }
- return mappingsMap;
- }
-
- public ConfigurationScopeMapping getConfigurationScopeMapping() {
- if (getMappings().size() == 0) {
- log("no configurationScopeMapping found, will use the default one",
- Project.MSG_DEBUG);
- }
-
- if (getMappings().size() == 0 || isUseDefault()) {
- createDefaultConfigurationScopeMapping();
- }
- return new ConfigurationScopeMapping(getMappingsMap());
-
- }
-
- /**
- * Creates the default configuration scope mapping
- */
- public void createDefaultConfigurationScopeMapping() {
- if (!isDefaultMappingAlreadyLoaded) {
- mappings.add(new Mapping("default", "compile"));
- // default that extends compile
- mappings.add(new Mapping("default, compile", "compile"));
- // default that extends runtime
- mappings.add(new Mapping("default, runtime", "runtime"));
- // default that extends runtime that extends compile
- mappings.add(new Mapping("default, compile, runtime", "compile"));
- // runtime that extends compile
- mappings.add(new Mapping("compile, runtime", "compile"));
- mappings.add(new Mapping("runtime", "runtime"));
- mappings.add(new Mapping("provided", "provided"));
- mappings.add(new Mapping("test", "test"));
- mappings.add(new Mapping("system", "system"));
- isDefaultMappingAlreadyLoaded=true;
- }
- }
-
- public boolean isUseDefault() {
- return useDefault;
- }
-
- public void setUseDefault(boolean useDefault) {
- this.useDefault = useDefault;
- }
-
-
-
- public class Mapping {
- private String conf;
- private String scope;
-
- public Mapping() {
- }
-
-
- public Mapping(String conf, String scope) {
- this.conf=conf;
- this.scope=scope;
- }
-
- public String getConf() {
- return conf;
- }
-
- public void setConf(String conf) {
- this.conf = conf;
- }
-
- public String getScope() {
- return scope;
- }
-
- public void setScope(String scope) {
- this.scope = scope;
- }
- }
+ private List<Mapping> mappings = new ArrayList<Mapping>();
+ private boolean useDefault=true;
+ private boolean isDefaultMappingAlreadyLoaded=false;
+
+ public Mapping createMapping() {
+ Mapping mapping = new Mapping();
+ this.mappings.add(mapping);
+ return mapping;
+ }
+
+ public List<Mapping> getMappings() {
+ if (isReference()) {
+ return ((ScopeMappings) getRefid().getReferencedObject())
+ .getMappings();
+ } else {
+ return mappings;
+ }
+ }
+
+ public void setMappings(List<Mapping> mappings) {
+ this.mappings = mappings;
+ }
+
+ public Map<String, String> getMappingsMap() {
+ Map<String, String> mappingsMap = new HashMap<String, String>();
+
+ for (Iterator<Mapping> iter = getMappings().iterator(); iter.hasNext();) {
+ Mapping mapping = (Mapping) iter.next();
+ mappingsMap.put(mapping.getConf(), mapping.getScope());
+ }
+ return mappingsMap;
+ }
+
+ public ConfigurationScopeMapping getConfigurationScopeMapping() {
+ if (getMappings().size() == 0) {
+ log("no configurationScopeMapping found, will use the default one",
+ Project.MSG_DEBUG);
+ }
+
+ if (getMappings().size() == 0 || isUseDefault()) {
+ createDefaultConfigurationScopeMapping();
+ }
+ return new ConfigurationScopeMapping(getMappingsMap());
+
+ }
+
+ /**
+ * Creates the default configuration scope mapping
+ */
+ public void createDefaultConfigurationScopeMapping() {
+ if (!isDefaultMappingAlreadyLoaded) {
+ mappings.add(new Mapping("default", "compile"));
+ // default that extends compile
+ mappings.add(new Mapping("default, compile", "compile"));
+ // default that extends runtime
+ mappings.add(new Mapping("default, runtime", "runtime"));
+ // default that extends runtime that extends compile
+ mappings.add(new Mapping("default, compile, runtime", "compile"));
+ // runtime that extends compile
+ mappings.add(new Mapping("compile, runtime", "compile"));
+ mappings.add(new Mapping("runtime", "runtime"));
+ mappings.add(new Mapping("provided", "provided"));
+ mappings.add(new Mapping("test", "test"));
+ mappings.add(new Mapping("system", "system"));
+ isDefaultMappingAlreadyLoaded=true;
+ }
+ }
+
+ public boolean isUseDefault() {
+ return useDefault;
+ }
+
+ public void setUseDefault(boolean useDefault) {
+ this.useDefault = useDefault;
+ }
+
+
+
+ public class Mapping {
+ private String conf;
+ private String scope;
+
+ public Mapping() {
+ }
+
+
+ public Mapping(String conf, String scope) {
+ this.conf=conf;
+ this.scope=scope;
+ }
+
+ public String getConf() {
+ return conf;
+ }
+
+ public void setConf(String conf) {
+ this.conf = conf;
+ }
+
+ public String getScope() {
+ return scope;
+ }
+
+ public void setScope(String scope) {
+ this.scope = scope;
+ }
+ }
}
Modified: incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/TypeMappings.java
URL: http://svn.apache.org/viewvc/incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/TypeMappings.java?rev=1073354&r1=1073353&r2=1073354&view=diff
==============================================================================
--- incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/TypeMappings.java (original)
+++ incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/TypeMappings.java Tue Feb 22 14:53:51 2011
@@ -24,159 +24,159 @@ import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.DataType;
public class TypeMappings extends DataType {
- private List<Mapping> mappings = new ArrayList<Mapping>();
- private boolean useDefault=true;
- private boolean isDefaultMappingAlreadyLoaded=false;
-
-
- public Mapping createMapping() {
- if (isReference()) {
- throw noChildrenAllowed();
- }
- Mapping mapping = new Mapping();
- this.mappings.add(mapping);
- return mapping;
- }
-
- public List<Mapping> getMappings() {
- if (isReference()) {
- return ((TypeMappings) getRefid().getReferencedObject()).getMappings();
- } else {
- if (mappings.size() == 0) {
- log("No typeMappings found, or the typeMappings was empty. Creating default typeMappings",Project.MSG_DEBUG);
- }
- if (mappings.size() == 0 || useDefault) {
- createDefaultTypeMapping();
- }
- return mappings;
- }
- }
-
- public void setTypeMappings(List<Mapping> mappings) {
- this.mappings = mappings;
- }
-
- public void createDefaultTypeMapping() {
- if (!isDefaultMappingAlreadyLoaded) {
- // basic mapping
- mappings.add(new Mapping("jar"));
- mappings.add(new Mapping("war"));
- mappings.add(new Mapping("ear"));
- mappings.add(new Mapping("javadoc","zip","zip","javadoc"));
- mappings.add(new Mapping("javadoc","jar","jar","javadoc"));
- mappings.add(new Mapping("source","jar","jar","sources"));
- mappings.add(new Mapping("test-source","jar","jar","test-sources"));
- mappings.add(new Mapping("test-jar","jar","jar","test-jar"));
- // default mapping doesn't take care of type/ext, but set mvnPackaging
- // to jar
- mappings.add(new Mapping());
- isDefaultMappingAlreadyLoaded=true;
- }
- }
-
- public Mapping findTypeMappings(String typeToMatch, String extToMatch) {
- StringBuffer sb = new StringBuffer();
- sb.append("Looking for TypeMapping with type=").append(typeToMatch);
- sb.append(" and ext=").append(extToMatch);
- getProject().log(sb.toString(), Project.MSG_DEBUG);
- for (Mapping mapping : getMappings()) {
- boolean typeMatches = mapping.getType().equals(typeToMatch)
- || mapping.getType().equals("*");
- boolean extMatches = mapping.getExt().equals(extToMatch)
- || mapping.getExt().equals("*");
- if (typeMatches && extMatches) {
- sb = new StringBuffer();
- sb.append("TypeMapping found for type=").append(typeToMatch);
- sb.append(" and ext=").append(extToMatch);
- sb.append(" Result: mvnPackaging=").append(
- mapping.getMvnPackaging());
- getProject().log(sb.toString(), Project.MSG_DEBUG);
- return mapping;
- }
- }
- sb = new StringBuffer();
- sb.append("no TypeMapping found for type=").append(typeToMatch);
- sb.append(" and ext=").append(extToMatch);
- getProject().log(sb.toString(), Project.MSG_DEBUG);
- return null;
- }
-
- public boolean isUseDefault() {
- return useDefault;
- }
-
- public void setUseDefault(boolean useDefault) {
- this.useDefault = useDefault;
- }
-
-
-
- public class Mapping {
- private String type;
- private String ext;
- private String mvnPackaging;
- private String classifier;
-
- public Mapping() {
- type = "*";
- ext = "*";
- mvnPackaging = "jar";
- classifier=null;
- }
-
- public Mapping(String type) {
- this();
- this.type = type;
- this.ext = type;
- this.mvnPackaging = type;
- }
-
- public Mapping(String type, String ext, String mvnPackaging) {
- this();
- this.type = type;
- this.ext = ext;
- this.mvnPackaging = mvnPackaging;
- }
-
- public Mapping(String type, String ext, String mvnPackaging, String classifier) {
- this(type,ext,mvnPackaging);
- this.classifier = classifier;
- }
-
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getExt() {
- return ext;
- }
-
- public void setExt(String ext) {
- this.ext = ext;
- }
-
- public String getMvnPackaging() {
- return mvnPackaging;
- }
-
- public void setMvnPackaging(String mvnPackaging) {
- this.mvnPackaging = mvnPackaging;
- }
-
- public String getClassifier() {
- return classifier;
- }
-
- public void setClassifier(String classifier) {
- this.classifier = classifier;
- }
-
-
- }
+ private List<Mapping> mappings = new ArrayList<Mapping>();
+ private boolean useDefault=true;
+ private boolean isDefaultMappingAlreadyLoaded=false;
+
+
+ public Mapping createMapping() {
+ if (isReference()) {
+ throw noChildrenAllowed();
+ }
+ Mapping mapping = new Mapping();
+ this.mappings.add(mapping);
+ return mapping;
+ }
+
+ public List<Mapping> getMappings() {
+ if (isReference()) {
+ return ((TypeMappings) getRefid().getReferencedObject()).getMappings();
+ } else {
+ if (mappings.size() == 0) {
+ log("No typeMappings found, or the typeMappings was empty. Creating default typeMappings",Project.MSG_DEBUG);
+ }
+ if (mappings.size() == 0 || useDefault) {
+ createDefaultTypeMapping();
+ }
+ return mappings;
+ }
+ }
+
+ public void setTypeMappings(List<Mapping> mappings) {
+ this.mappings = mappings;
+ }
+
+ public void createDefaultTypeMapping() {
+ if (!isDefaultMappingAlreadyLoaded) {
+ // basic mapping
+ mappings.add(new Mapping("jar"));
+ mappings.add(new Mapping("war"));
+ mappings.add(new Mapping("ear"));
+ mappings.add(new Mapping("javadoc","zip","zip","javadoc"));
+ mappings.add(new Mapping("javadoc","jar","jar","javadoc"));
+ mappings.add(new Mapping("source","jar","jar","sources"));
+ mappings.add(new Mapping("test-source","jar","jar","test-sources"));
+ mappings.add(new Mapping("test-jar","jar","jar","test-jar"));
+ // default mapping doesn't take care of type/ext, but set mvnPackaging
+ // to jar
+ mappings.add(new Mapping());
+ isDefaultMappingAlreadyLoaded=true;
+ }
+ }
+
+ public Mapping findTypeMappings(String typeToMatch, String extToMatch) {
+ StringBuffer sb = new StringBuffer();
+ sb.append("Looking for TypeMapping with type=").append(typeToMatch);
+ sb.append(" and ext=").append(extToMatch);
+ getProject().log(sb.toString(), Project.MSG_DEBUG);
+ for (Mapping mapping : getMappings()) {
+ boolean typeMatches = mapping.getType().equals(typeToMatch)
+ || mapping.getType().equals("*");
+ boolean extMatches = mapping.getExt().equals(extToMatch)
+ || mapping.getExt().equals("*");
+ if (typeMatches && extMatches) {
+ sb = new StringBuffer();
+ sb.append("TypeMapping found for type=").append(typeToMatch);
+ sb.append(" and ext=").append(extToMatch);
+ sb.append(" Result: mvnPackaging=").append(
+ mapping.getMvnPackaging());
+ getProject().log(sb.toString(), Project.MSG_DEBUG);
+ return mapping;
+ }
+ }
+ sb = new StringBuffer();
+ sb.append("no TypeMapping found for type=").append(typeToMatch);
+ sb.append(" and ext=").append(extToMatch);
+ getProject().log(sb.toString(), Project.MSG_DEBUG);
+ return null;
+ }
+
+ public boolean isUseDefault() {
+ return useDefault;
+ }
+
+ public void setUseDefault(boolean useDefault) {
+ this.useDefault = useDefault;
+ }
+
+
+
+ public class Mapping {
+ private String type;
+ private String ext;
+ private String mvnPackaging;
+ private String classifier;
+
+ public Mapping() {
+ type = "*";
+ ext = "*";
+ mvnPackaging = "jar";
+ classifier=null;
+ }
+
+ public Mapping(String type) {
+ this();
+ this.type = type;
+ this.ext = type;
+ this.mvnPackaging = type;
+ }
+
+ public Mapping(String type, String ext, String mvnPackaging) {
+ this();
+ this.type = type;
+ this.ext = ext;
+ this.mvnPackaging = mvnPackaging;
+ }
+
+ public Mapping(String type, String ext, String mvnPackaging, String classifier) {
+ this(type,ext,mvnPackaging);
+ this.classifier = classifier;
+ }
+
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getExt() {
+ return ext;
+ }
+
+ public void setExt(String ext) {
+ this.ext = ext;
+ }
+
+ public String getMvnPackaging() {
+ return mvnPackaging;
+ }
+
+ public void setMvnPackaging(String mvnPackaging) {
+ this.mvnPackaging = mvnPackaging;
+ }
+
+ public String getClassifier() {
+ return classifier;
+ }
+
+ public void setClassifier(String classifier) {
+ this.classifier = classifier;
+ }
+
+
+ }
}
Modified: incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/resources/org/apache/easyant/tasks/adapters/antlib.xml
URL: http://svn.apache.org/viewvc/incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/resources/org/apache/easyant/tasks/adapters/antlib.xml?rev=1073354&r1=1073353&r2=1073354&view=diff
==============================================================================
--- incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/resources/org/apache/easyant/tasks/adapters/antlib.xml (original)
+++ incubator/easyant/tasks/trunk/mavenivy-adapters/src/main/resources/org/apache/easyant/tasks/adapters/antlib.xml Tue Feb 22 14:53:51 2011
@@ -16,11 +16,11 @@
limitations under the License.
-->
<antlib xmlns:current="ant:current">
- <taskdef name="dependencyAdapter" classname="org.apache.easyant.tasks.adapters.DependencyAdapter"/>
- <taskdef name="infoAdapter" classname="org.apache.easyant.tasks.adapters.InfoAdapter"/>
- <typedef name="scopeMappings" classname="org.apache.easyant.tasks.adapters.ScopeMappings"/>
- <typedef name="typeMappings" classname="org.apache.easyant.tasks.adapters.TypeMappings"/>
- <taskdef name="deploy" classname="org.apache.easyant.tasks.adapters.Deploy"/>
+ <taskdef name="dependencyAdapter" classname="org.apache.easyant.tasks.adapters.DependencyAdapter"/>
+ <taskdef name="infoAdapter" classname="org.apache.easyant.tasks.adapters.InfoAdapter"/>
+ <typedef name="scopeMappings" classname="org.apache.easyant.tasks.adapters.ScopeMappings"/>
+ <typedef name="typeMappings" classname="org.apache.easyant.tasks.adapters.TypeMappings"/>
+ <taskdef name="deploy" classname="org.apache.easyant.tasks.adapters.Deploy"/>
- <taskdef name="registertrigger" classname="org.apache.easyant.tasks.RegisterTrigger"/>
+ <taskdef name="registertrigger" classname="org.apache.easyant.tasks.RegisterTrigger"/>
</antlib>
Modified: incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/java/org/apache/easyant/tasks/adapters/DependencyAdapterTest.java
URL: http://svn.apache.org/viewvc/incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/java/org/apache/easyant/tasks/adapters/DependencyAdapterTest.java?rev=1073354&r1=1073353&r2=1073354&view=diff
==============================================================================
--- incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/java/org/apache/easyant/tasks/adapters/DependencyAdapterTest.java (original)
+++ incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/java/org/apache/easyant/tasks/adapters/DependencyAdapterTest.java Tue Feb 22 14:53:51 2011
@@ -22,11 +22,11 @@ import org.junit.Test;
public class DependencyAdapterTest extends BuildFileTest {
- public DependencyAdapterTest() {
- super();
- }
-
- /**
+ public DependencyAdapterTest() {
+ super();
+ }
+
+ /**
* Assert that the given substring is not in the log messages.
*/
public void assertDebugLogNotContaining(String substring) {
@@ -37,51 +37,51 @@ public class DependencyAdapterTest exten
}
- @Override
- protected void setUp() throws Exception {
- configureProject("src/test/resources/org/apache/easyant/tasks/adapters/DependencyAdapter/build.xml");
- }
-
- @Test
- public void testBasicUsage() {
- executeTarget("basicUsage");
- assertDebuglogContaining("Building maven dependency entry with org.apache.ivy#ivy;2.1.0");
- assertDebuglogContaining("Checking mapping for configuration : default, runtime");
- assertDebuglogContaining("Mapping found for configuration default, runtime with scope runtime");
-
- assertDebuglogContaining("Building maven dependency entry with hsqldb#hsqldb;1.8.0.7");
- assertDebuglogContaining("Checking mapping for configuration : default");
- assertDebuglogContaining("Mapping found for configuration default with scope compile");
- assertDebuglogContaining("Building maven dependency entry with junit#junit;4.4");
- assertDebuglogContaining("Checking mapping for configuration : test");
- assertDebuglogContaining("Mapping found for configuration test with scope test");
-
- }
-
- @Test
- public void testCustomMapping() {
- executeTarget("customMapping");
- assertDebuglogContaining("Building maven dependency entry with hsqldb#hsqldb;1.8.0.7");
- assertDebuglogContaining("Checking mapping for configuration : default");
- assertDebuglogContaining("Mapping found for configuration default with scope compile");
- assertDebuglogContaining("Building maven dependency entry with junit#junit;4.4");
- assertDebuglogContaining("Checking mapping for configuration : test");
- assertDebuglogContaining("Mapping found for configuration test with scope test");
-
- }
-
-
- @Test
- public void testWithoutPomRef() {
- expectBuildException("withoutPomRef", "pomRefId is required !");
-
- }
-
- @Test
- public void testWrongPomRef() {
- expectBuildException("wrongPomRef", "pomRefId references an unexisting pom instance !");
-
- }
+ @Override
+ protected void setUp() throws Exception {
+ configureProject("src/test/resources/org/apache/easyant/tasks/adapters/DependencyAdapter/build.xml");
+ }
+
+ @Test
+ public void testBasicUsage() {
+ executeTarget("basicUsage");
+ assertDebuglogContaining("Building maven dependency entry with org.apache.ivy#ivy;2.1.0");
+ assertDebuglogContaining("Checking mapping for configuration : default, runtime");
+ assertDebuglogContaining("Mapping found for configuration default, runtime with scope runtime");
+
+ assertDebuglogContaining("Building maven dependency entry with hsqldb#hsqldb;1.8.0.7");
+ assertDebuglogContaining("Checking mapping for configuration : default");
+ assertDebuglogContaining("Mapping found for configuration default with scope compile");
+ assertDebuglogContaining("Building maven dependency entry with junit#junit;4.4");
+ assertDebuglogContaining("Checking mapping for configuration : test");
+ assertDebuglogContaining("Mapping found for configuration test with scope test");
+
+ }
+
+ @Test
+ public void testCustomMapping() {
+ executeTarget("customMapping");
+ assertDebuglogContaining("Building maven dependency entry with hsqldb#hsqldb;1.8.0.7");
+ assertDebuglogContaining("Checking mapping for configuration : default");
+ assertDebuglogContaining("Mapping found for configuration default with scope compile");
+ assertDebuglogContaining("Building maven dependency entry with junit#junit;4.4");
+ assertDebuglogContaining("Checking mapping for configuration : test");
+ assertDebuglogContaining("Mapping found for configuration test with scope test");
+
+ }
+
+
+ @Test
+ public void testWithoutPomRef() {
+ expectBuildException("withoutPomRef", "pomRefId is required !");
+
+ }
+
+ @Test
+ public void testWrongPomRef() {
+ expectBuildException("wrongPomRef", "pomRefId references an unexisting pom instance !");
+
+ }
-
+
}
Modified: incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/java/org/apache/easyant/tasks/adapters/InfoAdapterTest.java
URL: http://svn.apache.org/viewvc/incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/java/org/apache/easyant/tasks/adapters/InfoAdapterTest.java?rev=1073354&r1=1073353&r2=1073354&view=diff
==============================================================================
--- incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/java/org/apache/easyant/tasks/adapters/InfoAdapterTest.java (original)
+++ incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/java/org/apache/easyant/tasks/adapters/InfoAdapterTest.java Tue Feb 22 14:53:51 2011
@@ -22,11 +22,11 @@ import org.junit.Test;
public class InfoAdapterTest extends BuildFileTest {
- public InfoAdapterTest() {
- super();
- }
-
- /**
+ public InfoAdapterTest() {
+ super();
+ }
+
+ /**
* Assert that the given substring is not in the log messages.
*/
public void assertDebugLogNotContaining(String substring) {
@@ -37,70 +37,70 @@ public class InfoAdapterTest extends Bui
}
- @Override
- protected void setUp() throws Exception {
- configureProject("src/test/resources/org/apache/easyant/tasks/adapters/InfoAdapter/build.xml");
- }
-
- @Test
- public void testBasicUsage() {
- executeTarget("basicUsage");
- assertDebuglogContaining("Setting groupId to : org.mycompany");
- assertDebuglogContaining("Setting name to : myProject");
- assertDebuglogContaining("Setting artifactId to : myProject");
-
- assertDebuglogContaining("Setting version to : 0.1");
-
- assertDebuglogContaining("Setting description to : foobar description");
-
- assertDebuglogContaining("No typeMappings found, or the typeMappings was empty. Creating default typeMappings");
-
- assertDebuglogContaining("Looking for TypeMapping with type=jar and ext=jar");
- assertDebuglogContaining("TypeMapping found for type=jar and ext=jar Result: mvnPackaging=jar");
- }
-
- @Test
- public void testCustomMapping() {
- executeTarget("customMapping");
- assertDebuglogContaining("Setting groupId to : org.mycompany");
- assertDebuglogContaining("Setting name to : myProject");
- assertDebuglogContaining("Setting artifactId to : myProject");
-
- assertDebuglogContaining("Setting version to : 0.1");
-
- assertDebuglogContaining("Setting description to : foobar description");
- assertDebugLogNotContaining("No typeMappings found, or the typeMappings was empty. Creating default typeMappings");
-
- assertDebuglogContaining("Looking for TypeMapping with type=jar and ext=jar");
- assertDebuglogContaining("TypeMapping found for type=jar and ext=jar Result: mvnPackaging=myPackaging");
- }
-
- @Test
- public void testContainingMvnMetadata() {
- executeTarget("containingMvnMetadata");
- //those three information are already set by the <pom> task
- assertDebugLogNotContaining("Setting groupId to : org.mycompany");
- assertDebugLogNotContaining("Setting artifactId to : myProject");
- assertDebugLogNotContaining("Setting version to : 0.1");
-
- assertDebuglogContaining("Setting name to : myProject");
-
- assertDebuglogContaining("Setting description to : foobar description");
- assertDebuglogContaining("Looking for TypeMapping with type=jar and ext=jar");
- assertDebuglogContaining("TypeMapping found for type=jar and ext=jar Result: mvnPackaging=jar");
- }
-
- @Test
- public void testWithoutPomRef() {
- expectBuildException("withoutPomRef", "pomRefId is required !");
-
- }
-
- @Test
- public void testWrongPomRef() {
- expectBuildException("wrongPomRef", "pomRefId references an unexisting pom instance !");
-
- }
+ @Override
+ protected void setUp() throws Exception {
+ configureProject("src/test/resources/org/apache/easyant/tasks/adapters/InfoAdapter/build.xml");
+ }
+
+ @Test
+ public void testBasicUsage() {
+ executeTarget("basicUsage");
+ assertDebuglogContaining("Setting groupId to : org.mycompany");
+ assertDebuglogContaining("Setting name to : myProject");
+ assertDebuglogContaining("Setting artifactId to : myProject");
+
+ assertDebuglogContaining("Setting version to : 0.1");
+
+ assertDebuglogContaining("Setting description to : foobar description");
+
+ assertDebuglogContaining("No typeMappings found, or the typeMappings was empty. Creating default typeMappings");
+
+ assertDebuglogContaining("Looking for TypeMapping with type=jar and ext=jar");
+ assertDebuglogContaining("TypeMapping found for type=jar and ext=jar Result: mvnPackaging=jar");
+ }
+
+ @Test
+ public void testCustomMapping() {
+ executeTarget("customMapping");
+ assertDebuglogContaining("Setting groupId to : org.mycompany");
+ assertDebuglogContaining("Setting name to : myProject");
+ assertDebuglogContaining("Setting artifactId to : myProject");
+
+ assertDebuglogContaining("Setting version to : 0.1");
+
+ assertDebuglogContaining("Setting description to : foobar description");
+ assertDebugLogNotContaining("No typeMappings found, or the typeMappings was empty. Creating default typeMappings");
+
+ assertDebuglogContaining("Looking for TypeMapping with type=jar and ext=jar");
+ assertDebuglogContaining("TypeMapping found for type=jar and ext=jar Result: mvnPackaging=myPackaging");
+ }
+
+ @Test
+ public void testContainingMvnMetadata() {
+ executeTarget("containingMvnMetadata");
+ //those three information are already set by the <pom> task
+ assertDebugLogNotContaining("Setting groupId to : org.mycompany");
+ assertDebugLogNotContaining("Setting artifactId to : myProject");
+ assertDebugLogNotContaining("Setting version to : 0.1");
+
+ assertDebuglogContaining("Setting name to : myProject");
+
+ assertDebuglogContaining("Setting description to : foobar description");
+ assertDebuglogContaining("Looking for TypeMapping with type=jar and ext=jar");
+ assertDebuglogContaining("TypeMapping found for type=jar and ext=jar Result: mvnPackaging=jar");
+ }
+
+ @Test
+ public void testWithoutPomRef() {
+ expectBuildException("withoutPomRef", "pomRefId is required !");
+
+ }
+
+ @Test
+ public void testWrongPomRef() {
+ expectBuildException("wrongPomRef", "pomRefId references an unexisting pom instance !");
+
+ }
-
+
}
Modified: incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/resources/org/apache/easyant/tasks/adapters/DependencyAdapter/build.xml
URL: http://svn.apache.org/viewvc/incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/resources/org/apache/easyant/tasks/adapters/DependencyAdapter/build.xml?rev=1073354&r1=1073353&r2=1073354&view=diff
==============================================================================
--- incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/resources/org/apache/easyant/tasks/adapters/DependencyAdapter/build.xml (original)
+++ incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/resources/org/apache/easyant/tasks/adapters/DependencyAdapter/build.xml Tue Feb 22 14:53:51 2011
@@ -17,33 +17,33 @@
<project name="maven-ivy-adapters-test" xmlns:mvn="antlib:org.apache.maven.artifact.ant" xmlns:mavenivy="antlib:org.apache.easyant.tasks.adapters" xmlns:ivy="antlib:org.apache.ivy.ant">
- <target name="basicUsage">
- <ivy:resolve file="ivy.xml"/>
+ <target name="basicUsage">
+ <ivy:resolve file="ivy.xml"/>
- <mvn:pom id="mypom" />
- <mavenivy:dependencyAdapter pomRefId="mypom"/>
- </target>
-
- <target name="customMapping">
- <ivy:resolve file="ivy.xml"/>
-
- <mvn:pom id="mypom" />
- <mavenivy:dependencyAdapter pomRefId="mypom">
- <mavenivy:scopeMappings>
- <mapping conf="default" scope="compile"/>
- <mapping conf="test" scope="test"/>
- </mavenivy:scopeMappings>
- </mavenivy:dependencyAdapter>
- </target>
-
- <target name="withoutPomRef">
- <ivy:resolve file="ivy.xml"/>
- <mavenivy:dependencyAdapter pomRefId="mypom"/>
- </target>
-
- <target name="wrongPomRef">
- <ivy:resolve file="ivy.xml"/>
- <mavenivy:dependencyAdapter/>
- </target>
+ <mvn:pom id="mypom" />
+ <mavenivy:dependencyAdapter pomRefId="mypom"/>
+ </target>
+
+ <target name="customMapping">
+ <ivy:resolve file="ivy.xml"/>
+
+ <mvn:pom id="mypom" />
+ <mavenivy:dependencyAdapter pomRefId="mypom">
+ <mavenivy:scopeMappings>
+ <mapping conf="default" scope="compile"/>
+ <mapping conf="test" scope="test"/>
+ </mavenivy:scopeMappings>
+ </mavenivy:dependencyAdapter>
+ </target>
+
+ <target name="withoutPomRef">
+ <ivy:resolve file="ivy.xml"/>
+ <mavenivy:dependencyAdapter pomRefId="mypom"/>
+ </target>
+
+ <target name="wrongPomRef">
+ <ivy:resolve file="ivy.xml"/>
+ <mavenivy:dependencyAdapter/>
+ </target>
-</project>
\ No newline at end of file
+</project>
Modified: incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/resources/org/apache/easyant/tasks/adapters/DependencyAdapter/ivy.xml
URL: http://svn.apache.org/viewvc/incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/resources/org/apache/easyant/tasks/adapters/DependencyAdapter/ivy.xml?rev=1073354&r1=1073353&r2=1073354&view=diff
==============================================================================
--- incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/resources/org/apache/easyant/tasks/adapters/DependencyAdapter/ivy.xml (original)
+++ incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/resources/org/apache/easyant/tasks/adapters/DependencyAdapter/ivy.xml Tue Feb 22 14:53:51 2011
@@ -15,22 +15,22 @@
limitations under the License.
-->
<ivy-module version="2.0" xmlns:ea="http://www.easyant.org">
- <info organisation="org.mycompany" module="myProject" revision="0.1" status="integration" >
- <description>
- foobar description
- </description>
- </info>
- <configurations>
- <conf name="default" visibility="public" description="runtime dependencies and master artifact can be used with this conf" extends="runtime"/>
- <conf name="runtime" extends="compile"/>
- <conf name="compile" />
-
- <conf name="test" visibility="private" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases."/>
- </configurations>
- <dependencies>
- <dependency org="hsqldb" name="hsqldb" rev="1.8.0.7" conf="default"/>
- <dependency org="org.apache.ivy" name="ivy" rev="2.1.0" conf="runtime"/>
- <dependency org="junit" name="junit" rev="4.4" conf="test->default" />
+ <info organisation="org.mycompany" module="myProject" revision="0.1" status="integration" >
+ <description>
+ foobar description
+ </description>
+ </info>
+ <configurations>
+ <conf name="default" visibility="public" description="runtime dependencies and master artifact can be used with this conf" extends="runtime"/>
+ <conf name="runtime" extends="compile"/>
+ <conf name="compile" />
+
+ <conf name="test" visibility="private" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases."/>
+ </configurations>
+ <dependencies>
+ <dependency org="hsqldb" name="hsqldb" rev="1.8.0.7" conf="default"/>
+ <dependency org="org.apache.ivy" name="ivy" rev="2.1.0" conf="runtime"/>
+ <dependency org="junit" name="junit" rev="4.4" conf="test->default" />
- </dependencies>
+ </dependencies>
</ivy-module>
Modified: incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/resources/org/apache/easyant/tasks/adapters/InfoAdapter/build.xml
URL: http://svn.apache.org/viewvc/incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/resources/org/apache/easyant/tasks/adapters/InfoAdapter/build.xml?rev=1073354&r1=1073353&r2=1073354&view=diff
==============================================================================
--- incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/resources/org/apache/easyant/tasks/adapters/InfoAdapter/build.xml (original)
+++ incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/resources/org/apache/easyant/tasks/adapters/InfoAdapter/build.xml Tue Feb 22 14:53:51 2011
@@ -17,39 +17,39 @@
<project name="maven-ivy-adapters-test" xmlns:mvn="antlib:org.apache.maven.artifact.ant" xmlns:mavenivy="antlib:org.apache.easyant.tasks.adapters" xmlns:ivy="antlib:org.apache.ivy.ant">
- <target name="basicUsage">
- <ivy:resolve file="ivy.xml"/>
+ <target name="basicUsage">
+ <ivy:resolve file="ivy.xml"/>
- <mvn:pom id="mypom" />
- <mavenivy:infoAdapter pomRefId="mypom"/>
- </target>
-
- <target name="customMapping">
- <ivy:resolve file="ivy.xml"/>
-
- <mvn:pom id="mypom" />
- <mavenivy:infoAdapter pomRefId="mypom">
- <typeMappings>
- <mapping type="jar" mvnPackaging="myPackaging"/>
- </typeMappings>
- </mavenivy:infoAdapter>
- </target>
-
- <target name="containingMvnMetadata">
- <ivy:resolve file="ivy.xml"/>
-
- <mvn:pom id="mypom" groupId="myGroupId" artifactId="foobar" version="1.0" />
- <mavenivy:infoAdapter pomRefId="mypom"/>
- </target>
-
- <target name="withoutPomRef">
- <ivy:resolve file="ivy.xml"/>
- <mavenivy:infoAdapter pomRefId="mypom"/>
- </target>
-
- <target name="wrongPomRef">
- <ivy:resolve file="ivy.xml"/>
- <mavenivy:infoAdapter/>
- </target>
+ <mvn:pom id="mypom" />
+ <mavenivy:infoAdapter pomRefId="mypom"/>
+ </target>
+
+ <target name="customMapping">
+ <ivy:resolve file="ivy.xml"/>
+
+ <mvn:pom id="mypom" />
+ <mavenivy:infoAdapter pomRefId="mypom">
+ <typeMappings>
+ <mapping type="jar" mvnPackaging="myPackaging"/>
+ </typeMappings>
+ </mavenivy:infoAdapter>
+ </target>
+
+ <target name="containingMvnMetadata">
+ <ivy:resolve file="ivy.xml"/>
+
+ <mvn:pom id="mypom" groupId="myGroupId" artifactId="foobar" version="1.0" />
+ <mavenivy:infoAdapter pomRefId="mypom"/>
+ </target>
+
+ <target name="withoutPomRef">
+ <ivy:resolve file="ivy.xml"/>
+ <mavenivy:infoAdapter pomRefId="mypom"/>
+ </target>
+
+ <target name="wrongPomRef">
+ <ivy:resolve file="ivy.xml"/>
+ <mavenivy:infoAdapter/>
+ </target>
-</project>
\ No newline at end of file
+</project>
Modified: incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/resources/org/apache/easyant/tasks/adapters/InfoAdapter/ivy.xml
URL: http://svn.apache.org/viewvc/incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/resources/org/apache/easyant/tasks/adapters/InfoAdapter/ivy.xml?rev=1073354&r1=1073353&r2=1073354&view=diff
==============================================================================
--- incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/resources/org/apache/easyant/tasks/adapters/InfoAdapter/ivy.xml (original)
+++ incubator/easyant/tasks/trunk/mavenivy-adapters/src/test/resources/org/apache/easyant/tasks/adapters/InfoAdapter/ivy.xml Tue Feb 22 14:53:51 2011
@@ -15,18 +15,18 @@
limitations under the License.
-->
<ivy-module version="2.0" xmlns:ea="http://www.easyant.org">
- <info organisation="org.mycompany" module="myProject" revision="0.1" status="integration" >
- <description>
- foobar description
- </description>
- </info>
- <configurations>
- <conf name="default" visibility="public" description="runtime dependencies and master artifact can be used with this conf"/>
- <conf name="test" visibility="private" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases."/>
- </configurations>
- <dependencies>
- <dependency org="hsqldb" name="hsqldb" rev="1.8.0.7" conf="default->default"/>
- <dependency org="junit" name="junit" rev="4.4" conf="test->default" />
+ <info organisation="org.mycompany" module="myProject" revision="0.1" status="integration" >
+ <description>
+ foobar description
+ </description>
+ </info>
+ <configurations>
+ <conf name="default" visibility="public" description="runtime dependencies and master artifact can be used with this conf"/>
+ <conf name="test" visibility="private" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases."/>
+ </configurations>
+ <dependencies>
+ <dependency org="hsqldb" name="hsqldb" rev="1.8.0.7" conf="default->default"/>
+ <dependency org="junit" name="junit" rev="4.4" conf="test->default" />
- </dependencies>
+ </dependencies>
</ivy-module>
Modified: incubator/easyant/tasks/trunk/partial-jnlp-ant-task/module.ivy
URL: http://svn.apache.org/viewvc/incubator/easyant/tasks/trunk/partial-jnlp-ant-task/module.ivy?rev=1073354&r1=1073353&r2=1073354&view=diff
==============================================================================
--- incubator/easyant/tasks/trunk/partial-jnlp-ant-task/module.ivy (original)
+++ incubator/easyant/tasks/trunk/partial-jnlp-ant-task/module.ivy Tue Feb 22 14:53:51 2011
@@ -15,22 +15,22 @@
limitations under the License.
-->
<ivy-module version="2.0" xmlns:ea="http://www.easyant.org">
- <info organisation="org.apache.easyant.tasks" module="partial-jnlp-task"
- status="integration" revision="0.1">
- <description>
- This task is used to modify existing jnlp file.
- </description>
- <ea:build module="build-std-java" revision="0.2"/>
- <ea:property name="project.ivy.instance" value="easyant.ivy.instance"/>
- <ea:property name="shared.resolver" value="easyant-modules"/>
- <ea:property name="release.resolver" value="easyant-modules"/>
- </info>
- <configurations>
- <conf name="default" visibility="public" description="runtime dependencies artifact can be used with this conf"/>
- <conf name="test" visibility="private" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases."/>
- <conf name="provided" visibility="public" description="this is much like compile, but indicates you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive."/>
- </configurations>
- <dependencies>
- <dependency org="org.apache.ant" name="ant" rev="1.7.1" conf="provided->default"/>
- </dependencies>
+ <info organisation="org.apache.easyant.tasks" module="partial-jnlp-task"
+ status="integration" revision="0.1">
+ <description>
+ This task is used to modify existing jnlp file.
+ </description>
+ <ea:build module="build-std-java" revision="0.2"/>
+ <ea:property name="project.ivy.instance" value="easyant.ivy.instance"/>
+ <ea:property name="shared.resolver" value="easyant-modules"/>
+ <ea:property name="release.resolver" value="easyant-modules"/>
+ </info>
+ <configurations>
+ <conf name="default" visibility="public" description="runtime dependencies artifact can be used with this conf"/>
+ <conf name="test" visibility="private" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases."/>
+ <conf name="provided" visibility="public" description="this is much like compile, but indicates you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive."/>
+ </configurations>
+ <dependencies>
+ <dependency org="org.apache.ant" name="ant" rev="1.7.1" conf="provided->default"/>
+ </dependencies>
</ivy-module>