You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2011/08/26 15:20:23 UTC
svn commit: r1162108 - in /myfaces/myfaces-build-tools/trunk/maven2-plugins:
./ myfaces-jsdoc-plugin/ myfaces-jsdoc-plugin/src/
myfaces-jsdoc-plugin/src/main/ myfaces-jsdoc-plugin/src/main/java/
myfaces-jsdoc-plugin/src/main/java/org/ myfaces-jsdoc-plu...
Author: werpu
Date: Fri Aug 26 13:20:22 2011
New Revision: 1162108
URL: http://svn.apache.org/viewvc?rev=1162108&view=rev
Log:
https://issues.apache.org/jira/browse/MYFACES-3292
Added:
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/ (with props)
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/LICENSE.txt
- copied unchanged from r1068855, myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-javascript-plugin/LICENSE.txt
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/NOTICE.txt
- copied unchanged from r1068855, myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-javascript-plugin/NOTICE.txt
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/pom.xml
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/JSDocMojo.java
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/JSDocMojoConst.java
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/HTMLFileContentFilter.java
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/JSDocPack.java
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/JSDocPackMaven.java
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/JSDocPackResources.java
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/JSFileNameFilter.java
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/JSRun.java
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/XMLConfig.java
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/resources/
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/resources/META-INF/
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/resources/META-INF/NOTICE
- copied unchanged from r1068855, myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-javacc-plugin/src/main/resources/META-INF/NOTICE
Modified:
myfaces/myfaces-build-tools/trunk/maven2-plugins/pom.xml
Propchange: myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Aug 26 13:20:22 2011
@@ -0,0 +1 @@
+*.iml
Added: myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/pom.xml?rev=1162108&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/pom.xml (added)
+++ myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/pom.xml Fri Aug 26 13:20:22 2011
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, 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 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.myfaces.buildtools</groupId>
+ <artifactId>myfaces-plugin-parent</artifactId>
+ <version>1.0.4</version>
+ <relativePath>../myfaces-plugin-parent/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.apache.myfaces.buildtools</groupId>
+ <artifactId>myfaces-jsdoc-plugin</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>maven-plugin</packaging>
+ <name>Apache MyFaces Buildtools Maven2 Javascript Documentation Plugin</name>
+
+ <scm>
+ <connection>
+ scm:svn:http://svn.apache.org/repos/asf/myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-javascript-plugin
+ </connection>
+ <developerConnection>
+ scm:svn:https://svn.apache.org/repos/asf/myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-javascript-plugin
+ </developerConnection>
+ <url>http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-javascript-plugin
+ </url>
+ </scm>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>rhino</groupId>
+ <artifactId>js</artifactId>
+ <version>1.7R1</version>
+ </dependency>
+
+ <!-- note jsdoc throws a lot of warnings
+ which will be gone in 2.4 -->
+ <dependency>
+ <groupId>org.jsdoctoolkit</groupId>
+ <artifactId>jsdoc</artifactId>
+ <version>2.1.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.4</version>
+ </dependency>
+
+ <!-- we have to add the stax api just in case
+ we are on an older build system -->
+ <dependency>
+ <groupId>stax</groupId>
+ <artifactId>stax</artifactId>
+ <version>1.2.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ </dependencies>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-plugin-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+ </plugins>
+ </reporting>
+
+</project>
\ No newline at end of file
Added: myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/JSDocMojo.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/JSDocMojo.java?rev=1162108&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/JSDocMojo.java (added)
+++ myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/JSDocMojo.java Fri Aug 26 13:20:22 2011
@@ -0,0 +1,342 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, 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.
+ */
+package org.apache.myfaces.plugins.jsdoc;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.filefilter.TrueFileFilter;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.myfaces.plugins.jsdoc.util.HTMLFileContentFilter;
+import org.apache.myfaces.plugins.jsdoc.util.XMLConfig;
+import org.apache.myfaces.plugins.jsdoc.util.JSDocPack;
+import org.apache.myfaces.plugins.jsdoc.util.JSDocPackMaven;
+import org.apache.myfaces.plugins.jsdoc.util.JSFileNameFilter;
+
+import javax.xml.stream.XMLStreamException;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ * <p/>
+ * A simple jsdoc plugin which should cover our documentation needs
+ * Note this plugin is a simplified tailored derivate from
+ * <p/>
+ * http://www.abiss.gr some code stems from there.
+ * <p/>
+ * since we use jsdoc for now and are not in the reporting part
+ * a simple plugin suffices.
+ * @goal jsdoc
+ */
+public class JSDocMojo extends AbstractMojo
+{
+
+ /**
+ * the root project build dir (target directory)
+ *
+ * @parameter expression="${project.build.directory}"
+ */
+ String projectBuildDir;
+
+ /**
+ * The project source directory
+ *
+ * @parameter expression="${project.build.directory}/../src/main/javascript/META-INF/"
+ */
+ String buildSourceDirectory;
+
+ /**
+ * Path to the assembly file containing the file paths to our source javascript files
+ *
+ * @parameter expression="${project.build.directory}/../src/assembler/jsdoc-compiler.xml"
+ */
+ String assemblyFile;
+
+ //various jsdoc params, copied over as well as the corresponding snippets from
+ /**
+ * Whether to include symbols tagged as private. Default is <code>false</code>.
+ *
+ * @parameter expression="false"
+ */
+ boolean includePrivate;
+
+ /**
+ * Include all functions, even undocumented ones. Default is <code>false</code>.
+ *
+ * @parameter expression="false"
+ */
+ boolean includeUndocumented;
+
+ /**
+ * Include all functions, even undocumented, underscored ones. Default is <code>false</code>.
+ *
+ * @parameter expression="false"
+ */
+ boolean includeUndocumentedUnderscored;
+
+ /**
+ * template directory used by jsdoc the default is <code>templates/jsdoc</code> under the jsdoc root
+ *
+ * @parameter expression="templates/jsdoc"
+ */
+ String templates;
+
+ /**
+ * output dir override
+ *
+ * @parameter expression=""
+ */
+ String outputDirectory;
+
+ /**
+ * the parsed xml filemap containing the single source files
+ */
+ XMLConfig fileMap;
+
+ JSDocPack unpacker;
+
+ /**
+ * target path for the unpacked jsdoc engine
+ */
+ String jsdocEngineUnpacked = null;
+
+ /**
+ * target patchs for the javascript
+ */
+ String javascriptTargetPath = null;
+
+ /**
+ * run path for the jsdoc engine
+ */
+ String jsdocRunPath = null;
+
+ protected void _setup() throws MojoExecutionException
+ {
+ try
+ {
+ fileMap = new XMLConfig(assemblyFile);
+ }
+ catch (XMLStreamException e)
+ {
+ getLog().error(e);
+ throw new MojoExecutionException(e.toString());
+ }
+ catch (FileNotFoundException e)
+ {
+ getLog().error(e);
+ throw new MojoExecutionException(e.toString());
+ }
+ unpacker = new JSDocPackMaven();
+ //unpacker = new JSDocPackResources();
+
+ jsdocRunPath = projectBuildDir + File.separator + JSDocMojoConst.JSDOC;
+ jsdocEngineUnpacked = projectBuildDir + File.separator + JSDocMojoConst.TEMP
+ + File.separator + JSDocMojoConst.JSDOC;
+
+ javascriptTargetPath = jsdocRunPath + File.separator + JSDocMojoConst.JAVASCRIPT;
+
+ File pathCreator = new File(jsdocEngineUnpacked);
+ File jsdocPathCreator = new File(javascriptTargetPath);
+ pathCreator.mkdirs();
+ jsdocPathCreator.mkdirs();
+ }
+
+ public void _tearDown()
+ {
+
+ }
+
+ protected void _execute() throws MojoExecutionException, IOException
+ {
+
+ copyJavascripts();
+
+ fetchJavascriptSources();
+ //now we have all files we now can now work on our plugin call
+ unpackJSDoc();
+
+ String systemJsdocDir = setenvJSDocDir();
+ String userDir = setenvUserDir();
+ try
+ {
+ executeJSDoc();
+ }
+ finally
+ {
+ resetSysenvVars(systemJsdocDir, userDir);
+ }
+ }
+
+ private void resetSysenvVars(String systemJsdocDir, String userDir)
+ {
+ if (systemJsdocDir != null)
+ {
+ System.setProperty(JSDocMojoConst.JSDOC_DIR, systemJsdocDir);
+ }
+ if (userDir != null)
+ {
+ System.setProperty("user.dir", userDir);
+ }
+ }
+
+ private void executeJSDoc()
+ {
+ List args = _initArguments();
+
+ getLog().info("[JSDOC] Executing within maven: '" + args.toString().replaceAll(",", "") + "'");
+
+ // tell Rhino to run JSDoc with the provided params
+ // without calling System.exit
+
+ org.mozilla.javascript.tools.shell.Main.main((String[]) args.toArray(new String[0]));
+
+ this.fixHTML();
+ }
+
+ private String setenvUserDir()
+ {
+ String userDir = System.getProperty("user.dir");
+ System.setProperty("user.dir", jsdocEngineUnpacked + File.separator);
+ return userDir;
+ }
+
+ private String setenvJSDocDir()
+ {
+ String systemJsdocDir = System.getProperty(JSDocMojoConst.JSDOC_DIR);
+ System.setProperty(JSDocMojoConst.JSDOC_DIR, jsdocEngineUnpacked + File.separator);
+ return systemJsdocDir;
+ }
+
+ private void unpackJSDoc() throws IOException
+ {
+ getLog().info("[JSDOC] Unpacking jsdoc toolkit for further processing");
+ unpacker.unpack(jsdocEngineUnpacked, getLog());
+ getLog().info("[JSDOC] Unpacking jsdoc toolkit for further processing done");
+ }
+
+ /**
+ * initially copies all source files from the given source dir to the target
+ * dir so that the files can be referenced later on by the html files
+ */
+ private void copyJavascripts() throws IOException
+ {
+ getLog().info("[JSDOC] Copying all javascript sources to the target dir for later reference");
+ FileUtils.copyDirectory(new File(buildSourceDirectory), new File(javascriptTargetPath));
+ getLog().info("[JSDOC] Copying done without any errors");
+ }
+
+ private final List _initArguments()
+ {
+ List args = new ArrayList();
+ String runJsPath = jsdocEngineUnpacked + File.separator + JSDocMojoConst.APP
+ + File.separator + JSDocMojoConst.RUN_JS;
+ args.add(runJsPath);
+
+ if (this.includeUndocumented)
+ {
+ args.add(JSDocMojoConst.PARAM_UNDOCUMENTED);
+ }
+ if (this.includeUndocumentedUnderscored)
+ {
+ args.add(JSDocMojoConst.PARAM_UNDOCUMENTED_UNDERSCORED);
+ }
+ if (this.includePrivate)
+ {
+ args.add(JSDocMojoConst.PARAM_PRIVATE);
+ }
+ args.add(JSDocMojoConst.PARAM_OUTPUT + JSDocMojoConst.EQUALS + this.getOutputDirectory());
+ args.add(JSDocMojoConst.PARAM_TEMPLATE + JSDocMojoConst.EQUALS + getTemplateDirectory());
+
+ args.addAll(fetchJavascriptSources());
+ //according to the run.js source the last argument
+ //must be a -j param pointing to the jsdoc javascripts
+ args.add(JSDocMojoConst.PARAM_JS_FLAG + JSDocMojoConst.EQUALS + runJsPath);
+ return args;
+ }
+
+ /**
+ * @return the directory as absolute path holding the jsdoc toolkit templates
+ */
+ private final String getTemplateDirectory()
+ {
+ return (JSDocMojoConst.TEMPLATES_JSDOC.equals(this.templates)) ?
+ this.jsdocEngineUnpacked + File.separator + this.templates :
+ this.templates;
+ }
+
+ /**
+ * @return the target directory for the jsdoc files
+ */
+ private final String getOutputDirectory()
+ {
+ return (this.outputDirectory == null || this.outputDirectory.equals("")) ?
+ projectBuildDir + File.separator + JSDocMojoConst.JSDOC :
+ this.outputDirectory;
+
+ }
+
+ /**
+ * @return fetches the sources for the javascripts in the order given by the xml
+ */
+ private List fetchJavascriptSources()
+ {
+ getLog().info("[JSDOC] Fetch Javascript sources for further processing");
+ JSFileNameFilter fileNameFilter = new JSFileNameFilter(fileMap);
+ FileUtils.iterateFiles(new File(getOutputDirectory()), fileNameFilter, TrueFileFilter.INSTANCE);
+
+ Map sortedResult = fileNameFilter.getSortedResults();
+ List sources = new ArrayList(sortedResult.size());
+ Iterator it = sortedResult.entrySet().iterator();
+ while (it.hasNext())
+ {
+ Map.Entry singleItem = (Map.Entry) it.next();
+ String finalFileName = (String) singleItem.getValue();
+ sources.add(finalFileName);
+ }
+ getLog().info("[JSDOC] All Javascript sources are prepared for processing");
+ return sources;
+ }
+
+ private void fixHTML()
+ {
+ FileUtils.iterateFiles(new File(getOutputDirectory()), new HTMLFileContentFilter(getOutputDirectory()),
+ TrueFileFilter.INSTANCE);
+ }
+
+ public void execute() throws MojoExecutionException
+ {
+ _setup();
+ try
+ {
+ _execute();
+ }
+ catch (IOException e)
+ {
+ throw new MojoExecutionException(e.toString());
+ }
+
+ }
+
+}
Added: myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/JSDocMojoConst.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/JSDocMojoConst.java?rev=1162108&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/JSDocMojoConst.java (added)
+++ myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/JSDocMojoConst.java Fri Aug 26 13:20:22 2011
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, 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.
+ */
+package org.apache.myfaces.plugins.jsdoc;
+
+/**
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+
+public class JSDocMojoConst
+{
+ public static final String TEMPLATES_JSDOC = "templates/jsdoc";
+ public static final String JSDOC = "jsdoc";
+ public static final String TEMP = "temp";
+ public static final String JSDOC_DIR = "jsdoc.dir";
+ public static final String APP = "app";
+ public static final String RUN_JS = "run.js";
+ public static final String PARAM_UNDOCUMENTED = "-a";
+ public static final String PARAM_UNDOCUMENTED_UNDERSCORED = "-A";
+ public static final String PARAM_PRIVATE = "-p";
+ public static final String PARAM_OUTPUT = "-d";
+ public static final String PARAM_TEMPLATE = "-t";
+ public static final String PARAM_JS_FLAG = "-j";
+ public static final String EQUALS = "=";
+ public static final String JAVASCRIPT = "javascript";
+}
Added: myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/HTMLFileContentFilter.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/HTMLFileContentFilter.java?rev=1162108&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/HTMLFileContentFilter.java (added)
+++ myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/HTMLFileContentFilter.java Fri Aug 26 13:20:22 2011
@@ -0,0 +1,100 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, 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.
+ */
+package org.apache.myfaces.plugins.jsdoc.util;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.filefilter.IOFileFilter;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ * <p/>
+ * Since jsdoc adds the full canonical path to our filenames we have to fix it within the generated html
+ */
+
+public class HTMLFileContentFilter implements IOFileFilter
+{
+
+ String substitutionDir;
+
+ public HTMLFileContentFilter(String substitutionDir)
+ {
+ this.substitutionDir = substitutionDir;
+ }
+
+ private boolean fixFile(String fileName) throws IOException
+ {
+ if (!fileName.toLowerCase().endsWith(".html"))
+ {
+ return false;
+ }
+ String fileContents = FileUtils.readFileToString(new File(fileName));
+ List currFile = FileUtils.readLines(new File(fileName));
+ List targetLines = new ArrayList(currFile.size());
+ Iterator it = currFile.iterator();
+ while (it.hasNext())
+ {
+ Object line = it.next();
+ String sLine = (String) line;
+ targetLines.add(sLine.replaceAll(substitutionDir, ""));
+ }
+ FileUtils.writeLines(new File(fileName), targetLines);
+ return true;
+ }
+
+ public boolean accept(File file)
+ {
+ if (file.isDirectory())
+ {
+ return false;
+ }
+ try
+ {
+ fixFile(file.getAbsolutePath());
+ }
+ catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ return true;
+ }
+
+ public boolean accept(File file, String s)
+ {
+ if (file.isDirectory())
+ {
+ return false;
+ }
+ try
+ {
+ fixFile(file.getAbsolutePath() + File.separator + s);
+ }
+ catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ return true;
+ }
+}
Added: myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/JSDocPack.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/JSDocPack.java?rev=1162108&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/JSDocPack.java (added)
+++ myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/JSDocPack.java Fri Aug 26 13:20:22 2011
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, 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.
+ */
+package org.apache.myfaces.plugins.jsdoc.util;
+
+import org.apache.maven.plugin.logging.Log;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.FileOutputStream;
+
+import java.util.Enumeration;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+
+/**
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ * <p/>
+ * base class for all our jsdoc unpackers
+ */
+
+public abstract class JSDocPack
+{
+ String _jarPath;
+ File _jsdocContainer;
+
+ protected JSDocPack()
+ {
+
+ }
+
+ public abstract void unpack(String targetDir, Log log) throws IOException;
+
+ protected void _expandJarFile(String targetDir, Log log, JarFile jarFile) throws IOException
+ {
+ Enumeration entries = jarFile.entries();
+ while (entries.hasMoreElements())
+ {
+ JarEntry entry = (JarEntry) entries.nextElement();
+
+ File targetFile = new File(targetDir + File.separator + entry.getName());
+ if (entry.isDirectory())
+ {
+ targetFile.mkdir();
+ continue;
+ }
+ InputStream istr = new BufferedInputStream(jarFile.getInputStream(entry));
+ OutputStream ostr = new BufferedOutputStream(new FileOutputStream(targetFile));
+ log.debug("[JSDOC] Unpacking jar:Â Writing" + targetFile);
+ while (istr.available() > 0)
+ {
+ ostr.write(istr.read());
+ }
+ ostr.close();
+ istr.close();
+ }
+ }
+
+}
Added: myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/JSDocPackMaven.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/JSDocPackMaven.java?rev=1162108&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/JSDocPackMaven.java (added)
+++ myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/JSDocPackMaven.java Fri Aug 26 13:20:22 2011
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, 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.
+ */
+package org.apache.myfaces.plugins.jsdoc.util;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.jar.JarFile;
+
+/**
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ * <p/>
+ * An unpacker for the jsdoc toolkit
+ * Unfortunately we have to unpack the jsdoc toolkit during
+ * the build process because we have a set of js files
+ * running via rhino which will not work unless we have them
+ * on the filesystem instead of the jar.
+ * <p/>
+ * The jsdoc toolkit itself can be streamed in via maven.
+ */
+
+public class JSDocPackMaven extends JSDocPack
+{
+
+ /**
+ * constructor
+ */
+ public JSDocPackMaven()
+ {
+ super();
+ _jarPath = fetchJarLocation();
+
+ }
+
+ /**
+ * public method which is called from the outside
+ * unpacks the current jsdoc package into our target dir
+ *
+ * @param targetDir the target dir to unpack to
+ * @param log the target log to log into
+ * @throws java.io.IOException in case of an error
+ */
+ public void unpack(String targetDir, org.apache.maven.plugin.logging.Log log) throws IOException
+ {
+ JarFile jarFile = new JarFile(_jarPath);
+ _expandJarFile(targetDir, log, jarFile);
+ }
+
+ /**
+ * fetches the location of the jsdoc hosting jar,
+ * the location already should be in maven and our main
+ * constant is the <code>app/main.js</code> file which should be present
+ * everywhere
+ *
+ * @return a string to the location
+ */
+ protected String fetchJarLocation()
+ {
+ URL markerResourceLocation = this.getClass().getClassLoader().getResource("app/main.js");
+ String markerResource = markerResourceLocation.getFile();
+ markerResource = markerResource.substring(5);
+ markerResource = markerResource.substring(0, markerResource.length() - "!/app/main.js".length());
+ return markerResource;
+ }
+
+}
Added: myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/JSDocPackResources.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/JSDocPackResources.java?rev=1162108&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/JSDocPackResources.java (added)
+++ myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/JSDocPackResources.java Fri Aug 26 13:20:22 2011
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, 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.
+ */
+package org.apache.myfaces.plugins.jsdoc.util;
+
+import org.apache.commons.io.FileUtils;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.jar.JarFile;
+
+/**
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ * <p/>
+ * unpacks a locally hosted jsdoc (which is placed in our resources folder
+ */
+
+public class JSDocPackResources extends JSDocPack
+{
+ /**
+ * constructor
+ */
+ public JSDocPackResources()
+ {
+ super();
+ }
+
+ public void unpack(String targetDir, org.apache.maven.plugin.logging.Log log) throws IOException
+ {
+ JarFile jarFile = null;
+ try
+ {
+ jarFile = new JarFile(fetchJarLocation());
+ _expandJarFile(targetDir, log, jarFile);
+ }
+ catch (URISyntaxException e)
+ {
+ throw new IOException(e);
+ }
+
+ }
+
+ protected File fetchJarLocation() throws IOException, URISyntaxException
+ {
+ URL markerResourceLocation = this.getClass().getClassLoader().getResource("jsdoc-toolkit-2.4.0.jar");
+ //we cannot simply use the uri we have to copy the file over to a temp file first
+ File tempFile = File.createTempFile("jsdoc-toolkit-2.4.0", "jar");
+ tempFile.deleteOnExit();
+ FileUtils.copyURLToFile(markerResourceLocation, tempFile);
+
+ return tempFile;
+
+ }
+}
Added: myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/JSFileNameFilter.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/JSFileNameFilter.java?rev=1162108&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/JSFileNameFilter.java (added)
+++ myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/JSFileNameFilter.java Fri Aug 26 13:20:22 2011
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, 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.
+ */
+package org.apache.myfaces.plugins.jsdoc.util;
+
+import org.apache.commons.io.FilenameUtils;
+import org.apache.commons.io.filefilter.IOFileFilter;
+
+import java.io.File;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.TreeMap;
+
+/**
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ * <p/>
+ * A javascript filename filter which can be used within the context of commons-io
+ */
+public class JSFileNameFilter implements IOFileFilter
+{
+
+ XMLConfig _fileMap = null;
+
+ Map _sortedResults = new TreeMap();
+
+ public JSFileNameFilter(XMLConfig fileMap)
+ {
+ this._fileMap = fileMap;
+ }
+
+ private boolean matchNames(String fileName)
+ {
+ Iterator it = _fileMap.getFileNames().iterator();
+ while (it.hasNext())
+ {
+ String matchPattern = (String) it.next();
+ boolean matches = FilenameUtils.wildcardMatch(fileName, matchPattern);
+ if (matches)
+ {
+ _sortedResults.put(_fileMap.getFileNameIdx().get(matchPattern), fileName);
+ return matches;
+ }
+ }
+ return false;
+ }
+
+ public boolean accept(File file)
+ {
+ //no js file no match
+ return file.getName().endsWith(".js") && matchNames(file.getAbsolutePath());
+ }
+
+ public boolean accept(File file, String s)
+ {
+ return s.endsWith(".js") && matchNames(file.getAbsolutePath() + "/" + s);
+ }
+
+ public XMLConfig getFileMap()
+ {
+ return _fileMap;
+ }
+
+ public void setFileMap(XMLConfig fileMap)
+ {
+ _fileMap = fileMap;
+ }
+
+ public Map getSortedResults()
+ {
+ return _sortedResults;
+ }
+
+ public void setSortedResults(Map sortedResults)
+ {
+ _sortedResults = sortedResults;
+ }
+}
+
+
Added: myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/JSRun.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/JSRun.java?rev=1162108&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/JSRun.java (added)
+++ myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/JSRun.java Fri Aug 26 13:20:22 2011
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, 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.
+ */
+package org.apache.myfaces.plugins.jsdoc.util;
+
+/**
+ * A trivial bootstrap class that simply adds the path to the
+ * .js file as an argument to the Rhino call. This little hack
+ * allows the code in the .js file to have access to it's own
+ * path via the Rhino arguments object. This is necessary to
+ * allow the .js code to find resource files in a location
+ * relative to itself.
+ * <p/>
+ * USAGE: java -jar jsrun.jar path/to/file.js
+ */
+public class JSRun
+{
+ public static void main(String[] args)
+ {
+ String[] jsargs = {"-j=" + args[0]};
+
+ String[] allArgs = new String[jsargs.length + args.length];
+ System.arraycopy(args, 0, allArgs, 0, args.length);
+ System.arraycopy(jsargs, 0, allArgs, args.length, jsargs.length);
+
+ org.mozilla.javascript.tools.shell.Main.main(allArgs);
+ }
+}
Added: myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/XMLConfig.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/XMLConfig.java?rev=1162108&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/XMLConfig.java (added)
+++ myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jsdoc-plugin/src/main/java/org/apache/myfaces/plugins/jsdoc/util/XMLConfig.java Fri Aug 26 13:20:22 2011
@@ -0,0 +1,135 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, 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.
+ */
+package org.apache.myfaces.plugins.jsdoc.util;
+
+import javax.xml.stream.XMLEventReader;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.events.XMLEvent;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+//import static javax.xml.stream.XMLStreamConstants.*;
+
+/**
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ * <p/>
+ * A helper which reads the xml config appopriately
+ */
+
+public class XMLConfig
+{
+
+ String _fileName = null;
+
+ List _fileNames = null;
+ Map _fileNameIdx = new HashMap();
+
+ public XMLConfig(String fileName) throws XMLStreamException, FileNotFoundException
+ {
+ _fileName = fileName;
+ _fileNames = new LinkedList();
+ postCreate();
+ }
+
+ protected void postCreate() throws XMLStreamException, FileNotFoundException
+ {
+ XMLInputFactory inputFactory = XMLInputFactory.newInstance();
+ // einen neuen eventReader einrichten
+ InputStream in = new FileInputStream(_fileName);
+ XMLEventReader parser = inputFactory.createXMLEventReader(in);
+ StringBuilder elementText = null;
+
+ int cnt = 0;
+ while (parser.hasNext())
+ {
+ XMLEvent event = parser.nextEvent();
+ switch (event.getEventType())
+ {
+ case XMLStreamConstants.END_DOCUMENT:
+ parser.close();
+ break;
+ case XMLStreamConstants.START_ELEMENT:
+ if (!event.asStartElement().getName().toString().equals("include"))
+ {
+ break;
+ }
+ elementText = new StringBuilder(100);
+ break;
+ case XMLStreamConstants.CHARACTERS:
+ if (elementText == null)
+ {
+ break;
+ }
+ elementText.append(event.asCharacters().getData());
+ break;
+ case XMLStreamConstants.END_ELEMENT:
+ if (!event.asEndElement().getName().toString().equals("include") || elementText == null)
+ {
+ break;
+ }
+
+ _fileNames.add(elementText.toString());
+ _fileNameIdx.put(elementText.toString(), new Integer(cnt));
+ cnt++;
+ elementText = null;
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ public String getFileName()
+ {
+ return _fileName;
+ }
+
+ public void setFileName(String fileName)
+ {
+ _fileName = fileName;
+ }
+
+ public List getFileNames()
+ {
+ return _fileNames;
+ }
+
+ public void setFileNames(List fileNames)
+ {
+ _fileNames = fileNames;
+ }
+
+ public Map getFileNameIdx()
+ {
+ return _fileNameIdx;
+ }
+
+ public void setFileNameIdx(Map fileNameIdx)
+ {
+ _fileNameIdx = fileNameIdx;
+ }
+}
Modified: myfaces/myfaces-build-tools/trunk/maven2-plugins/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-plugins/pom.xml?rev=1162108&r1=1162107&r2=1162108&view=diff
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-plugins/pom.xml (original)
+++ myfaces/myfaces-build-tools/trunk/maven2-plugins/pom.xml Fri Aug 26 13:20:22 2011
@@ -61,6 +61,7 @@
<module>myfaces-i18n-plugin</module>
<module>myfaces-javacc-plugin</module>
<module>myfaces-javascript-plugin</module>
+ <module>myfaces-jsdoc-plugin</module>
<module>myfaces-jdev-plugin</module>
<module>myfaces-tagdoc-plugin</module>
<module>myfaces-wagon-plugin</module>