Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Maven plugin goal for GenericExporter execution #138

Closed
timowest opened this issue May 3, 2012 · 2 comments
Closed

Create Maven plugin goal for GenericExporter execution #138

timowest opened this issue May 3, 2012 · 2 comments

Comments

@timowest
Copy link
Member

@timowest timowest commented May 3, 2012

Scala example:

import com.mysema.query.jpa.impl.JPAQuery
import com.mysema.query.scala.{ScalaEntitySerializer, ScalaTypeMappings}
import javax.persistence.Embeddable
import javax.persistence.Embedded
import javax.persistence.Entity
import javax.persistence.MappedSuperclass
import javax.persistence.Transient 
import com.mysema.query.codegen.GenericExporter

val exporter = new GenericExporter()
exporter.setTargetFolder(new java.io.File("target/generated-sources/queryDSL"))
exporter.setSerializerClass(classOf[ScalaEntitySerializer])
exporter.setTypeMappingsClass(classOf[ScalaTypeMappings])
exporter.setEmbeddableAnnotation(classOf[Embeddable])
exporter.setEmbeddedAnnotation(classOf[Embedded])
exporter.setEntityAnnotation(classOf[Entity])
exporter.setSkipAnnotation(classOf[Transient])
exporter.setSupertypeAnnotation(classOf[MappedSuperclass])
exporter.setCreateScalaSources(true)
exporter.export("yourpackage")
timowest added a commit that referenced this issue May 4, 2012
timowest added a commit that referenced this issue May 4, 2012
timowest added a commit that referenced this issue May 4, 2012
timowest added a commit that referenced this issue May 5, 2012
@timowest
Copy link
Member Author

@timowest timowest commented May 5, 2012

Scala example

  <plugin>
    <groupId>com.mysema.querydsl</groupId>
    <artifactId>querydsl-maven-plugin</artifactId>
    <version>${project.version}</version>
    <configuration>
      <testClasspath>true</testClasspath>
      <targetFolder>target/genericExporter</targetFolder>
      <scala>true</scala>
      <packages>
        <package>com.mysema.query.scala</package>
      </packages>
    </configuration>
    <dependencies>
      <dependency>
        <groupId>com.mysema.querydsl</groupId>
        <artifactId>querydsl-scala</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.scala-lang</groupId>
        <artifactId>scala-library</artifactId>
        <version>${scala.version}</version>
      </dependency>
    </dependencies>
  </plugin>   

timowest added a commit that referenced this issue May 5, 2012
@timowest
Copy link
Member Author

@timowest timowest commented May 25, 2012

Released in 2.6.0

@timowest timowest closed this May 25, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant