]> source.dussan.org Git - archiva.git/commitdiff
use apt plugin from myfaces to generate taglib file
authorOlivier Lamy <olamy@apache.org>
Thu, 27 Oct 2011 18:11:13 +0000 (18:11 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 27 Oct 2011 18:11:13 +0000 (18:11 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1189907 13f79535-47bb-0310-9956-ffa450edef68

18 files changed:
.gitignore
archiva-modules/archiva-web/archiva-webapp/pom.xml
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/archiva/web/action/UploadAction.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/archiva/web/tags/CopyPasteSnippetTag.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/archiva/web/tags/DependencyTreeTag.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/archiva/web/tags/GroupIdLinkTag.java
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/legacyArtifactPath.jsp
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/networkProxies.jsp
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/proxyConnectors.jsp
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositoryGroups.jsp
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositoryScanning.jsp
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/browse.jsp
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactInfo.jspf
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/dependencyTree.jspf
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/projectMetadata.jspf
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/basicReport.jsp
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/statisticsReport.jsp

index 65b675918e7322fae376108e73e6e0a945e4b086..11beaceaa587d2f9d8f9286f6e45cb8562c2fde6 100644 (file)
@@ -17,3 +17,4 @@ archiva-modules/archiva-web/archiva-webapp-test/cargo-installs/
 *.iws
 .DS_Store
 .extract
+archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/tld/
index cd62e03234c1a089be353ca63ef0d9c52452831a..94775ead7c9580ef23a1a41ac38ec00555f55632 100644 (file)
       <groupId>opensymphony</groupId>
       <artifactId>sitemesh</artifactId>
     </dependency>
+    <!--
     <dependency>
       <groupId>taglibs</groupId>
       <artifactId>standard</artifactId>
     </dependency>
+    -->
     <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>jstl</artifactId>
       <classifier>tests</classifier>
       <scope>test</scope>
     </dependency>
+
+    <!-- taglib annotation plugin -->
+    <dependency>
+      <groupId>org.apache.struts</groupId>
+      <artifactId>struts-annotations</artifactId>
+      <version>1.0.5</version>
+      <scope>compile</scope>
+      <optional>true</optional>
+    </dependency>
+
   </dependencies>
   <build>
     <resources>
       </plugin>
       <plugin>
         <groupId>org.mortbay.jetty</groupId>
-        <artifactId>maven-jetty-plugin</artifactId>
+        <artifactId>jetty-maven-plugin</artifactId>
         <version>${jettyVersion}</version>
         <configuration>
           <webAppConfig>
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.myfaces.tobago</groupId>
+        <artifactId>maven-apt-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>compile</phase>
+            <goals>
+              <goal>execute</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
     <pluginManagement>
       <plugins>
+        <plugin>
+          <groupId>org.apache.myfaces.tobago</groupId>
+          <artifactId>maven-apt-plugin</artifactId>
+          <version>1.0.38</version>
+          <configuration>
+            <A>uri=/archiva-web-tag,tlibVersion=2.2.3,jspVersion=2.0,shortName=archiva,displayName=Archiva Taglib,
+              outFile=${basedir}/src/main/webapp/WEB-INF/tld/web-tags.tld,
+              description=Archiva taglibs.,
+              outTemplatesDir=${basedir}/target
+            </A>
+            <resourceTargetPath>target</resourceTargetPath>
+            <fork>true</fork>
+            <force>true</force>
+            <nocompile>true</nocompile>
+            <showWarnings>true</showWarnings>
+            <factory>org.apache.struts.annotations.taglib.apt.TLDAnnotationProcessorFactory</factory>
+            <includes>
+              <include>org/apache/archiva/web/tags/*Tag.java</include>
+            </includes>
+          </configuration>
+
+        </plugin>
         <plugin>
           <groupId>org.apache.rat</groupId>
           <artifactId>apache-rat-plugin</artifactId>
index 12bf2276cc612be58dab73f2361efd5566bb06dd..60cfc49c8a801551274a0cca3ac673f206b9dfc3 100644 (file)
@@ -53,6 +53,7 @@ import org.apache.archiva.repository.metadata.RepositoryMetadataReader;
 import org.apache.archiva.repository.metadata.RepositoryMetadataWriter;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
+import org.apache.taglibs.standard.tlv.JstlBaseTLV;
 import org.codehaus.plexus.taskqueue.TaskQueueException;
 import org.codehaus.plexus.util.IOUtil;
 import org.springframework.context.annotation.Scope;
index ba2afa9dc21a07f54a0bf503e96510a5aa1cff01..cd7c2d5866b9be19480e943cac97bfe28d9a8f0e 100644 (file)
@@ -22,6 +22,8 @@ package org.apache.archiva.web.tags;
 import org.apache.archiva.admin.model.beans.ManagedRepository;
 import org.apache.archiva.web.util.ContextUtils;
 import org.apache.commons.lang.StringEscapeUtils;
+import org.apache.struts2.views.annotations.StrutsTag;
+import org.apache.struts2.views.annotations.StrutsTagAttribute;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -36,6 +38,7 @@ import java.io.IOException;
  *
  * @version $Id$
  */
+@StrutsTag(name = "copy-paste-snippet", tldBodyContent = "empty", tldTagClass = "org.apache.archiva.web.tags.CopyPasteSnippetTag", description = "Render a copy paste snippet for the provided object")
 public class CopyPasteSnippetTag
     extends TagSupport
 {
@@ -111,11 +114,13 @@ public class CopyPasteSnippetTag
         return super.doEndTag();
     }
 
+    @StrutsTagAttribute(description = "The Object to Render", type = "String", defaultValue = "", required = true, rtexprvalue = true)
     public void setObject( Object object )
     {
         this.object = object;
     }
 
+    @StrutsTagAttribute(description = "The wrapper type to use, can be 'pre' or 'toggle'", type = "String", defaultValue = "", required = false, rtexprvalue = true)
     public void setWrapper( String wrapper )
     {
         this.wrapper = wrapper;
index 7fa34f35063edbecc222386e07835048f186fc2d..1d1433074d0f60c5d0099da35c751bdf1a228592 100644 (file)
@@ -24,6 +24,8 @@ import org.apache.commons.collections.IteratorUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.archiva.common.ArchivaException;
 import org.apache.archiva.web.tags.DependencyTree.TreeEntry;
+import org.apache.struts2.views.annotations.StrutsTag;
+import org.apache.struts2.views.annotations.StrutsTagAttribute;
 import org.springframework.beans.BeansException;
 import org.springframework.web.context.WebApplicationContext;
 import org.springframework.web.context.support.WebApplicationContextUtils;
@@ -54,6 +56,7 @@ import javax.servlet.jsp.tagext.TryCatchFinally;
  *
  * @version $Id$
  */
+@StrutsTag(name = "dependency-tree", tldBodyContent = "JSP", tldTagClass = "org.apache.archiva.web.tags.DependencyTreeTag", description = "Render a dependency tree for the provided project.")
 public class DependencyTreeTag
     extends TagSupport
     implements IterationTag, TryCatchFinally
@@ -173,26 +176,31 @@ public class DependencyTreeTag
         super.release();
     }
 
+    @StrutsTagAttribute(description = "The artifactId", type = "String", defaultValue = "", required = true, rtexprvalue = true)
     public void setArtifactId( String artifactId )
     {
         this.artifactId = artifactId;
     }
 
+    @StrutsTagAttribute(description = "The groupId", type = "String", defaultValue = "", required = true, rtexprvalue = true)
     public void setGroupId( String groupId )
     {
         this.groupId = groupId;
     }
 
+    @StrutsTagAttribute(description = "The variable name for the node.", type = "String", defaultValue = "", required = false, rtexprvalue = true)
     public void setNodevar( String nodevar )
     {
         this.nodevar = nodevar;
     }
 
+    @StrutsTagAttribute(description = "The version", type = "String", defaultValue = "", required = true, rtexprvalue = true)
     public void setVersion( String version )
     {
         this.version = version;
     }
 
+    @StrutsTagAttribute(description = "The version of the project model. Used to verify the dependency graph for generic snapshots not yet in the repo.", type = "String", defaultValue = "", required = false, rtexprvalue = true)
     public void setModelVersion( String modelVersion )
     {
         this.modelVersion = modelVersion;
index 24ed6fe9a63da8c9acc41865094b8e1c36963c8a..3660cde78d5444e92cb0b9e5722096e27fe3cd7d 100644 (file)
@@ -25,6 +25,9 @@ import org.apache.struts2.components.Component;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.jsp.JspException;
+
+import org.apache.struts2.views.annotations.StrutsTag;
+import org.apache.struts2.views.annotations.StrutsTagAttribute;
 import org.apache.struts2.views.jsp.ComponentTagSupport;
 
 /**
@@ -32,6 +35,7 @@ import org.apache.struts2.views.jsp.ComponentTagSupport;
  *
  * @version $Id$
  */
+@StrutsTag(name = "groupIdLink", tldBodyContent = "empty", tldTagClass = "org.apache.archiva.web.tags.GroupIdLinkTag", description = "Render a groupId as a set of Links")
 public class GroupIdLinkTag
     extends ComponentTagSupport
 {
@@ -78,11 +82,13 @@ public class GroupIdLinkTag
         var = exprTool.optionalString( "var", var_, "" );
     }
 
+    @StrutsTagAttribute(description = "The GroupID String", type = "String", defaultValue = "", required = true, rtexprvalue = true)
     public void setVar( String value )
     {
         this.var_ = value;
     }
 
+    @StrutsTagAttribute(description = "Boolean indicating if 'top' link should be created or not.", type = "String", defaultValue = "", required = false, rtexprvalue = true)
     public void setIncludeTop( boolean includeTop )
     {
         this.includeTop = includeTop;
index fdb2f5725457c9dfcdcbfb13e099b50b9ab1e81a..5ef70ce062c42581613616e76fdb5bf3b153ff26 100644 (file)
@@ -21,7 +21,7 @@
 <%@ taglib prefix="s" uri="/struts-tags" %>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 <%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0" %>
-<%@ taglib prefix="archiva"   uri="/WEB-INF/taglib.tld" %>
+<%@ taglib prefix="archiva"   uri="/WEB-INF/tld/web-tags.tld" %>
 
 <html>
 <head>
index 1f0b9b658404daded96737fa6591f5900e255e97..025f65413817c1d8834216e202abbe4b7cb6a071 100644 (file)
@@ -21,7 +21,7 @@
 <%@ taglib prefix="s" uri="/struts-tags"%>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
 <%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0" %>
-<%@ taglib prefix="archiva"   uri="/WEB-INF/taglib.tld" %>
+<%@ taglib prefix="archiva"   uri="/WEB-INF/tld/web-tags.tld" %>
 
 <html>
 <head>
index b5bce894e8b33ac85c45a572ce71d2c2541c1a46..3c194ad3976bc85917656a05a6761c322f29927d 100644 (file)
@@ -22,7 +22,7 @@
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
 <%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0" %>
-<%@ taglib prefix="archiva"   uri="/WEB-INF/taglib.tld" %>
+<%@ taglib prefix="archiva"   uri="/WEB-INF/tld/web-tags.tld" %>
 
 <html>
 <head>
index deafa6fbce7ba46e52d2fe891fcab0ae47ffae52..572e5a1e1468b68d491cc4dd7b29506fd2bb7856 100644 (file)
@@ -22,7 +22,7 @@
 <%@ taglib prefix="s" uri="/struts-tags" %>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 <%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0" %>
-<%@ taglib prefix="archiva"   uri="/WEB-INF/taglib.tld" %>
+<%@ taglib prefix="archiva"   uri="/WEB-INF/tld/web-tags.tld" %>
 
 <html>
 <head>
index 13bafd384c887a34694dbba52bb9f4ba60e22496..322fbf91d8b0ba17d000571d99e2db8763f1b5d5 100644 (file)
@@ -22,7 +22,7 @@
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
 <%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0" %>
-<%@ taglib prefix="archiva"   uri="/WEB-INF/taglib.tld" %>
+<%@ taglib prefix="archiva"   uri="/WEB-INF/tld/web-tags.tld" %>
 
 <html>
 <head>
index b78d2d63866dd077a2703a6ff5dc2651a2a77c2b..c590d7e82c5d33bd07868af99570a206b9e72a27 100644 (file)
@@ -22,7 +22,7 @@
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
 <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
 <%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0" %>
-<%@ taglib prefix="archiva"   uri="/WEB-INF/taglib.tld" %>
+<%@ taglib prefix="archiva"   uri="/WEB-INF/tld/web-tags.tld" %>
 
 <html>
 <head>
index 2de7c5114b0cb4183d8fe456c43e9683bcd8f176..e722c42e11812f10a7dd7b9034a95020cdaa58b1 100644 (file)
@@ -20,7 +20,7 @@
 <%@ page contentType="text/html; charset=UTF-8" %>
 <%@ taglib prefix="s" uri="/struts-tags" %>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="archiva" uri="/WEB-INF/taglib.tld" %>
+<%@ taglib prefix="archiva" uri="/WEB-INF/tld/web-tags.tld" %>
 <%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0"  %>
 
 <html>
index ed6e948cbef373ffde4dc424c3c2475b229060fa..1cfd8e82563f133599feb167dd88c3a7b1db7460 100644 (file)
@@ -20,7 +20,7 @@
 <%@ page contentType="text/html; charset=UTF-8" %>
 <%@ taglib prefix="s" uri="/struts-tags" %>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="archiva"   uri="/WEB-INF/taglib.tld" %>
+<%@ taglib prefix="archiva"   uri="/WEB-INF/tld/web-tags.tld" %>
 
 <p>
   <archiva:groupIdLink var="${groupId}" includeTop="true" />
index 9e82dd5b43efd6c959a6aa3d71a560536428521f..f7cde9d46bff0cefc029a7c10f98462f916af89a 100644 (file)
@@ -19,7 +19,7 @@
 
 <%@ page contentType="text/html; charset=UTF-8" %>
 <%@ taglib prefix="my" tagdir="/WEB-INF/tags" %>
-<%@ taglib prefix="archiva" uri="/WEB-INF/taglib.tld" %>
+<%@ taglib prefix="archiva" uri="/WEB-INF/tld/web-tags.tld" %>
 
 <archiva:dependency-tree groupId="${groupId}" artifactId="${artifactId}" version="${version}"
                          modelVersion="${model.version}" nodevar="node">
index 797c941c765d672b476e0b39d5bc0235de0915dc..67b42a687e5188e256dde9ff9db0bc074d061fc6 100644 (file)
@@ -20,7 +20,7 @@
 <%@ page contentType="text/html; charset=UTF-8" %>
 <%@ taglib prefix="s" uri="/struts-tags" %>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="archiva"   uri="/WEB-INF/taglib.tld" %>
+<%@ taglib prefix="archiva"   uri="/WEB-INF/tld/web-tags.tld" %>
 
 <div> 
  
index 8ba9fabdee3ab4543812210c8c4552c327db715d..eeeca53ab3a3eb68925b9ac747395a693ed97989 100644 (file)
@@ -20,7 +20,7 @@
 <%@ page contentType="text/html; charset=UTF-8" %>
 <%@ taglib prefix="s" uri="/struts-tags" %>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="archiva"   uri="/WEB-INF/taglib.tld" %>
+<%@ taglib prefix="archiva"   uri="/WEB-INF/tld/web-tags.tld" %>
 
 <html>
 <head>
index dc5c70b39b4a5d76d8ec91a186e61869182b259c..fb6fbb4236edb7661780d5c25f8246bbb3815c11 100644 (file)
@@ -19,7 +19,7 @@
 
 <%@ page contentType="text/html; charset=UTF-8" %>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="archiva"   uri="/WEB-INF/taglib.tld" %>
+<%@ taglib prefix="archiva"   uri="/WEB-INF/tld/web-tags.tld" %>
 <%@ taglib prefix="s" uri="/struts-tags" %>
 
 <html>