| Class | Line # | Actions | |||||
|---|---|---|---|---|---|---|---|
| MavenCoreExtension | 33 | 3 | 0% | 3 | 2 |
| 1 | /* | |
| 2 | * See the NOTICE file distributed with this work for additional | |
| 3 | * information regarding copyright ownership. | |
| 4 | * | |
| 5 | * This is free software; you can redistribute it and/or modify it | |
| 6 | * under the terms of the GNU Lesser General Public License as | |
| 7 | * published by the Free Software Foundation; either version 2.1 of | |
| 8 | * the License, or (at your option) any later version. | |
| 9 | * | |
| 10 | * This software is distributed in the hope that it will be useful, | |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 13 | * Lesser General Public License for more details. | |
| 14 | * | |
| 15 | * You should have received a copy of the GNU Lesser General Public | |
| 16 | * License along with this software; if not, write to the Free | |
| 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | |
| 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. | |
| 19 | */ | |
| 20 | package org.xwiki.extension.repository.internal.core; | |
| 21 | ||
| 22 | import java.net.URL; | |
| 23 | ||
| 24 | import org.xwiki.extension.Extension; | |
| 25 | import org.xwiki.extension.repository.internal.MavenExtension; | |
| 26 | ||
| 27 | /** | |
| 28 | * Extends {@link DefaultCoreExtension} with Maven related informations. | |
| 29 | * | |
| 30 | * @version $Id: b33989e770378c5352b81007da688a917784a427 $ | |
| 31 | * @since 4.0M1 | |
| 32 | */ | |
| 33 | public class MavenCoreExtension extends DefaultCoreExtension implements MavenExtension | |
| 34 | { | |
| 35 | /** | |
| 36 | * The name of the property containing the artifact id. | |
| 37 | */ | |
| 38 | private static final String PKEY_MAVEN_ARTIFACTID = "maven.artifactId"; | |
| 39 | ||
| 40 | /** | |
| 41 | * The name of the property containing the group id. | |
| 42 | */ | |
| 43 | private static final String PKEY_MAVEN_GROUPID = "maven.groupId"; | |
| 44 | ||
| 45 | /** | |
| 46 | * @param repository the core extension repository | |
| 47 | * @param url the core extension URL | |
| 48 | * @param extension the extension to copy | |
| 49 | */ | |
| 50 | 10899 | public MavenCoreExtension(DefaultCoreExtensionRepository repository, URL url, Extension extension) |
| 51 | { | |
| 52 | 10899 | super(repository, url, extension); |
| 53 | } | |
| 54 | ||
| 55 | /** | |
| 56 | * @return the Maven artifact id | |
| 57 | */ | |
| 58 | 10361 | @Override |
| 59 | public String getMavenArtifactId() | |
| 60 | { | |
| 61 | 10361 | return (String) getProperty(PKEY_MAVEN_ARTIFACTID); |
| 62 | } | |
| 63 | ||
| 64 | /** | |
| 65 | * @return the Maven artifact id | |
| 66 | */ | |
| 67 | 0 | @Override |
| 68 | public String getMavenGroupId() | |
| 69 | { | |
| 70 | 0 | return (String) getProperty(PKEY_MAVEN_GROUPID); |
| 71 | } | |
| 72 | } |