And don't forget to vote for 'generated code support' in Idea [Jira
link is http://www.jetbrains.net/jira/browse/IDEABKL-2735 ]

On 6/29/07, Frederick N. Brier <[EMAIL PROTECTED]> wrote:
I am trying out AppFuse 2.0M5 on a new project.  I am trying to
integrate XmlBeans into the build.  I set the properties for the IDEA
Maven2 plugin.  When I run the IDEA target it does not include the
generated sources directory.    I open the Module Settings for the
project and the exclude is still there and the xmlbeans-source directory
is not tagged as a source directory.  The result is that IDEA is showing
errors in my code for unresolved references.  The following excerpts are
from my pom.xml:

         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>xmlbeans-maven-plugin</artifactId>
            <executions>
               <execution>
                  <goals>
                     <goal>xmlbeans</goal>
                  </goals>
               </execution>
            </executions>
            <inherited>true</inherited>
            <configuration>
               <schemaDirectory>src/main/xsd</schemaDirectory>
            </configuration>
         </plugin>

         <plugin>
            <artifactId>maven-idea-plugin</artifactId>
            <version>2.0</version>
            <configuration>
               <downloadSources>true</downloadSources>
               <downloadJavadocs>true</downloadJavadocs>
               <dependenciesAsLibraries>true</dependenciesAsLibraries>
               <useFullNames>false</useFullNames>
            </configuration>
         </plugin>

The latest version of the IDEA plugin listed on the plugin web page is
1.7 [http://maven.apache.org/maven-1.x/plugins/idea/downloads.html].
Yet the version 2.0 generated by AppFuse works fine..

       <dependency>
          <groupId>xmlbeans</groupId>
          <artifactId>xbean</artifactId>
          <version>2.2.0</version>
          <scope>compile</scope>
       </dependency>

In the appropriate places.  For some reason using version 2.3.0 does not
fetch the .jars, but that is another issue.

I added the generated sources directory for JavaDoc:

         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>

<sourcepath>${project.build.sourceDirectory};${project.build.directory}/xmlbeans-source</sourcepath>
               <links>
                  <link>http://java.sun.com/j2se/1.5.0/docs/api</link>
                  <link>http://java.sun.com/j2ee/1.4/docs/api</link>

<link>http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/api</link>

<link>http://jakarta.apache.org/commons/collections/apidocs-COLLECTIONS_3_0/</link>

<link>http://jakarta.apache.org/commons/fileupload/apidocs/</link>

<link>http://jakarta.apache.org/commons/logging/apidocs/</link>
                  <link>http://www.junit.org/junit/javadoc/</link>
                  <link>http://logging.apache.org/log4j/docs/api/</link>

<link>http://xmlbeans.apache.org/docs/2.2.0/reference/</link>
               </links>
            </configuration>
         </plugin>

And I set up the properties described on the IDEA plugin page
[http://maven.apache.org/maven-1.x/plugins/idea/properties.html] to
exclude the target directory and include the generated source directory.

      <!-- IDEA Settings.  Needed for XMLBeans -->
      <maven.idea.target.exclude>false</maven.idea.target.exclude>

<maven.idea.generated.source>${project.build.directory}/xmlbeans-source</maven.idea.generated.source>

I also tried specifying just "xmlbeans-source" for the
maven.idea.generated.source property, but that did not work either.  Any
suggestions?  Thank you!

Frederick N. Brier



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to