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

"export" goal of querydsl-maven-plugin can't create class implements java.io.Serializable #639

Closed
nabedge opened this issue Jan 25, 2014 · 7 comments
Milestone

Comments

@nabedge
Copy link

@nabedge nabedge commented Jan 25, 2014

refs #558 .

my pom.xml

        <plugin>
            <groupId>com.mysema.querydsl</groupId>
            <artifactId>querydsl-maven-plugin</artifactId>
            <version>3.3.0</version>
            <executions>
                <execution>
                    <goals>
                        <goal>export</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <jdbcDriver>org.postgresql.Driver</jdbcDriver>
                <!-- snip -->
                <beanInterfaces>java.io.Serializable</beanInterfaces>
                <exportBeans>true</exportBeans>
                <targetFolder>${project.basedir}/target/generated-sources/java</targetFolder>
            </configuration>

expected result: get the table bean source code like below:

pubilc class Foo implements java.io.Serializable { ...

actual result:

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to configure plugin parameters for: com.mysema.querydsl:querydsl-maven-plugin:3.3.0

(found static expression: 'java.io.Serializable' which may act as a default value).

Cause: Cannot assign configuration entry 'beanInterfaces' to 'class [Ljava.lang.String;' from 'java.io.Serializable', which is of type class java.lang.String

@timowest
Copy link
Member

@timowest timowest commented Jan 25, 2014

beanInterfaces is a String array, not a single string, not you need to provide the argument as an array.

<beanInterfaces>
    <beanInterface>java.io.Serializable</beanInterface>
</beanInterfaces>
@timowest timowest closed this Jan 25, 2014
@nabedge
Copy link
Author

@nabedge nabedge commented Jan 25, 2014

I'm sorry for my silly question.
Thank you timowest !

@beloglazov
Copy link

@beloglazov beloglazov commented Apr 22, 2014

@timowest is it possible to set a custom interface in beanInterfaces? Setting java.io.Serializable works fine, but when I set a custom interface it throws a ClassNotFoundException exception.

@timowest
Copy link
Member

@timowest timowest commented Apr 22, 2014

@beloglazov Yes, custom interfaces should be supported. I will take a look later today.

@timowest
Copy link
Member

@timowest timowest commented Apr 22, 2014

@beloglazov I made a pull request for this change #720

Could you try with the version 3.3.3.i639-SNAPSHOT from here https://oss.sonatype.org/content/repositories/snapshots/

@beloglazov
Copy link

@beloglazov beloglazov commented Apr 23, 2014

@timowest thanks for the fix! Sorry I can't easily test this snapshot at the moment as my project is using the spatial branch.

@timowest timowest reopened this Apr 30, 2014
@timowest timowest added the fixed label Apr 30, 2014
@timowest timowest added this to the 3.3.3 milestone Apr 30, 2014
@timowest
Copy link
Member

@timowest timowest commented May 2, 2014

Released in 3.3.3

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

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.