db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeffrey Brekke" <ekke...@gmail.com>
Subject Re: Any reason not to move to 3.3 final yet?
Date Tue, 22 Jan 2008 14:57:48 GMT
Thomas,

Thanks for taking the time to explain this.  It makes sense to me why we
moved the non-base classes into the src/main tree by default.  For our case,
we only want them in the src/main tree once we decide to improve them.
Until then, we would them to be regenerated each time and cleaned.  So being
able to change the output directory worked fine for us, and the javadoc goal
runs correctly when I have both base and non-base classes generating in the
same dir under target.

What doesn't seem to work for me is NOT changing the location and just using
the default settings of the plugin.  If I just create a standalone project,
with one schema file, the plugin will generate the code correctly but the
javadoc:javadoc goal fails.  It looks like an issue with the additional
generated-java directory under src/main, that a trailing slash is missing:

[INFO] An error has occurred in JavaDocs report generation:Exit code: 1 -
javadoc: error - Illegal package name: "...generated- java.qds.solutions.om"

qds.solutions.om is my package name.  Could you try the javadoc:javadoc goal
in one of your projects?  I'm just concerned that we have default settings
that break a different plugin.  I've started with a clean pom, no other
plugins or parents being used:

<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>
  <groupId>test</groupId>
  <artifactId>test</artifactId>
  <version>1.0-SNAPSHOT</version>

  <name>Test App</name>
  <description>Test App</description>

  <dependencies>

    <dependency>
      <groupId>org.apache.torque</groupId>
      <artifactId>torque-runtime</artifactId>
      <version>3.3-RC3</version>
    </dependency>

  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.torque</groupId>
        <artifactId>torque-maven-plugin</artifactId>
        <version>3.3-RC3</version>

        <configuration>
          <targetDatabase>sybase</targetDatabase>
          <targetPackage>qds.solutions.om</targetPackage>
        </configuration>

        <executions>
          <execution>
            <goals>
              <phase>generate-sources</phase>
              <goal>sql</goal>
              <goal>om</goal>
              <goal>documentation</goal>
            </goals>
          </execution>
        </executions>

      </plugin>
    </plugins>
  </build>

</project>


On Jan 22, 2008 1:22 AM, Thomas Fischer <fischer@seitenbau.net> wrote:

