You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Michael Burton <mb...@gmail.com> on 2006/03/03 01:37:40 UTC

idea plugin and javadocs for maven 1.x

Hey all,

My company uses javadocs and external sources extensively in IntelliJ, and
it was driving me crazy to have to manually reconstruct them every time
someone regenerated the intellij module files using the idea plugin for
maven 1.x.

Here's the idea I started to put together.

project.xml:
        <dependency>
            <groupId>springframework</groupId>
            <artifactId>spring</artifactId>
            <version>1.2.6</version>
            <properties>
                <idea.javadocUrl>file:
//$ExternalSources$/spring-framework/1.2.6/docs/api</idea.javadocUrl>
                <idea.sourcesUrl>file:
//$ExternalSources$/spring-framework/1.2.6/src</idea.sourcesUrl>
            </properties>
        </dependency>


module.jelly:
--- /tmp/module.jelly   2006-03-02 10:28:50.000000000 -0800
+++ /Users/mburton/.maven/cache/maven-idea-plugin-1.6/plugin-resources/templates/v4/module.jelly
2006-03-02 08:52:17.000000000 -0800
@@ -202,8 +202,12 @@
               <CLASSES>
                 <root url="jar://${lib.path}!/"/>
               </CLASSES>
-              <JAVADOC/>
-              <SOURCES/>
+              <JAVADOC>
+                <root url="${dep.getProperty('idea.javadocUrl')}"/>
+              </JAVADOC>
+              <SOURCES>
+                <root url="${dep.getProperty('idea.sourcesUrl')}"/>
+              </SOURCES>
             </library>
           </orderEntry>
         </j:if>




The problem is that jelly/jexl barfs when the url element value contains a
colon. It also seems to try to do variable substitution on
$ExternalSources$.

Is there a way to get getProperty to return just the string literal and not
do any evaluation?  I tried going through the jelly and jexl docs but
couldn't figure out how to manage it.

Cheers,

Mike