You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by jo...@apache.org on 2007/02/23 20:05:37 UTC
svn commit: r511053 [6/6] - in /maven/archiva/trunk: ./ archiva-applet/
archiva-cli/ archiva-cli/src/main/java/org/apache/maven/archiva/cli/
archiva-common/ archiva-common/src/ archiva-common/src/main/
archiva-common/src/main/java/ archiva-common/src/m...
Modified: maven/archiva/trunk/archiva-webapp/src/main/resources/META-INF/plexus/application.xml
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/resources/META-INF/plexus/application.xml?view=diff&rev=511053&r1=511052&r2=511053
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/resources/META-INF/plexus/application.xml (original)
+++ maven/archiva/trunk/archiva-webapp/src/main/resources/META-INF/plexus/application.xml Fri Feb 23 11:05:21 2007
@@ -73,6 +73,60 @@
<component>
<role>org.codehaus.plexus.jdo.JdoFactory</role>
+ <role-hint>archiva</role-hint>
+ <implementation>org.codehaus.plexus.jdo.DataSourceConfigurableJdoFactory</implementation>
+ <configuration>
+
+ <connectionFactoryName>java:comp/env/jdbc/archiva</connectionFactoryName>
+ <shutdownConnectionFactoryName>java:comp/env/jdbc/archivaShutdown</shutdownConnectionFactoryName>
+
+ <!-- JPOX and JDO configuration -->
+ <persistenceManagerFactoryClass>org.jpox.PersistenceManagerFactoryImpl</persistenceManagerFactoryClass>
+ <otherProperties>
+ <property>
+ <name>org.jpox.autoCreateSchema</name>
+ <value>true</value>
+ </property>
+ <property>
+ <name>org.jpox.validateTables</name>
+ <value>false</value>
+ </property>
+ <property>
+ <name>org.jpox.validateConstraints</name>
+ <value>false</value>
+ </property>
+ <property>
+ <name>org.jpox.validateColumns</name>
+ <value>false</value>
+ </property>
+ <property>
+ <name>org.jpox.autoStartMechanism</name>
+ <value>None</value>
+ </property>
+ <property>
+ <name>org.jpox.transactionIsolation</name>
+ <value>READ_UNCOMMITTED</value>
+ </property>
+ <property>
+ <name>org.jpox.poid.transactionIsolation</name>
+ <value>READ_UNCOMMITTED</value>
+ </property>
+ <property>
+ <name>org.jpox.rdbms.dateTimezone</name>
+ <value>JDK_DEFAULT_TIMEZONE</value>
+ </property>
+ <!-- NEEDED FOR POSTGRES, But causes problems in other JDBC implementations.
+ <property>
+ <name>org.jpox.identifier.case</name>
+ <value>PreserveCase</value>
+ </property>
+ -->
+ </otherProperties>
+ </configuration>
+ </component>
+
+ <component>
+ <role>org.codehaus.plexus.jdo.JdoFactory</role>
<role-hint>users</role-hint>
<implementation>org.codehaus.plexus.jdo.DataSourceConfigurableJdoFactory</implementation>
<configuration>
@@ -115,12 +169,12 @@
<name>org.jpox.rdbms.dateTimezone</name>
<value>JDK_DEFAULT_TIMEZONE</value>
</property>
-<!--
+ <!-- NEEDED FOR POSTGRES, But causes problems in other JDBC implementations.
<property>
<name>org.jpox.identifier.case</name>
<value>PreserveCase</value>
</property>
--->
+ -->
</otherProperties>
</configuration>
</component>
@@ -130,101 +184,9 @@
-->
<component>
<role>org.codehaus.plexus.logging.LoggerManager</role>
- <implementation>org.codehaus.plexus.logging.log4j.Log4JLoggerManager</implementation>
+ <implementation>org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager</implementation>
<lifecycle-handler>basic</lifecycle-handler>
-
- <configuration>
- <threshold>WARN</threshold>
- <default-appender>console,rolling</default-appender>
-
- <appenders>
- <appender>
- <id>console</id>
- <threshold>DEBUG</threshold>
- <type>org.apache.log4j.ConsoleAppender</type>
- <conversion-pattern>%d [%t] %-5p %-30c{1} - %m%n</conversion-pattern>
- </appender>
-
- <appender>
- <id>rolling</id>
- <threshold>DEBUG</threshold>
- <type>org.apache.log4j.DailyRollingFileAppender</type>
- <conversion-pattern>%-4r [%t] %-5p %c %x - %m%n</conversion-pattern>
-
- <properties>
- <property>
- <name>file</name>
- <value>${appserver.base}/logs/archiva.log</value>
- </property>
- <property>
- <name>append</name>
- <value>true</value>
- </property>
- <property>
- <name>datePattern</name>
- <value>'.'yyyy-MM-dd</value>
- </property>
- </properties>
- </appender>
- </appenders>
-
- <levels>
- <!-- Help identify bugs during testing -->
- <level>
- <hierarchy>org.apache.maven</hierarchy>
- <level>INFO</level>
- </level>
- <level>
- <hierarchy>org.codehaus.plexus.security</hierarchy>
- <level>INFO</level>
- </level>
- <!-- squelch noisy objects (for now) -->
- <level>
- <hierarchy>org.codehaus.plexus.mailsender.MailSender</hierarchy>
- <level>INFO</level>
- </level>
- <level>
- <hierarchy>org.quartz</hierarchy>
- <level>INFO</level>
- </level>
- <level>
- <hierarchy>org.apache.jasper</hierarchy>
- <level>INFO</level>
- </level>
- <level>
- <hierarchy>com.opensymphony.xwork</hierarchy>
- <level>INFO</level>
- </level>
- <level>
- <hierarchy>com.opensymphony.webwork</hierarchy>
- <level>INFO</level>
- </level>
- <level>
- <hierarchy>org.codehaus.plexus.PlexusContainer</hierarchy>
- <level>INFO</level>
- </level>
- <level>
- <hierarchy>JPOX</hierarchy>
- <level>WARN</level>
- </level>
- <level>
- <hierarchy>JPOX.MetaData</hierarchy>
- <level>ERROR</level>
- </level>
- <!--
- <level>
- <hierarchy>JPOX.RDBMS.SQL</hierarchy>
- <level>DEBUG</level>
- </level>
- -->
- <level>
- <hierarchy>freemarker</hierarchy>
- <level>WARN</level>
- </level>
- </levels>
- </configuration>
</component>
-
</components>
<load-on-start>
@@ -233,7 +195,7 @@
</component>
<component>
<role>org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor</role>
- <role-hint>indexer</role-hint>
+ <role-hint>data-refresh</role-hint>
</component>
</load-on-start>
Modified: maven/archiva/trunk/archiva-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/resources/xwork.xml?view=diff&rev=511053&r1=511052&r2=511053
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/resources/xwork.xml (original)
+++ maven/archiva/trunk/archiva-webapp/src/main/resources/xwork.xml Fri Feb 23 11:05:21 2007
@@ -92,6 +92,10 @@
<param name="actionName">login</param>
<param name="namespace">/security</param>
</result>
+ <result name="requires-authorization" type="redirect-action">
+ <param name="actionName">login</param>
+ <param name="namespace">/security</param>
+ </result>
<result name="security-register-success" type="redirect-action">
<param name="actionName">login</param>
<param name="namespace">/security</param>
@@ -177,6 +181,10 @@
<result>/WEB-INF/jsp/showArtifact.jsp</result>
</action>
+ <action name="showArtifactReports" class="showArtifactAction" method="reports">
+ <result>/WEB-INF/jsp/showArtifact.jsp</result>
+ </action>
+
<action name="showArtifactDependencies" class="showArtifactAction" method="dependencies">
<result>/WEB-INF/jsp/showArtifact.jsp</result>
</action>
Modified: maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/reports.jsp
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/reports.jsp?view=diff&rev=511053&r1=511052&r2=511053
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/reports.jsp (original)
+++ maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/reports.jsp Fri Feb 23 11:05:21 2007
@@ -26,9 +26,7 @@
<html>
<head>
- <ww:set name="reports" value="reports"/>
- <ww:set name="reportGroup" value="reportGroup"/>
- <title>Report: ${reports[reportGroup].name}</title>
+ <title>Reports</title>
<ww:head/>
</head>
@@ -38,135 +36,22 @@
<div id="contentArea">
-<pss:ifAnyAuthorized permissions="archiva-access-reports">
- <ww:form action="reports" namespace="/admin">
- <ww:select list="reports" label="Report" name="reportGroup" onchange="document.reports.submit();"/>
- <ww:select list="configuration.repositories" listKey="id" listValue="name" label="Repository" headerKey="-"
- headerValue="(All repositories)" name="repositoryId" onchange="document.reports.submit();"/>
- <ww:select list="reports[reportGroup].reports" label="Filter" headerKey="-" headerValue="(All Problems)"
- name="filter" onchange="document.reports.submit();"/>
- <ww:submit value="Get Report"/>
- </ww:form>
-</pss:ifAnyAuthorized>
-
-<ww:set name="databases" value="databases"/>
-<c:forEach items="${databases}" var="database">
-<div>
-<div style="float: right">
- <%-- TODO!
- <a href="#">Repair all</a>
- |
- --%>
- <c:choose>
- <c:when test="${!database.inProgress}">
- <pss:ifAuthorized permission="archiva-access-reports">
- <ww:url id="regenerateReportUrl" action="runReport" namespace="/admin">
- <ww:param name="repositoryId">${database.repository.id}</ww:param>
- <ww:param name="reportGroup" value="reportGroup"/>
- </ww:url>
- <ww:a href="%{regenerateReportUrl}">Regenerate Report</ww:a>
- </pss:ifAuthorized>
- </c:when>
- <c:otherwise>
- <!-- TODO: would be good to have a generic task/job mechanism that tracked progress and ability to run
- concurrently -->
- <span style="color: gray;">Report in progress</span>
- </c:otherwise>
- </c:choose>
-</div>
-<h2>Repository: ${database.repository.name}</h2>
-
-<p>
- <c:choose>
- <c:when test="${!empty(database.reporting.lastModified)}">
- Status:
- <img src="<c:url value="/images/icon_error_sml.gif"/>" width="15" height="15" alt=""/>
- ${database.numFailures}
- <img src="<c:url value="/images/icon_warning_sml.gif"/>" width="15" height="15" alt=""/>
- ${database.numWarnings}
- <img src="<c:url value="/images/icon_info_sml.gif"/>" width="15" height="15" alt=""/>
- ${database.numNotices}
-
- <span style="font-size: x-small">
- <jsp:useBean id="date" class="java.util.Date"/>
- <c:set target="${date}" property="time" value="${database.reporting.lastModified}"/>
- Last updated: <fmt:formatDate type="both" value="${date}"/>,
- execution time: <fmt:formatNumber maxFractionDigits="0" value="${database.reporting.executionTime / 60000}"/> minutes
- <fmt:formatNumber maxFractionDigits="0" value="${(database.reporting.executionTime / 1000) % 60}"/> seconds
- </span>
- </c:when>
- <c:otherwise>
- <b>
- This report has not yet been generated. <a href="${url}">Generate Report</a>
- </b>
- </c:otherwise>
- </c:choose>
-</p>
-
- <%-- TODO need to protect iterations against concurrent modification exceptions by cloning the lists synchronously --%>
- <%-- TODO! paginate (displaytag?) --%>
-<c:if test="${!empty(database.reporting.artifacts)}">
- <h3>Artifacts</h3>
- <c:forEach items="${database.reporting.artifacts}" var="artifact" begin="0" end="2">
- <ul>
- <c:forEach items="${artifact.failures}" var="result">
- <li class="errorBullet">${result.reason}</li>
- </c:forEach>
- <c:forEach items="${artifact.warnings}" var="result">
- <li class="warningBullet">${result.reason}</li>
- </c:forEach>
- <c:forEach items="${artifact.notices}" var="result">
- <li class="infoBullet">${result.reason}</li>
- </c:forEach>
- </ul>
- <p style="text-indent: 3em;">
- <my:showArtifactLink groupId="${artifact.groupId}" artifactId="${artifact.artifactId}"
- version="${artifact.version}" classifier="${artifact.classifier}"/>
- </p>
- <%-- TODO!
- <td>
- <a href="#">Repair</a>
- </td>
- --%>
- </c:forEach>
- <c:if test="${fn:length(database.reporting.artifacts) gt 3}">
- <p>
- <b>... more ...</b>
- </p>
- </c:if>
-</c:if>
-<c:if test="${!empty(database.metadataWithProblems)}">
- <h3>Metadata</h3>
- <c:forEach items="${database.metadataWithProblems}" var="metadata" begin="0" end="2">
- <ul>
- <c:forEach items="${metadata.failures}" var="result">
- <li class="errorBullet">${result.reason}</li>
- </c:forEach>
- <c:forEach items="${metadata.warnings}" var="result">
- <li class="warningBullet">${result.reason}</li>
- </c:forEach>
- <c:forEach items="${metadata.notices}" var="result">
- <li class="infoBullet">${result.reason}</li>
- </c:forEach>
- </ul>
- <p style="text-indent: 3em;">
- <my:showArtifactLink groupId="${metadata.groupId}" artifactId="${metadata.artifactId}"
- version="${metadata.version}"/>
- </p>
- <%-- TODO!
- <td>
- <a href="#">Repair</a>
- </td>
- --%>
- </c:forEach>
- <c:if test="${fn:length(database.metadataWithProblems) gt 3}">
- <p>
- <b>... more ...</b>
- </p>
- </c:if>
-</c:if>
-</div>
+<c:forEach items="${reports}" var="report">
+ <h3>
+ ${report.groupId} : ${report.artifactId} : ${report.version} : ${report.classifier} : ${report.type}
+ </h3>
+ <ul>
+ <c:forEach items="${repor.results}" var="result">
+ <li>
+ <b>${result.reason}</b>
+ </li>
+ </c:forEach>
+ </ul>
</c:forEach>
+<c:if test="${empty(reports)}">
+ <strong>No reports for any artifact.</strong>
+</c:if>
+
</div>
</body>
Modified: maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/showArtifact.jsp
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/showArtifact.jsp?view=diff&rev=511053&r1=511052&r2=511053
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/showArtifact.jsp (original)
+++ maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/showArtifact.jsp Fri Feb 23 11:05:21 2007
@@ -21,6 +21,7 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %>
<%@ taglib prefix="archiva" uri="http://maven.apache.org/archiva" %>
+<%@ taglib prefix="pss" uri="/plexusSecuritySystem" %>
<html>
<head>
@@ -115,6 +116,17 @@
</ww:url>
</c:set>
<my:currentWWUrl url="${url}">Mailing Lists</my:currentWWUrl>
+ <pss:ifAnyAuthorized permissions="archiva-access-reports">
+ <c:set var="url">
+ <ww:url action="showArtifactReports">
+ <ww:param name="groupId" value="%{groupId}"/>
+ <ww:param name="artifactId" value="%{artifactId}"/>
+ <ww:param name="version" value="%{version}"/>
+ </ww:url>
+ </c:set>
+ <my:currentWWUrl url="${url}">Reports</my:currentWWUrl>
+ </pss:ifAnyAuthorized>
+
</span>
</div>
@@ -134,6 +146,9 @@
</c:when>
<c:when test="${mailingLists != null}">
<%@ include file="/WEB-INF/jsp/include/mailingLists.jspf" %>
+ </c:when>
+ <c:when test="${reports != null}">
+ <%@ include file="/WEB-INF/jsp/include/artifactReports.jspf" %>
</c:when>
<c:otherwise>
<%@ include file="/WEB-INF/jsp/include/artifactInfo.jspf" %>
Modified: maven/archiva/trunk/pom.xml
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/pom.xml?view=diff&rev=511053&r1=511052&r2=511053
==============================================================================
--- maven/archiva/trunk/pom.xml (original)
+++ maven/archiva/trunk/pom.xml Fri Feb 23 11:05:21 2007
@@ -24,6 +24,9 @@
<version>4</version>
<relativePath>../pom/maven/pom.xml</relativePath>
</parent>
+ <prerequisites>
+ <maven>2.0.5</maven>
+ </prerequisites>
<groupId>org.apache.maven.archiva</groupId>
<artifactId>archiva</artifactId>
<packaging>pom</packaging>
@@ -81,9 +84,9 @@
<version>1.3.3</version>
<executions>
<execution>
+ <id>generate</id>
<goals>
<goal>descriptor</goal>
- <goal>merge-descriptors</goal>
</goals>
</execution>
</executions>
@@ -120,6 +123,7 @@
<modules>
<module>archiva-applet</module>
<module>archiva-converter</module>
+ <module>archiva-common</module>
<module>archiva-discoverer</module>
<module>archiva-reports-standard</module>
<module>archiva-indexer</module>
@@ -154,30 +158,6 @@
<artifactId>maven-app-configuration-web</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
- <!--
- Rejected Plexus Container / Component Versions:
- 1.0-alpha-11
- 2007-01-17 11:40:40.371::WARN: Failed startup of context org.mortbay.jetty.webapp.WebAppContext@553763
- {/,/home/joakim/code/maven/trunks/archiva/archiva-webapp/src/main/webapp}
- java.lang.NullPointerException
- at org.codehaus.plexus.classworlds.strategy.DefaultStrategy.getResource(DefaultStrategy.java:99)
- at org.codehaus.plexus.classworlds.strategy.ForeignStrategy.getResource(ForeignStrategy.java:54)
- at org.codehaus.plexus.classworlds.strategy.DefaultStrategy.getResourceAsStream(DefaultStrategy.java:107)
- at org.codehaus.plexus.classworlds.realm.ClassRealm.getResourceAsStream(ClassRealm.java:207)
- at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:244)
-
- 1.0-alpha-12
- 1.0-alpha-13
- 1.0-alpha-14
- Caused by: org.codehaus.plexus.PlexusContainerException: The specified user configuration
- 'file:/home/joakim/code/maven/trunks/archiva/archiva-webapp/src/main/webapp/WEB-INF/classes/META-INF/plexus/application.xml' is null.
-
- 1.0-alpha-15
- The resolution of ${configuration.store.file} is never attempted.
-
- 1.0-alpha-16-SNAPSHOT
- Incompatible with plexus-xwork-integration
- -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
@@ -245,6 +225,20 @@
</dependency>
<dependency>
<groupId>org.apache.maven.archiva</groupId>
+ <artifactId>archiva-common</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+ <!--
+ <dependency>
+ <groupId>org.apache.maven.archiva</groupId>
+ <artifactId>archiva-common</artifactId>
+ <version>${pom.version}</version>
+ <classifier>tests</classifier>
+ <scope>test</scope>
+ </dependency>
+ -->
+ <dependency>
+ <groupId>org.apache.maven.archiva</groupId>
<artifactId>archiva-core</artifactId>
<version>${pom.version}</version>
</dependency>
@@ -519,17 +513,20 @@
</build>
</profile>
</profiles>
- <!-- TODO: remove once modello is released -->
- <pluginRepositories>
- <pluginRepository>
- <id>codehaus.org</id>
- <url>http://snapshots.repository.codehaus.org</url>
- </pluginRepository>
- </pluginRepositories>
- <!-- TODO: remove once ehcache, p-sec, registry, webdav, xwork, naming released -->
<repositories>
<repository>
<id>codehaus.org</id>
+ <url>http://repository.codehaus.org</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <!-- TODO: remove once ehcache, p-sec, registry, webdav, xwork, naming released -->
+ <repository>
+ <id>snapshots.codehaus.org</id>
<url>http://snapshots.repository.codehaus.org</url>
<releases>
<enabled>false</enabled>
@@ -539,6 +536,19 @@
</snapshots>
</repository>
</repositories>
+ <!-- TODO: remove once modello is released -->
+ <pluginRepositories>
+ <pluginRepository>
+ <id>snapshots.codehaus.org</id>
+ <url>http://snapshots.repository.codehaus.org</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
<properties>
<maven.version>2.0.5</maven.version>
<wagon.version>1.0-beta-2</wagon.version>