> The reason for splitting the generated sources was that the non-base
> classes are intended to be improved manually. As they were in the target
> directory in the 3.3-RC1 directory layout, a "mvn clean" just nuked all
> the
> wonderfully improved classes. In contrary, the base classes are not
> intended to be modified manually, and these should be removed by a "mvn
> clean". The solution was to leave the base classes where they were and
> move
> the non-base classes to src/main/generated-java (the reason for not using
> the src/main/java directory was that I was uneasy about generating stuff
> into a directory not intended for automatic generation)
>
> The change was discussed on torque-dev, see
>
>
> http://mail-archives.apache.org/mod_mbox/db-torque-dev/200701.mbox/%3c20070122133159.R5104@minotaur.apache.org%3e
>
> and nobody objected. I've been working with that layout in some projects
> and so far I did not spot any weak spots. The only issue which is
> questionable whether the base classes should be generated in
> target/generated-sources instead of targer/generated-sources/torque (for
> compliance with other code generation tools that use
> target/generated-sources), but that is a minor issue and easily
> reconfigured.
>
> Maybe your problem arises from adding the directory
> target/generated-sources/torque to maven's compileSources twice (the
> plugin
> does not check whether the two directories for base and non-base classes
> are the same). If you want the non-base classes to be in the target tree,
> can you perhaps try another directory for the non-base classes (e.g.
> target/generated-sources/torque-non-base)
>
> Maybe the problem is due to another code-genrating plugin you are using
> which uses the taget-generated-sources directory. In this case, you can
> reconfigure the torque plugin to also use the target-generated-sources
> directory, using the following configuration:
>
>        <configuration>
>          <baseOutputDir>${project.build.directory}/generated-sources</
> baseOutputDir>
>          <baseReportFile>
> ../torque/report.${project.artifact.artifactId}.om.base.generation</
> baseReportFile>
>        </configuration>
>
>
>      Thomas
>
> "Jeffrey Brekke" <ekkerbj@gmail.com> schrieb am 21.01.2008 19:47:51:
>
> > Just skipping the site goals allow me to build and it seems so far
> > everything is working.  But I was using 3.3-RC1 and without additional
> > configuration, generated sources are put in the
> > target/generated-sources/torque directory, this includes the
> BaseXXXX.javaand
> > XXXX.java generated sources.  It doesn't create a generated-java
> directory
> > under src/main.  The default for <outputDir> for the om goal changed.
>  So
> > here is what I had to do to my pom.xml
> >
> >         <executions>
> >           <execution>
> >             <id>sql-and-docs</id>
> >             <goals>
> >               <phase>generate-sources</phase>
> >               <goal>sql</goal>
> >               <goal>documentation</goal>
> >             </goals>
> >           </execution>
> >           <execution>
> >             <id>om</id>
> >             <goals>
> >               <phase>generate-sources</phase>
> >               <goal>om</goal>
> >             </goals>
> >             <configuration>
> >               <outputDir>${project.build.directory
> > }/generated-sources/torque</outputDir>
> >             </configuration>
> >           </execution>
> >         </executions>
> >
> > I can't remember if there was a problem after 3.3-RC1 that changed this
> > default ( or maybe I built it locally with that default ), but that
> seems
> to
> > be the issue.  The reporting plugin has no issues with the above config,
> but
> > if the generated-java directory is used, the maven-javadoc plugin
> complains.
> >
> > ----
> >
> > On Jan 21, 2008 11:22 AM, Thomas Fischer <fischer@seitenbau.net> wrote:
> >
> > > Hm this seems to be a problem in a reporting plugin, not the torque
> plugin
> > > itself. Probably the directory structure is incompatible.
> > > Can you disable the reporting section and run it again ?
> > >
> > >    Thomas
> > >
> > > "Jeffrey Brekke" <ekkerbj@gmail.com> schrieb am 21.01.2008 18:00:25:
> > >
> > > > Thanks, I have it running now, but I'm getting a strange javadoc gen
> > > error
> > > > when running the site:site goal:
> > > >
> > > > Loading source files for package org.apache.torque.linkage...
> > > > 1 error
> > > > [INFO]
> > > >
> ------------------------------------------------------------------------
> > > > [ERROR] BUILD ERROR
> > > > [INFO]
> > > >
> ------------------------------------------------------------------------
> > > > [INFO] Error during page generation
> > > >
> > > > Embedded error: Error rendering Maven report: Exit code: 1 -
> javadoc:
> > > error
> > > > - Illegal package name: "...generated-java.qds.solutions.om"
> > > >
> > > > Command line was:"cd
> > > > /home/jbrekke/sandbox/solutions/solutions-om/target/site/apidocs &&
> > > > /usr/java/jdk1.6.0/jre/../bin/javadoc" -J-DproxyHost=XXXXXX
> > > > -J-DproxyPort=XXXX @options @packages
> > > >
> > > > I'm trying some runtime tests now.  I know previously there were
> some
> > > issues
> > > > starting up Turbine with RC2, but this seems to be resolved.  Looks
> like
> > > its
> > > > working here...
> > > >
> > > > On Jan 21, 2008 8:57 AM, Thomas Fischer <fischer@seitenbau.net>
> wrote:
> > > >
> > > > >
> > > > > "Jeffrey Brekke" <ekkerbj@gmail.com> schrieb am 21.01.2008
> 15:28:58:
> > > > >
> > > > > > I'm trying to get the binaries and give it a shot, but I'm
> having
> > > > > trouble
> > > > > > finding a maven2 plugin that is built.  Is there a way we can
> get
> > > > > > 3.3RC3binaries up into a m2 repo?
> > > > >
> > > > >
> http://repo1.maven.org/maven2/org/apache/torque/torque-maven-plugin/
> > > > >
> > > > > Sorry, the groupId changed (org.apache.db.torque ->
> org.apache.torque
> > > ),
> > > > > blame me for not selecting the correct one in the first place.
> > > > >
> > > > >         Thomas
> > > > >
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
> > > > > For additional commands, e-mail: torque-dev-help@db.apache.org
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Jeffrey D. Brekke
> > > > Wisconsin,  USA
> > > >
> > > > brekke at apache dot org
> > > > ekkerbj at gmail dot com
> > > > jbrekke at wi dot rr dot com
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
> > > For additional commands, e-mail: torque-dev-help@db.apache.org
> > >
> >
> >
> >
> > --
> > Jeffrey D. Brekke
> > Wisconsin,  USA
> >
> > brekke at apache dot org
> > ekkerbj at gmail dot com
> > jbrekke at wi dot rr dot com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-dev-help@db.apache.org
>



-- 
Jeffrey D. Brekke
Wisconsin,  USA

brekke at apache dot org
ekkerbj at gmail dot com
jbrekke at wi dot rr dot com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message