You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2017/12/20 09:33:29 UTC

[maven-ear-plugin] 12/45: Forgot to remove the module package.

This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-ear-plugin-2.0
in repository https://gitbox.apache.org/repos/asf/maven-ear-plugin.git

commit d1e74bff55ff2ac86086c1c0d08cd3003540ab01
Author: Kenney Westerhof <ke...@apache.org>
AuthorDate: Wed Aug 3 07:21:15 2005 +0000

    Forgot to remove the module package.
    
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk/maven-plugins/maven-ear-plugin@227177 13f79535-47bb-0310-9956-ffa450edef68
---
 .../maven/plugin/ear/module/AbstractEarModule.java |  53 -----------
 .../apache/maven/plugin/ear/module/EarModule.java  |  54 -----------
 .../maven/plugin/ear/module/EarModuleFactory.java  | 101 ---------------------
 .../apache/maven/plugin/ear/module/EjbModule.java  |  47 ----------
 .../apache/maven/plugin/ear/module/JavaModule.java |  47 ----------
 .../apache/maven/plugin/ear/module/RarModule.java  |  47 ----------
 .../apache/maven/plugin/ear/module/WebModule.java  |  64 -------------
 7 files changed, 413 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugin/ear/module/AbstractEarModule.java b/src/main/java/org/apache/maven/plugin/ear/module/AbstractEarModule.java
