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:
Brett Porter 2006-06-06 07:26:13 +00:00
parent ce80e898d9
commit 04575ed5bc
9 changed files with 171 additions and 26 deletions

View File

@ -15,7 +15,7 @@
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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> <parent>
<groupId>org.apache.maven.repository</groupId> <groupId>org.apache.maven.repository</groupId>
<artifactId>maven-repository-manager</artifactId> <artifactId>maven-repository-manager</artifactId>
@ -38,4 +38,20 @@
<artifactId>plexus-container-default</artifactId> <artifactId>plexus-container-default</artifactId>
</dependency> </dependency>
</dependencies> </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> </project>

View File

@ -1,5 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.apache.maven.repository</groupId> <groupId>org.apache.maven.repository</groupId>
@ -32,6 +32,18 @@
</execution> </execution>
</executions> </executions>
</plugin> </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> </plugins>
</build> </build>
<pluginRepositories> <pluginRepositories>

View File

@ -15,7 +15,7 @@
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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> <parent>
<groupId>org.apache.maven.repository</groupId> <groupId>org.apache.maven.repository</groupId>
<artifactId>maven-repository-manager</artifactId> <artifactId>maven-repository-manager</artifactId>
@ -47,4 +47,19 @@
<artifactId>wagon-provider-api</artifactId> <artifactId>wagon-provider-api</artifactId>
</dependency> </dependency>
</dependencies> </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> </project>

View File

@ -52,6 +52,7 @@ import java.util.Map;
/** /**
* @author Edwin Punzalan * @author Edwin Punzalan
* @plexus.component role="org.apache.maven.repository.proxy.ProxyManager" * @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 public class DefaultProxyManager
extends AbstractLogEnabled extends AbstractLogEnabled
@ -289,17 +290,13 @@ public class DefaultProxyManager
private ArtifactRepositoryPolicy getReleasesPolicy() private ArtifactRepositoryPolicy getReleasesPolicy()
{ {
//todo get policy configuration from ProxyConfiguration //todo get policy configuration from ProxyConfiguration
ArtifactRepositoryPolicy repositoryPolicy = new ArtifactRepositoryPolicy(); return new ArtifactRepositoryPolicy();
return repositoryPolicy;
} }
private ArtifactRepositoryPolicy getSnapshotsPolicy() private ArtifactRepositoryPolicy getSnapshotsPolicy()
{ {
//todo get policy configuration from ProxyConfiguration //todo get policy configuration from ProxyConfiguration
ArtifactRepositoryPolicy repositoryPolicy = new ArtifactRepositoryPolicy(); return new ArtifactRepositoryPolicy();
return repositoryPolicy;
} }
public URL getRepositoryCacheURL() public URL getRepositoryCacheURL()

View File

@ -25,6 +25,7 @@ import java.io.File;
* Class used to bridge the servlet to the repository proxy implementation. * Class used to bridge the servlet to the repository proxy implementation.
* *
* @author Edwin Punzalan * @author Edwin Punzalan
* @todo the names get() and getRemoteFile() are confusing
*/ */
public interface ProxyManager public interface ProxyManager
{ {

View File

@ -29,6 +29,7 @@ import java.util.List;
* *
* @author Edwin Punzalan * @author Edwin Punzalan
* @plexus.component role="org.apache.maven.repository.proxy.configuration.ProxyConfiguration" * @plexus.component role="org.apache.maven.repository.proxy.configuration.ProxyConfiguration"
* @todo investigate how these should be set - probably plexus configuration
*/ */
public class ProxyConfiguration public class ProxyConfiguration
{ {

View File

@ -33,6 +33,7 @@ import java.util.StringTokenizer;
* Class used to build an artifact object based on a relative from a repository's basedir. * Class used to build an artifact object based on a relative from a repository's basedir.
* *
* @author Edwin Punzalan * @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 public class ArtifactUtils
{ {

View File

@ -52,7 +52,6 @@
<plugin> <plugin>
<groupId>org.mortbay.jetty</groupId> <groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty6-plugin</artifactId> <artifactId>maven-jetty6-plugin</artifactId>
<version>6.0.0beta11</version>
<configuration> <configuration>
<scanIntervalSeconds>10</scanIntervalSeconds> <scanIntervalSeconds>10</scanIntervalSeconds>
<connectors> <connectors>
@ -87,6 +86,18 @@
</execution> </execution>
</executions> </executions>
</plugin> </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> </plugins>
</build> </build>
</project> </project>

123
pom.xml
View File

@ -13,7 +13,10 @@
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ 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> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.apache.maven</groupId> <groupId>org.apache.maven</groupId>
@ -84,6 +87,19 @@
</plugins> </plugins>
<pluginManagement> <pluginManagement>
<plugins> <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> <plugin>
<artifactId>maven-release-plugin</artifactId> <artifactId>maven-release-plugin</artifactId>
<configuration> <configuration>
@ -199,17 +215,16 @@
</dependencyManagement> </dependencyManagement>
<reporting> <reporting>
<plugins> <plugins>
<!-- TODO: should be omitted when there are no tests to run -->
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId> <artifactId>cobertura-maven-plugin</artifactId>
</plugin> </plugin>
<!-- <plugin>
<plugin> <artifactId>maven-checkstyle-plugin</artifactId>
<artifactId>maven-checkstyle-plugin</artifactId> <configuration>
</plugin> <configLocation>config/maven_checks.xml</configLocation>
--> </configuration>
<!-- TODO: should work, even if there are no sources --> </plugin>
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>changelog-maven-plugin</artifactId> <artifactId>changelog-maven-plugin</artifactId>
@ -218,24 +233,100 @@
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>taglist-maven-plugin</artifactId> <artifactId>taglist-maven-plugin</artifactId>
</plugin> </plugin>
<!-- TODO: should be omitted when there are no sources -->
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <artifactId>maven-jxr-plugin</artifactId>
<artifactId>jxr-maven-plugin</artifactId> <configuration>
<aggregate>true</aggregate>
</configuration>
</plugin> </plugin>
<!-- TODO: should be omitted when there are no tests to run -->
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <artifactId>maven-surefire-report-plugin</artifactId>
<artifactId>surefire-report-maven-plugin</artifactId>
</plugin> </plugin>
<!-- TODO: should be omitted when there are no sources/not java -->
<plugin> <plugin>
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<aggregate>true</aggregate>
</configuration>
</plugin> </plugin>
<!-- TODO: should be omitted when there are no sources/not java -->
<plugin> <plugin>
<artifactId>maven-pmd-plugin</artifactId> <artifactId>maven-pmd-plugin</artifactId>
<!-- TODO: choose appropriate rulesets -->
</plugin> </plugin>
</plugins> </plugins>
</reporting> </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> </project>