"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

Comments

Projects
None yet
3 participants
@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

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Jan 25, 2014

Member

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>
Member

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

This comment has been minimized.

Show comment
Hide comment
@nabedge

nabedge Jan 25, 2014

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

nabedge commented Jan 25, 2014

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

@beloglazov

This comment has been minimized.

Show comment
Hide comment
@beloglazov

beloglazov 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 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

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Apr 22, 2014

Member

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

Member

timowest commented Apr 22, 2014

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

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Apr 22, 2014

Member

@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/

Member

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

This comment has been minimized.

Show comment
Hide comment
@beloglazov

beloglazov 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 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

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest May 2, 2014

Member

Released in 3.3.3

Member

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