1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.extension.repository.internal.core

File MavenCoreExtension.java

 

Coverage histogram

../../../../../../img/srcFileCovDistChart7.png
64% of files have more coverage

Code metrics

0
3
3
1
72
23
3
1
1
3
1

Classes

Class Line # Actions
MavenCoreExtension 33 3 0% 3 2
0.666666766.7%
 

Contributing tests

This file is covered by 1 test. .

Source view

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 toggle 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 toggle @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 toggle @Override
68    public String getMavenGroupId()
69    {
70  0 return (String) getProperty(PKEY_MAVEN_GROUPID);
71    }
72    }