deleted file mode 100644
index 1456ebf..0000000
--- a/src/main/java/org/apache/maven/plugin/ear/module/AbstractEarModule.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package org.apache.maven.plugin.ear.module;
-
-/*
- * Copyright 2001-2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import org.apache.maven.artifact.Artifact;
-
-/**
- * A base implementation of an {@link EarModule}.
- *
- * @author Stephane Nicoll <st...@gmail.com>
- * @author $Author: sni $ (last edit)
- * @version $Revision: 1.2 $
- */
-public abstract class AbstractEarModule
-    implements EarModule
-{
-
-    protected static final String MODULE_ELEMENT = "module";
-
-    private final String uri;
-
-    private final Artifact artifact;
-
-    AbstractEarModule( String uri, Artifact a )
-    {
-        this.uri = uri;
-        this.artifact = a;
-    }
-
-    public Artifact getArtifact()
-    {
-        return artifact;
-    }
-
-    public String getUri()
-    {
-        return uri;
-    }
-}
diff --git a/src/main/java/org/apache/maven/plugin/ear/module/EarModule.java b/src/main/java/org/apache/maven/plugin/ear/module/EarModule.java
deleted file mode 100644
index 06ac2d4..0000000
--- a/src/main/java/org/apache/maven/plugin/ear/module/EarModule.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package org.apache.maven.plugin.ear.module;
-
-/*
- * Copyright 2001-2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import org.apache.maven.artifact.Artifact;
-import org.codehaus.plexus.util.xml.XMLWriter;
-
-/**
- * The ear module interface.
- *
- * @author Stephane Nicoll <st...@gmail.com>
- * @author $Author: sni $ (last edit)
- * @version $Revision: 1.2 $
- */
-public interface EarModule
-{
-
-    /**
-     * Returns the <tt>Artifact</tt> representing this module.
-     *
-     * @return the <tt>Artifact</tt>
-     */
-    public Artifact getArtifact();
-
-    /**
-     * Returns the <tt>URI</tt> fo the Ear module.
-     *
-     * @return the <tt>URI</tt>
-     */
-    public String getUri();
-
-    /**
-     * Appends the <tt>XML</tt> representation of this module.
-     *
-     * @param writer  the writer to use
-     * @param version the version of the <tt>application.xml</tt> file
-     */
-    public void appendModule( XMLWriter writer, String version );
-
-}
diff --git a/src/main/java/org/apache/maven/plugin/ear/module/EarModuleFactory.java b/src/main/java/org/apache/maven/plugin/ear/module/EarModuleFactory.java
deleted file mode 100644
index 896de43..0000000
--- a/src/main/java/org/apache/maven/plugin/ear/module/EarModuleFactory.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package org.apache.maven.plugin.ear.module;
-
-/*
- * Copyright 2001-2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import org.apache.maven.artifact.Artifact;
-
-/**
- * Builds an {@link EarModule} based on an <tt>Artifact</tt>.
- *
- * @author Stephane Nicoll <st...@gmail.com>
- * @author $Author: sni $ (last edit)
- * @version $Revision: 1.2 $
- */
-public final class EarModuleFactory
-{
-
-    /**
-     * Creates a new {@link EarModule} based on the specified <tt>Artifact</tt>.
-     *
-     * @param artifact the artifact
-     * @return an ear module for this artifact
-     */
-    public static final EarModule newEarModule( Artifact artifact )
-    {
-        if ( "jar".equals( artifact.getType() ) || "ejb-client".equals( artifact.getType() ) )
-        {
-            return new JavaModule( getUri( artifact ), artifact );
-        }
-        else if ( "ejb".equals( artifact.getType() ) )
-        {
-            return new EjbModule( getUri( artifact ), artifact );
-        }
-        else if ( "rar".equals( artifact.getType() ) )
-        {
-            return new RarModule( getUri( artifact ), artifact );
-        }
-        else if ( "war".equals( artifact.getType() ) )
-        {
-            return new WebModule( getUri( artifact ), artifact, getContextRoot( artifact ) );
-        }
-        else
-        {
-            throw new IllegalStateException( "Could not handle artifact type[" + artifact.getType() + "]" );
-        }
-    }
-
-    /**
-     * Returns the URI for the specifed <tt>Artifact</tt>.
-     *
-     * @param artifact the artifact
-     * @return the URI of this artifact in the EAR file
-     * @TODO handle custom URI - for now it returns the file name
-     */
-    private static String getUri( Artifact artifact )
-    {
-		// FIXME: this should be in ArtifactHandler
-        if ( "ejb-client".equals( artifact.getType() ) )
-        {
-            return artifact.getArtifactId() + "-" + artifact.getVersion() +
-				"-client." + artifact.getArtifactHandler().getExtension();
-        }
-        else
-        {
-            return artifact.getFile().getName();
-        }
-    }
-
-    /**
-     * Returns the context root for the specifed war <tt>Artifact</tt>.
-     *
-     * @param artifact the artifact
-     * @return the context root of the artifact
-     * @TODO handle custom context root - for now it returns the artifact Id
-     */
-    private static String getContextRoot( Artifact artifact )
-    {
-        if ( artifact.getType().equals( "war" ) )
-        {
-            return "/" + artifact.getArtifactId();
-        }
-        else
-        {
-            throw new IllegalStateException(
-                "Could not get context-root for an artifact with type[" + artifact.getType() + "]" );
-        }
-    }
-}
diff --git a/src/main/java/org/apache/maven/plugin/ear/module/EjbModule.java b/src/main/java/org/apache/maven/plugin/ear/module/EjbModule.java
deleted file mode 100644
index 10e229e..0000000
--- a/src/main/java/org/apache/maven/plugin/ear/module/EjbModule.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.apache.maven.plugin.ear.module;
-
-/*
- * Copyright 2001-2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import org.apache.maven.artifact.Artifact;
-import org.codehaus.plexus.util.xml.XMLWriter;
-
-/**
- * The {@link EarModule} implementation for an EJB module.
- *
- * @author Stephane Nicoll <st...@gmail.com>
- * @author $Author: sni $ (last edit)
- * @version $Revision: 1.2 $
- */
-public class EjbModule
-    extends AbstractEarModule
-{
-    protected static final String EJB_MODULE = "ejb";
-
-    EjbModule( String uri, Artifact a )
-    {
-        super( uri, a );
-    }
-
-    public void appendModule( XMLWriter writer, String version )
-    {
-        writer.startElement( MODULE_ELEMENT );
-        writer.startElement( EJB_MODULE );
-        writer.writeText( getUri() );
-        writer.endElement();
-        writer.endElement();
-    }
-}
diff --git a/src/main/java/org/apache/maven/plugin/ear/module/JavaModule.java b/src/main/java/org/apache/maven/plugin/ear/module/JavaModule.java
deleted file mode 100644
index 5e7fc6a..0000000
--- a/src/main/java/org/apache/maven/plugin/ear/module/JavaModule.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.apache.maven.plugin.ear.module;
-
-/*
- * Copyright 2001-2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import org.apache.maven.artifact.Artifact;
-import org.codehaus.plexus.util.xml.XMLWriter;
-
-/**
- * The {@link EarModule} implementation for a J2EE client module.
- *
- * @author Stephane Nicoll <st...@gmail.com>
- * @author $Author: sni $ (last edit)
- * @version $Revision: 1.2 $
- */
-public class JavaModule
-    extends AbstractEarModule
-{
-    protected static final String JAVA_MODULE = "java";
-
-    JavaModule( String uri, Artifact a )
-    {
-        super( uri, a );
-    }
-
-    public void appendModule( XMLWriter writer, String version )
-    {
-        writer.startElement( MODULE_ELEMENT );
-        writer.startElement( JAVA_MODULE );
-        writer.writeText( getUri() );
-        writer.endElement();
-        writer.endElement();
-    }
-}
diff --git a/src/main/java/org/apache/maven/plugin/ear/module/RarModule.java b/src/main/java/org/apache/maven/plugin/ear/module/RarModule.java
deleted file mode 100644
index 7690b0d..0000000
--- a/src/main/java/org/apache/maven/plugin/ear/module/RarModule.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.apache.maven.plugin.ear.module;
-
-/*
- * Copyright 2001-2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import org.apache.maven.artifact.Artifact;
-import org.codehaus.plexus.util.xml.XMLWriter;
-
-/**
- * The {@link EarModule} implementation for an J2EE connector module.
- *
- * @author Stephane Nicoll <st...@gmail.com>
- * @author $Author: sni $ (last edit)
- * @version $Revision: 1.2 $
- */
-public class RarModule
-    extends AbstractEarModule
-{
-    protected static final String RAR_MODULE = "connector";
-
-    RarModule( String uri, Artifact a )
-    {
-        super( uri, a );
-    }
-
-    public void appendModule( XMLWriter writer, String version )
-    {
-        writer.startElement( MODULE_ELEMENT );
-        writer.startElement( RAR_MODULE );
-        writer.writeText( getUri() );
-        writer.endElement();
-        writer.endElement();
-    }
-}
diff --git a/src/main/java/org/apache/maven/plugin/ear/module/WebModule.java b/src/main/java/org/apache/maven/plugin/ear/module/WebModule.java
deleted file mode 100644
index 820324a..0000000
--- a/src/main/java/org/apache/maven/plugin/ear/module/WebModule.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package org.apache.maven.plugin.ear.module;
-
-/*
- * Copyright 2001-2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import org.apache.maven.artifact.Artifact;
-import org.codehaus.plexus.util.xml.XMLWriter;
-
-/**
- * The {@link EarModule} implementation for an Web application module.
- *
- * @author Stephane Nicoll <st...@gmail.com>
- * @author $Author: sni $ (last edit)
- * @version $Revision: 1.2 $
- */
-public class WebModule
-    extends AbstractEarModule
-{
-    protected static final String WEB_MODULE = "web";
-
-    protected static final String WEB_URI_FIELD = "web-uri";
-
-    protected static final String CONTEXT_ROOT_FIELD = "context-root";
-
-    private final String contextRoot;
-
-    WebModule( String uri, Artifact a, String contextRoot )
-    {
-        super( uri, a );
-        this.contextRoot = contextRoot;
-    }
-
-    public void appendModule( XMLWriter writer, String version )
-    {
-        writer.startElement( MODULE_ELEMENT );
-        writer.startElement( WEB_MODULE );
-        writer.startElement( WEB_URI_FIELD );
-        writer.writeText( getUri() );
-        writer.endElement(); // web-uri
-        writer.startElement( CONTEXT_ROOT_FIELD );
-        writer.writeText( getContextRoot() );
-        writer.endElement(); // context-root
-        writer.endElement(); // web
-        writer.endElement(); // module
-    }
-
-    public String getContextRoot()
-    {
-        return contextRoot;
-    }
-}

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.