Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 69942 invoked from network); 3 Sep 2007 17:40:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Sep 2007 17:40:21 -0000 Received: (qmail 94369 invoked by uid 500); 3 Sep 2007 17:40:15 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 94301 invoked by uid 500); 3 Sep 2007 17:40:15 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 94290 invoked by uid 99); 3 Sep 2007 17:40:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Sep 2007 10:40:15 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Sep 2007 17:40:06 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id F0B7B1A9856; Mon, 3 Sep 2007 10:39:20 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r572395 [8/11] - in /geronimo/server/trunk: ./ applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/ applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/car/ applications/geron... Date: Mon, 03 Sep 2007 17:39:06 -0000 To: scm@geronimo.apache.org From: djencks@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20070903173920.F0B7B1A9856@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: geronimo/server/trunk/configs/webservices-common/src/main/plan/plan.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/webservices-common/src/main/plan/plan.xml?rev=572395&view=auto ============================================================================== --- geronimo/server/trunk/configs/webservices-common/src/main/plan/plan.xml (added) +++ geronimo/server/trunk/configs/webservices-common/src/main/plan/plan.xml Mon Sep 3 10:38:54 2007 @@ -0,0 +1,86 @@ + + + + + + org.apache.geronimo.configs + webservices-common + 2.1-SNAPSHOT + car + + + + woodstox + wstx-asl + 3.2.1 + jar + classes + + + org.apache.geronimo.modules + geronimo-jaxws + 2.1-SNAPSHOT + jar + classes + + + wsdl4j + wsdl4j + 1.6.1 + jar + classes + + + org.apache.geronimo.configs + xmlbeans + car + + + org.apache.geronimo.configs + j2ee-server + car + + + com.sun.xml.bind + jaxb-impl + 2.0.5 + jar + classes + + + com.sun.xml.messaging.saaj + saaj-impl + 1.3 + jar + classes + + + org.apache.geronimo.configs + j2ee-security + car + + + org.apache.geronimo.modules + geronimo-webservices + 2.1-SNAPSHOT + jar + classes + + + + + + \ No newline at end of file Propchange: geronimo/server/trunk/configs/webservices-common/src/main/plan/plan.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/configs/webservices-common/src/main/plan/plan.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/configs/webservices-common/src/main/plan/plan.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/server/trunk/configs/welcome-jetty/src/main/plan/plan.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/welcome-jetty/src/main/plan/plan.xml?rev=572395&view=auto ============================================================================== --- geronimo/server/trunk/configs/welcome-jetty/src/main/plan/plan.xml (added) +++ geronimo/server/trunk/configs/welcome-jetty/src/main/plan/plan.xml Mon Sep 3 10:38:54 2007 @@ -0,0 +1,36 @@ + + + + + + + org.apache.geronimo.configs + welcome-jetty + 2.1-SNAPSHOT + car + + + + org.apache.geronimo.configs + jasper + car + + + + + + / + \ No newline at end of file Propchange: geronimo/server/trunk/configs/welcome-jetty/src/main/plan/plan.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/configs/welcome-jetty/src/main/plan/plan.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/configs/welcome-jetty/src/main/plan/plan.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/server/trunk/configs/welcome-tomcat/src/main/plan/plan.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/welcome-tomcat/src/main/plan/plan.xml?rev=572395&view=auto ============================================================================== --- geronimo/server/trunk/configs/welcome-tomcat/src/main/plan/plan.xml (added) +++ geronimo/server/trunk/configs/welcome-tomcat/src/main/plan/plan.xml Mon Sep 3 10:38:54 2007 @@ -0,0 +1,36 @@ + + + + + + + org.apache.geronimo.configs + welcome-tomcat + 2.1-SNAPSHOT + car + + + + org.apache.geronimo.configs + jasper + car + + + + + + / + \ No newline at end of file Propchange: geronimo/server/trunk/configs/welcome-tomcat/src/main/plan/plan.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/configs/welcome-tomcat/src/main/plan/plan.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/configs/welcome-tomcat/src/main/plan/plan.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/server/trunk/configs/xmlbeans/src/main/plan/plan.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/xmlbeans/src/main/plan/plan.xml?rev=572395&view=auto ============================================================================== --- geronimo/server/trunk/configs/xmlbeans/src/main/plan/plan.xml (added) +++ geronimo/server/trunk/configs/xmlbeans/src/main/plan/plan.xml Mon Sep 3 10:38:54 2007 @@ -0,0 +1,42 @@ + + + + + + + org.apache.geronimo.configs + xmlbeans + 2.1-SNAPSHOT + car + + + + org.apache.geronimo.configs + jee-specs + car + + + org.apache.xmlbeans + xmlbeans + 2.3.0 + jar + classes + + + + + + \ No newline at end of file Propchange: geronimo/server/trunk/configs/xmlbeans/src/main/plan/plan.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/configs/xmlbeans/src/main/plan/plan.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/configs/xmlbeans/src/main/plan/plan.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Modified: geronimo/server/trunk/maven-plugins/car-maven-plugin/pom.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/pom.xml?rev=572395&r1=572394&r2=572395&view=diff ============================================================================== --- geronimo/server/trunk/maven-plugins/car-maven-plugin/pom.xml (original) +++ geronimo/server/trunk/maven-plugins/car-maven-plugin/pom.xml Mon Sep 3 10:38:54 2007 @@ -109,6 +109,23 @@ 2.0.4 + + javax.xml.bind + jaxb-api + + + + com.sun.xml.bind + jaxb-impl + + + org.apache.geronimo.specs + geronimo-stax-api_1.0_spec + + + woodstox + wstx-asl + @@ -118,6 +135,30 @@ car + + + org.codehaus.mojo + shitty-maven-plugin + 1.0-alpha-1-SNAPSHOT + + + + clean + install + test + + + + + src/it + + */pom.xml + + + + + + Copied: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/j2ee-system/pom.xml (from r572392, geronimo/server/trunk/configs/j2ee-system/pom.xml) URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/j2ee-system/pom.xml?p2=geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/j2ee-system/pom.xml&p1=geronimo/server/trunk/configs/j2ee-system/pom.xml&r1=572392&r2=572395&rev=572395&view=diff ============================================================================== --- geronimo/server/trunk/configs/j2ee-system/pom.xml (original) +++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/j2ee-system/pom.xml Mon Sep 3 10:38:54 2007 @@ -21,7 +21,7 @@ 4.0.0 - + org.apache.geronimo.configs configs @@ -32,9 +32,9 @@ j2ee-system Geronimo Configs :: J2EE System car - + - + org.apache.geronimo.configs geronimo-gbean-deployer @@ -48,7 +48,7 @@ geronimo-common ${version} - + org.apache.geronimo.modules geronimo-system @@ -81,7 +81,7 @@ jline jline - + commons-jexl commons-jexl @@ -92,8 +92,31 @@ ognl + + + javax.xml.bind + jaxb-api + + + com.sun.xml.bind + jaxb-impl + + + org.apache.geronimo.specs + geronimo-stax-api_1.0_spec + + + woodstox + wstx-asl + + + org.apache.geronimo.specs + geronimo-activation_1.1_spec + + + - + @@ -109,7 +132,7 @@ org.apache.geronimo.cli.daemon.DaemonCLI - + @@ -164,11 +187,146 @@ xstream xstream + + + javax.xml.bind + jaxb-api + + + com.sun.xml.bind + jaxb-impl + + + org.apache.geronimo.specs + geronimo-stax-api_1.0_spec + + + woodstox + wstx-asl + + + org.apache.geronimo.specs + geronimo-activation_1.1_spec + ../lib + + Geronimo Core + true + + 2.1-SNAPSHOT + + + 1.5 + + + + com.sun.xml.bind + jaxb-impl + 2.0.5 + jar + classes + + + org.apache.geronimo.specs + geronimo-stax-api_1.0_spec + 1.0 + jar + classes + + + org.apache.geronimo.modules + geronimo-common + 2.1-SNAPSHOT + jar + classes + + + jline + jline + 0.9.91 + jar + classes + + + org.apache.geronimo.modules + geronimo-util + 2.1-SNAPSHOT + jar + classes + + + ognl + ognl + 2.6.9 + jar + classes + + + asm + asm + 2.2.3 + jar + classes + + + commons-jexl + commons-jexl + 1.1 + jar + classes + + + asm + asm-commons + 2.2.3 + jar + classes + + + commons-cli + commons-cli + 1.0 + jar + classes + + + woodstox + wstx-asl + 3.2.1 + jar + classes + + + javax.xml.bind + jaxb-api + 2.0 + jar + classes + + + org.apache.geronimo.specs + geronimo-activation_1.1_spec + 1.0 + jar + classes + + + org.apache.geronimo.modules + geronimo-system + 2.1-SNAPSHOT + jar + classes + + + + http://foo.com + http://bar.com + + - + Added: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/j2ee-system/src/main/plan/plan.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/j2ee-system/src/main/plan/plan.xml?rev=572395&view=auto ============================================================================== --- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/j2ee-system/src/main/plan/plan.xml (added) +++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/j2ee-system/src/main/plan/plan.xml Mon Sep 3 10:38:54 2007 @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + repository/ + + ServerInfo + + + + + + false + + + + + + Repository + + + + + + + ServerInfo + + var/config/config.xml + var/config/config-substitutions.properties + org.apache.geronimo.config.substitution. + + + + + + + + + ArtifactManager + + + var/config/artifact_aliases.properties + + ServerInfo + + + + + + + + + + AttributeManager + + + AttributeStore + AttributeManager + + + ArtifactManager + + + ArtifactResolver + + + + + + var/log/server-log4j.properties + 60 + + ServerInfo + + + + Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/j2ee-system/src/main/plan/plan.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/j2ee-system/src/main/plan/plan.xml ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/j2ee-system/src/main/plan/plan.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/metadatageneration/goals.txt URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/metadatageneration/goals.txt?rev=572395&view=auto ============================================================================== --- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/metadatageneration/goals.txt (added) +++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/metadatageneration/goals.txt Mon Sep 3 10:38:54 2007 @@ -0,0 +1 @@ +org.apache.geronimo.plugins:car-maven-plugin:prepare-metadata Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/metadatageneration/goals.txt ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/metadatageneration/goals.txt ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/metadatageneration/goals.txt ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/metadatageneration/pom.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/metadatageneration/pom.xml?rev=572395&view=auto ============================================================================== --- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/metadatageneration/pom.xml (added) +++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/metadatageneration/pom.xml Mon Sep 3 10:38:54 2007 @@ -0,0 +1,183 @@ + + + + + + + + 4.0.0 + + + org.apache.geronimo.plugins + maven-plugins + 2.1-SNAPSHOT + ../pom.xml + + + org.apache.geronimo.plugins.it + car-maven-plugin + Geronimo Maven2 Plugins :: CAR + jar + + + + + org.apache.geronimo.modules + geronimo-system + ${version} + + + + org.apache.geronimo.modules + geronimo-service-builder + ${version} + + + + org.apache.geronimo.modules + geronimo-deploy-tool + ${version} + + + + + org.apache.geronimo.modules + geronimo-util + + + org.apache.geronimo.modules + geronimo-deploy-jsr88 + + + + + + org.apache.maven + maven-archiver + 2.2 + + + + velocity + velocity + 1.4 + + + + commons-cli + commons-cli + + + + xstream + xstream + + + + xpp3 + xpp3 + + + + commons-logging + commons-logging + + + + + + + + org.apache.geronimo.plugins + car-maven-plugin + + Test + true + + 2.0.1 + 2.1-SNAPSHOT + + + 1.5 + 1.5.2 + + + + xstream + xstream + jar + + + velocity + velocity + 1.4 + jar + true + classes + + + + + + commons-logging + commons-logging + + joke + this is an explanation + + + + + commons-logging + commons-logging + + + + http://foo.com + http://bar.com + + + + META-INF/foo.xml + WEB-INF + bar + + + + + SimpleGBean + this is a comment + false + + + attr + value + + + + + + + + + + + + Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/metadatageneration/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/metadatageneration/pom.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/metadatageneration/pom.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Attribute.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Attribute.java?rev=572395&view=auto ============================================================================== --- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Attribute.java (added) +++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Attribute.java Mon Sep 3 10:38:54 2007 @@ -0,0 +1,54 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + + +package org.apache.geronimo.mavenplugins.car; + +import org.apache.geronimo.system.plugin.model.AttributeType; + +/** + * @version $Rev$ $Date$ + */ +public class Attribute { + + /** + * @parameter + */ + private String name; + /** + * @parameter + */ + private String value; + + + public String getName() { + return name; + } + + public String getValue() { + return value; + } + + public AttributeType toAttributeType() { + AttributeType attributeType = new AttributeType(); + attributeType.setName(name); + attributeType.getContent().add(value); + return attributeType; + } +} Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Attribute.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Attribute.java ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Attribute.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/CopyFile.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/CopyFile.java?rev=572395&view=auto ============================================================================== --- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/CopyFile.java (added) +++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/CopyFile.java Mon Sep 3 10:38:54 2007 @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + + +package org.apache.geronimo.mavenplugins.car; + +import org.apache.geronimo.system.plugin.model.CopyFileType; + +/** + * @version $Rev$ $Date$ + */ +public class CopyFile { + + /** + * @parameter + */ + private String file; + + /** + * @parameter + */ + private String relativeTo; + + /** + * @parameter + */ + private String destDir; + + + public String getFile() { + return file; + } + + public String getRelativeTo() { + return relativeTo; + } + + public String getDestDir() { + return destDir; + } + + CopyFileType toCopyFileType() { + CopyFileType copyFileType = new CopyFileType(); + copyFileType.setValue(file); + copyFileType.setRelativeTo(relativeTo); + copyFileType.setDestDir(destDir); + return copyFileType; + } +} Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/CopyFile.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/CopyFile.java ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/CopyFile.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Dependency.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Dependency.java?rev=572395&view=auto ============================================================================== --- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Dependency.java (added) +++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Dependency.java Mon Sep 3 10:38:54 2007 @@ -0,0 +1,60 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + + +package org.apache.geronimo.mavenplugins.car; + +import org.apache.geronimo.kernel.repository.ImportType; +import org.apache.geronimo.system.plugin.model.DependencyType; + +/** + * @version $Rev$ $Date$ + */ +public class Dependency extends ModuleId { + + /** + * @parameter + */ + private boolean start; + + + public boolean isStart() { + return start; + } + + public DependencyType toDependencyType() { + DependencyType dependency = new DependencyType(); + dependency.setGroupId(groupId); + dependency.setArtifactId(artifactId); + dependency.setVersion(version); + dependency.setType(type); + dependency.setStart(start); + return dependency; + } + + public org.apache.geronimo.kernel.repository.Dependency toDependency() { + org.apache.geronimo.kernel.repository.Artifact artifact = new org.apache.geronimo.kernel.repository.Artifact(groupId, artifactId, version, type); + ImportType importType = getImport() == null? ImportType.ALL: (ImportType) ImportType.getByName(getImport()); + return new org.apache.geronimo.kernel.repository.Dependency(artifact, importType); + } + + public String toString() { + return groupId + ":" + artifactId + ":" + version + ":" + type; + } +} Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Dependency.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Dependency.java ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Dependency.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Gbean.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Gbean.java?rev=572395&view=auto ============================================================================== --- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Gbean.java (added) +++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Gbean.java Mon Sep 3 10:38:54 2007 @@ -0,0 +1,66 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + + +package org.apache.geronimo.mavenplugins.car; + +import java.util.List; + +import org.apache.geronimo.system.plugin.model.GbeanType; + +/** + * @version $Rev$ $Date$ + */ +public class Gbean { + /** + * @parameter + */ + private String name; + /** + * @parameter + */ + private String comment; + /** + * @parameter + */ + private boolean load; + /** + * @parameter + */ + private List attributes; + + public String getName() { + return name; + } + + public List getAttributes() { + return attributes; + } + + GbeanType toGBeanType() { + GbeanType gbeanType = new GbeanType(); + gbeanType.setName(name); + gbeanType.setComment(comment); + gbeanType.setLoad(load); + for (Attribute attribute : attributes) { + gbeanType.getAttributeOrReference().add(attribute.toAttributeType()); + } + return gbeanType; + } +} Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Gbean.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Gbean.java ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Gbean.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ModuleId.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ModuleId.java?rev=572395&view=auto ============================================================================== --- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ModuleId.java (added) +++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ModuleId.java Mon Sep 3 10:38:54 2007 @@ -0,0 +1,84 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + + +package org.apache.geronimo.mavenplugins.car; + +import org.apache.geronimo.system.plugin.model.ArtifactType; + +/** + * @version $Rev$ $Date$ + */ +public class ModuleId { + /** + * @parameter + */ + protected String groupId; + /** + * @parameter + */ + protected String artifactId; + /** + * @parameter + */ + protected String version; + /** + * @parameter + */ + protected String type; + + private String importType; + + public String getGroupId() { + return groupId; + } + + public String getArtifactId() { + return artifactId; + } + + public String getVersion() { + return version; + } + + public String getType() { + return type; + } + + + /** + * @parameter + */ + public void setImport(String importType) { + this.importType = importType; + } + + public String getImport() { + return importType; + } + + public ArtifactType toArtifactType() { + ArtifactType artifact = new ArtifactType(); + artifact.setGroupId(groupId); + artifact.setArtifactId(artifactId); + artifact.setVersion(version); + artifact.setType(type); + return artifact; + } +} Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ModuleId.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ModuleId.java ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ModuleId.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java?rev=572395&r1=572394&r2=572395&view=diff ============================================================================== --- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java (original) +++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java Mon Sep 3 10:38:54 2007 @@ -175,7 +175,7 @@ /** * The plan file for the CAR. * - * @parameter expression="${project.build.directory}/plan/plan.xml" + * @parameter expression="${project.build.directory}/resources/META-INF/plan.xml" * @required */ private File planFile = null; @@ -232,6 +232,10 @@ private boolean bootstrap = false; /** + * @parameter expression="${project.build.directory}/resources" + */ + private File resourcesDir; + /** * Holds a local repo lookup instance so that we can use the current project to resolve. * This is required since the Kernel used to deploy is cached. */ @@ -355,6 +359,10 @@ // Include the optional classes.resources if (classesDirectory.isDirectory()) { archiver.getArchiver().addDirectory(classesDirectory); + } + + if (resourcesDir.isDirectory()) { + archiver.getArchiver().addDirectory(resourcesDir); } // Modified: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PlanProcessorMojo.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PlanProcessorMojo.java?rev=572395&r1=572394&r2=572395&view=diff ============================================================================== --- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PlanProcessorMojo.java (original) +++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PlanProcessorMojo.java Mon Sep 3 10:38:54 2007 @@ -21,8 +21,7 @@ import java.io.File; import java.io.StringWriter; - -import java.util.Iterator; +import java.util.Collections; import java.util.LinkedHashSet; import java.util.List; import java.util.Properties; @@ -32,17 +31,12 @@ import org.apache.geronimo.deployment.service.EnvironmentBuilder; import org.apache.geronimo.deployment.xbeans.ArtifactType; import org.apache.geronimo.deployment.xbeans.EnvironmentType; -import org.apache.geronimo.kernel.repository.Environment; import org.apache.geronimo.kernel.repository.Artifact; -import org.apache.geronimo.kernel.repository.ImportType; - -import org.apache.maven.model.Dependency; - +import org.apache.geronimo.kernel.repository.Environment; import org.apache.velocity.Template; import org.apache.velocity.VelocityContext; import org.apache.velocity.app.Velocity; import org.apache.velocity.app.VelocityEngine; - import org.apache.xmlbeans.XmlCursor; import org.apache.xmlbeans.XmlObject; import org.apache.xmlbeans.XmlOptions; @@ -66,13 +60,13 @@ private static final QName ENVIRONMENT_QNAME = new QName("http://geronimo.apache.org/xml/ns/deployment-1.2", "environment"); /** - * @parameter expression="${basedir}/src/plan" + * @parameter expression="${basedir}/src/main/plan" * @required */ protected File sourceDir = null; /** - * @parameter expression="${project.build.directory}/plan" + * @parameter expression="${project.build.directory}/resources/META-INF" * @required */ protected File targetDir = null; @@ -84,18 +78,23 @@ protected String planFileName = null; /** - * @parameter expression="${project.build.directory}/plan/plan.xml" + * @parameter expression="${project.build.directory}/resources/META-INF/plan.xml" * @required */ protected File targetFile = null; + /** + * @parameter + */ + private List dependencies = Collections.emptyList(); + private VelocityContext createContext() { VelocityContext context = new VelocityContext(); // Load properties, It inherits them all! Properties props = project.getProperties(); - for (Iterator iter = props.keySet().iterator(); iter.hasNext();) { - String key = (String) iter.next(); + for (Object o : props.keySet()) { + String key = (String) o; String value = props.getProperty(key); log.debug("Setting " + key + "=" + value); @@ -136,7 +135,7 @@ XmlObject doc = XmlObject.Factory.parse(plan); XmlCursor xmlCursor = doc.newCursor(); - LinkedHashSet dependencies = toDependencies(); + LinkedHashSet dependencies = toDependencies(); Artifact configId = new Artifact(project.getGroupId(), project.getArtifactId(), project.getVersion(), "car"); try { @@ -162,7 +161,7 @@ } } - void mergeEnvironment(final XmlCursor xmlCursor, final Artifact configId, final LinkedHashSet dependencies) { + void mergeEnvironment(final XmlCursor xmlCursor, final Artifact configId, final LinkedHashSet dependencies) { moveToFirstStartElement(xmlCursor); boolean atLeastOneChild = xmlCursor.toFirstChild(); @@ -239,72 +238,15 @@ } } - private LinkedHashSet toDependencies() { - List artifacts = project.getDependencies(); - LinkedHashSet dependencies = new LinkedHashSet(); - - Iterator iter = artifacts.iterator(); - while (iter.hasNext()) { - Dependency dependency = (Dependency) iter.next(); - - // - // HACK: Does not appear that we can get the "extention" status of a dependency, - // so specifically exclude the ones that we know about, like genesis - // - - if (dependency.getGroupId().startsWith("org.apache.geronimo.genesis")) { - continue; - } + private LinkedHashSet toDependencies() { + LinkedHashSet dependencies = new LinkedHashSet(); - org.apache.geronimo.kernel.repository.Dependency gdep = toGeronimoDependency(dependency); - if (gdep != null) { + for (Dependency dependency : this.dependencies) { + org.apache.geronimo.kernel.repository.Dependency gdep = dependency.toDependency(); dependencies.add(gdep); - } } return dependencies; - } - - private static org.apache.geronimo.kernel.repository.Dependency toGeronimoDependency(final Dependency dependency) { - Artifact artifact = toGeronimoArtifact(dependency); - String type = dependency.getType(); - String scope = dependency.getScope(); - String groupId = dependency.getGroupId(); - - //!"org.apache.geronimo.specs".equals(groupId) jacc spec needed in plan.xml - if ("jar".equalsIgnoreCase(type) && !"junit".equals(groupId) && (scope == null || !scope.equals("provided"))) { - if (dependency.getVersion() != null) { - artifact = new Artifact( - artifact.getGroupId(), - artifact.getArtifactId(), - dependency.getVersion(), - artifact.getType()); - } - return new org.apache.geronimo.kernel.repository.Dependency(artifact, ImportType.CLASSES); - } - else if ("car".equalsIgnoreCase(type) && "runtime".equalsIgnoreCase(scope)) { - return new org.apache.geronimo.kernel.repository.Dependency(artifact, ImportType.CLASSES); - } - //doesn't work -// else if ("car".equalsIgnoreCase(type) && "provided".equalsIgnoreCase(scope)) { -// return new org.apache.geronimo.kernel.repository.Dependency(artifact, ImportType.CLASSES); -// } - else if ("car".equalsIgnoreCase(type) && (scope == null || "compile".equalsIgnoreCase(scope))) { //parent - return new org.apache.geronimo.kernel.repository.Dependency(artifact, ImportType.ALL); - } - else { - // not one of ours - return null; - } - } - - private static Artifact toGeronimoArtifact(final Dependency dependency) { - String groupId = dependency.getGroupId(); - String artifactId = dependency.getArtifactId(); - String version = null; - String type = dependency.getType(); - - return new Artifact(groupId, artifactId, version, type); } interface Inserter { Added: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginMetadataGeneratorMojo.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginMetadataGeneratorMojo.java?rev=572395&view=auto ============================================================================== --- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginMetadataGeneratorMojo.java (added) +++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginMetadataGeneratorMojo.java Mon Sep 3 10:38:54 2007 @@ -0,0 +1,175 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + + +package org.apache.geronimo.mavenplugins.car; + +import java.io.File; +import java.io.FileOutputStream; +import java.util.Collections; +import java.util.List; + +import org.apache.geronimo.deployment.xbeans.EnvironmentType; +import org.apache.geronimo.system.plugin.PluginInstallerGBean; +import org.apache.geronimo.system.plugin.model.ArtifactType; +import org.apache.geronimo.system.plugin.model.LicenseType; +import org.apache.geronimo.system.plugin.model.PluginArtifactType; +import org.apache.geronimo.system.plugin.model.PluginType; +import org.apache.maven.model.License; + +/** + * Add dependencies to a plan and process with velocity + * + * @goal prepare-metadata + * + * @version $Rev$ $Date$ + */ +public class PluginMetadataGeneratorMojo + extends AbstractCarMojo +{ + + /** + * @parameter expression="${project.build.directory}/resources/META-INF" + * @required + */ + protected File targetDir = null; + + /** + * @parameter default-value="geronimo-plugin.xml" + * @required + */ + protected String pluginMetadataFileName = null; + + /** + * @parameter expression="${project.build.directory}/resources/META-INF/geronimo-plugin.xml" + * @required + */ + protected File targetFile = null; + + /** + * @parameter default-value="false" + */ + private boolean osiApproved; + + /** + * @parameter + */ + private List geronimoVersions = Collections.emptyList(); + + /** + * @parameter + */ + private List jvmVersions = Collections.emptyList(); + + /** + * @parameter + */ + private String category; + + /** + * @parameter + */ + private List prerequisites = Collections.emptyList(); + + /** + * @parameter + */ + private List dependencies = Collections.emptyList(); + + /** + * @parameter + */ + private List obsoletes = Collections.emptyList(); + + /** + * @parameter + */ + private List sourceRepositories = Collections.emptyList(); + + /** + * @parameter + */ + private List copyFiles = Collections.emptyList(); + /** + * @parameter + */ + private List gbeans; + + protected void doExecute() throws Exception { + + PluginType metadata = new PluginType(); + metadata.setName(project.getName()); + metadata.setAuthor(project.getOrganization().getName()); + metadata.setUrl(project.getOrganization().getUrl()); + metadata.setDescription(project.getDescription()); + metadata.setCategory(category); + + for (Object licenseObj: project.getLicenses()) { + License license = (License) licenseObj; + LicenseType licenseType = new LicenseType(); + licenseType.setValue(license.getName()); + licenseType.setOsiApproved(osiApproved); + metadata.getLicense().add(licenseType); + } + + PluginArtifactType instance = new PluginArtifactType(); + metadata.getPluginArtifact().add(instance); + + ArtifactType artifactType = new ArtifactType(); + artifactType.setGroupId(project.getGroupId()); + artifactType.setArtifactId(project.getArtifactId()); + artifactType.setVersion(project.getVersion()); + artifactType.setType(project.getArtifact().getType()); + instance.setModuleId(artifactType); + + instance.getGeronimoVersion().addAll(geronimoVersions); + instance.getJvmVersion().addAll(jvmVersions); + for (Prerequisite prerequisite: prerequisites) { + instance.getPrerequisite().add(prerequisite.toPrerequisiteType()); + } + for (Dependency dependency: dependencies) { + instance.getDependency().add(dependency.toDependencyType()); + } + for (ModuleId obsolete: obsoletes) { + instance.getObsoletes().add(obsolete.toArtifactType()); + } + + instance.getSourceRepository().addAll(sourceRepositories); + for (CopyFile copyFile: copyFiles) { + instance.getCopyFile().add(copyFile.toCopyFileType()); + } + if (gbeans != null && gbeans.size() > 0) { + PluginArtifactType.ConfigXmlContent configXmlContent = new PluginArtifactType.ConfigXmlContent(); + for (Gbean gbean: gbeans) { + configXmlContent.getGbean().add(gbean.toGBeanType()); + } + instance.setConfigXmlContent(configXmlContent); + } + + targetDir.mkdirs(); + FileOutputStream out = new FileOutputStream(targetFile); + try { + PluginInstallerGBean.writePluginMetadata(metadata, out); + } finally { + out.close(); + } + getProject().getResources().add(targetFile); + } + +} Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginMetadataGeneratorMojo.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginMetadataGeneratorMojo.java ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginMetadataGeneratorMojo.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Prerequisite.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Prerequisite.java?rev=572395&view=auto ============================================================================== --- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Prerequisite.java (added) +++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Prerequisite.java Mon Sep 3 10:38:54 2007 @@ -0,0 +1,66 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + + +package org.apache.geronimo.mavenplugins.car; + +import org.apache.geronimo.system.plugin.model.PrerequisiteType; + +/** + * @version $Rev$ $Date$ + */ +public class Prerequisite { + + /** + * @parameter + */ + private ModuleId id; + + /** + * @parameter + */ + private String resourceType; + + /** + * @parameter + */ + private String description; + + + public ModuleId getId() { + return id; + } + + public String getResourceType() { + return resourceType; + } + + public String getDescription() { + return description; + } + + PrerequisiteType toPrerequisiteType() { + PrerequisiteType prereq = new PrerequisiteType(); + prereq.setId(id.toArtifactType()); + prereq.setResourceType(resourceType); + prereq.setDescription(description); + return prereq; + } + +} Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Prerequisite.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Prerequisite.java ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Prerequisite.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ValidateConfigurationMojo.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ValidateConfigurationMojo.java?rev=572395&view=auto ============================================================================== --- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ValidateConfigurationMojo.java (added) +++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ValidateConfigurationMojo.java Mon Sep 3 10:38:54 2007 @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + + +package org.apache.geronimo.mavenplugins.car; + +import java.util.List; +import java.util.Collections; + + + +/** + * @goal validate-configuration + + * @version $Rev$ $Date$ + */ +public class ValidateConfigurationMojo extends AbstractCarMojo { + + /** + * @parameter + */ + private List dependencies = Collections.emptyList(); + + + public void doExecute() { + for (Dependency dependency: dependencies) { + checkForMatch(dependency); + } + } + + private void checkForMatch(Dependency dependency) { + for (Object o: getProject().getDependencies()) { + org.apache.maven.model.Dependency test = (org.apache.maven.model.Dependency) o; + if (matches(test, dependency)) { + return; + } + } + throw new IllegalStateException("No match for dependency: " + dependency); + + } + + private boolean matches(org.apache.maven.model.Dependency test, Dependency dependency) { + if (dependency.getGroupId() != null && !dependency.getGroupId().equals(test.getGroupId())) { + return false; + } + if (dependency.getArtifactId() != null && !dependency.getArtifactId().equals(test.getArtifactId())) { + return false; + } + if (dependency.getVersion() != null && !dependency.getVersion().equals(test.getVersion())) { + return false; + } + if (dependency.getType() != null && !dependency.getType().equals(test.getType())) { + return false; + } + return true; + } + +} Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ValidateConfigurationMojo.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ValidateConfigurationMojo.java ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ValidateConfigurationMojo.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/resources/META-INF/plexus/components.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/resources/META-INF/plexus/components.xml?rev=572395&r1=572394&r2=572395&view=diff ============================================================================== --- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/resources/META-INF/plexus/components.xml (original) +++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/resources/META-INF/plexus/components.xml Mon Sep 3 10:38:54 2007 @@ -36,7 +36,9 @@ default org.apache.maven.plugins:maven-resources-plugin:resources - org.apache.geronimo.plugins:car-maven-plugin:prepare-plan + org.apache.geronimo.plugins:car-maven-plugin:validate-configuration, + org.apache.geronimo.plugins:car-maven-plugin:prepare-plan, + org.apache.geronimo.plugins:car-maven-plugin:prepare-metadata org.apache.geronimo.plugins:car-maven-plugin:package org.apache.maven.plugins:maven-install-plugin:install org.apache.maven.plugins:maven-deploy-plugin:deploy