dspinellis / UMLGraph

Declarative specification and drawing of UML diagrams
http://www.spinellis.gr/umlgraph
BSD 3-Clause "New" or "Revised" License
341 stars 93 forks source link

Warning, could not find a line that matches the pattern '(Class|Interface|Enum)'. Class diagram reference not inserted #27

Open ericpinet opened 8 years ago

ericpinet commented 8 years ago

Hi,

Nice tool!

But when I execute this in maven project on Travis, I always have this issues during the generation of the javadoc :

Warning, could not find a line that matches the pattern '(Class|Interface|Enum) Gpio.*'.
Class diagram reference not inserted

See the build #135 in me repository : https://travis-ci.org/ericpinet/ConnectLife

I setup the UMLGraph with maven like this:

      <!-- Javadoc -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.3</version>
        <configuration>
          <excludePackageNames>com.connectlife.test</excludePackageNames>
          <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
          <docletArtifact>
            <groupId>org.umlgraph</groupId>
            <artifactId>doclet</artifactId>
            <version>5.1</version>
          </docletArtifact>
          <additionalparam>-all -view -views</additionalparam>
          <useStandardDocletOptions>true</useStandardDocletOptions>
        </configuration>
      </plugin>

Why the pattern is not match? The javadoc plugin version isn't compatible with this doclet?

dspinellis commented 8 years ago

The reason is probably that the javadoc generated HTML code has changed slightly and UMLGraph cannot detect where to insert the required changes.

ericpinet commented 8 years ago

Why UMLGraph cannot detect where to insert the required changes? The javadoc plugin version isn't compatible with this docket? How can I solve that?

dspinellis commented 8 years ago

Please compare the Pattern.compile calls in UmlGraphDoc.java against what's actually in the page you expect to be modified. Then adjust the regular expressions accordingly. (Try to keep them compatible with older versions.)

good-vi commented 5 years ago

Hi. Yep, javadoc has changed. But now for my Java8 project i use this kludge: https://gist.github.com/beguy/5223d5a3ad10a71a887091f99a042fd8