mirror of https://github.com/apache/archiva.git
add some checks and notes
git-svn-id: https://svn.apache.org/repos/asf/maven/repository-manager/trunk@412024 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ce80e898d9
commit
04575ed5bc
|
@ -15,7 +15,7 @@
|
|||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<parent>
|
||||
<groupId>org.apache.maven.repository</groupId>
|
||||
<artifactId>maven-repository-manager</artifactId>
|
||||
|
@ -38,4 +38,20 @@
|
|||
<artifactId>plexus-container-default</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<instrumentation>
|
||||
<!-- TODO: should this module have tests? -->
|
||||
<excludes>
|
||||
<exclude>**/**</exclude>
|
||||
</excludes>
|
||||
</instrumentation>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.apache.maven.repository</groupId>
|
||||
|
@ -32,6 +32,18 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<instrumentation>
|
||||
<!-- TODO: should this module have tests? -->
|
||||
<excludes>
|
||||
<exclude>**/**</exclude>
|
||||
</excludes>
|
||||
</instrumentation>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<pluginRepositories>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<parent>
|
||||
<groupId>org.apache.maven.repository</groupId>
|
||||
<artifactId>maven-repository-manager</artifactId>
|
||||
|
@ -47,4 +47,19 @@
|
|||
<artifactId>wagon-provider-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<check>
|
||||
<!-- TODO: increase coverage -->
|
||||
<totalLineRate>60</totalLineRate>
|
||||
<totalBranchRate>75</totalBranchRate>
|
||||
</check>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
@ -52,6 +52,7 @@ import java.util.Map;
|
|||
/**
|
||||
* @author Edwin Punzalan
|
||||
* @plexus.component role="org.apache.maven.repository.proxy.ProxyManager"
|
||||
* @todo too much of wagon manager is reproduced here because checksums need to be downloaded separately - is that necessary?
|
||||
*/
|
||||
public class DefaultProxyManager
|
||||
extends AbstractLogEnabled
|
||||
|
@ -289,17 +290,13 @@ public class DefaultProxyManager
|
|||
private ArtifactRepositoryPolicy getReleasesPolicy()
|
||||
{
|
||||
//todo get policy configuration from ProxyConfiguration
|
||||
ArtifactRepositoryPolicy repositoryPolicy = new ArtifactRepositoryPolicy();
|
||||
|
||||
return repositoryPolicy;
|
||||
return new ArtifactRepositoryPolicy();
|
||||
}
|
||||
|
||||
private ArtifactRepositoryPolicy getSnapshotsPolicy()
|
||||
{
|
||||
//todo get policy configuration from ProxyConfiguration
|
||||
ArtifactRepositoryPolicy repositoryPolicy = new ArtifactRepositoryPolicy();
|
||||
|
||||
return repositoryPolicy;
|
||||
return new ArtifactRepositoryPolicy();
|
||||
}
|
||||
|
||||
public URL getRepositoryCacheURL()
|
||||
|
|
|
@ -25,6 +25,7 @@ import java.io.File;
|
|||
* Class used to bridge the servlet to the repository proxy implementation.
|
||||
*
|
||||
* @author Edwin Punzalan
|
||||
* @todo the names get() and getRemoteFile() are confusing
|
||||
*/
|
||||
public interface ProxyManager
|
||||
{
|
||||
|
|
|
@ -29,6 +29,7 @@ import java.util.List;
|
|||
*
|
||||
* @author Edwin Punzalan
|
||||
* @plexus.component role="org.apache.maven.repository.proxy.configuration.ProxyConfiguration"
|
||||
* @todo investigate how these should be set - probably plexus configuration
|
||||
*/
|
||||
public class ProxyConfiguration
|
||||
{
|
||||
|
|
|
@ -33,6 +33,7 @@ import java.util.StringTokenizer;
|
|||
* Class used to build an artifact object based on a relative from a repository's basedir.
|
||||
*
|
||||
* @author Edwin Punzalan
|
||||
* @todo I'm not sure why this class needs to exist. It seems like the perfect candidate for two implementations of an interface
|
||||
*/
|
||||
public class ArtifactUtils
|
||||
{
|
||||
|
|
|
@ -52,7 +52,6 @@
|
|||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty6-plugin</artifactId>
|
||||
<version>6.0.0beta11</version>
|
||||
<configuration>
|
||||
<scanIntervalSeconds>10</scanIntervalSeconds>
|
||||
<connectors>
|
||||
|
@ -87,6 +86,18 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<instrumentation>
|
||||
<!-- TODO: should this module have tests? -->
|
||||
<excludes>
|
||||
<exclude>**/**</exclude>
|
||||
</excludes>
|
||||
</instrumentation>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
123
pom.xml
123
pom.xml
|
@ -13,7 +13,10 @@
|
|||
~ 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.
|
||||
--><project>
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
|
@ -84,6 +87,19 @@
|
|||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.4</source>
|
||||
<target>1.4</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-idea-plugin</artifactId>
|
||||
<configuration>
|
||||
<jdkLevel>1.4</jdkLevel>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
<configuration>
|
||||
|
@ -199,17 +215,16 @@
|
|||
</dependencyManagement>
|
||||
<reporting>
|
||||
<plugins>
|
||||
<!-- TODO: should be omitted when there are no tests to run -->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<!--
|
||||
<plugin>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
</plugin>
|
||||
-->
|
||||
<!-- TODO: should work, even if there are no sources -->
|
||||
<plugin>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<configuration>
|
||||
<configLocation>config/maven_checks.xml</configLocation>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>changelog-maven-plugin</artifactId>
|
||||
|
@ -218,24 +233,100 @@
|
|||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>taglist-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<!-- TODO: should be omitted when there are no sources -->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>jxr-maven-plugin</artifactId>
|
||||
<artifactId>maven-jxr-plugin</artifactId>
|
||||
<configuration>
|
||||
<aggregate>true</aggregate>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- TODO: should be omitted when there are no tests to run -->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>surefire-report-maven-plugin</artifactId>
|
||||
<artifactId>maven-surefire-report-plugin</artifactId>
|
||||
</plugin>
|
||||
<!-- TODO: should be omitted when there are no sources/not java -->
|
||||
<plugin>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<configuration>
|
||||
<aggregate>true</aggregate>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- TODO: should be omitted when there are no sources/not java -->
|
||||
<plugin>
|
||||
<artifactId>maven-pmd-plugin</artifactId>
|
||||
<!-- TODO: choose appropriate rulesets -->
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>ciProfile</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>enableCiProfile</name>
|
||||
<value>true</value>
|
||||
</property>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-pmd-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>process-sources</phase>
|
||||
<goals>
|
||||
<!-- TODO: after rules are set
|
||||
<goal>check</goal>
|
||||
-->
|
||||
<goal>cpd-check</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>process-sources</phase>
|
||||
<goals>
|
||||
<!-- TODO: reformat first
|
||||
<goal>check</goal>
|
||||
-->
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<check>
|
||||
<!-- TODO! raise to 85/100 -->
|
||||
<totalLineRate>80</totalLineRate>
|
||||
<totalBranchRate>95</totalBranchRate>
|
||||
</check>
|
||||
|
||||
<instrumentation>
|
||||
<excludes>
|
||||
<exclude>**/*$*</exclude>
|
||||
</excludes>
|
||||
</instrumentation>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>clean</id>
|
||||
<goals>
|
||||
<goal>clean</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>check</id>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
Loading…
Reference in New Issue