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

Compiler arguments with spaces #62

Closed
aleskurlovich opened this issue Jun 2, 2016 · 3 comments
Closed

Compiler arguments with spaces #62

aleskurlovich opened this issue Jun 2, 2016 · 3 comments
Assignees
Labels

Comments

@aleskurlovich
Copy link

aleskurlovich commented Jun 2, 2016

Hello

This is how we use it:

<plugin>
 <groupId>org.bsc.maven</groupId>
    <artifactId>maven-processor-plugin</artifactId>
    <executions>
        <execution>
            <id>eclipselink-jpa-metamodel</id>
            <goals>
                <goal>process</goal>
            </goals>
            <configuration>
                <compilerArguments>
                    -Aeclipselink.persistencexml=${basedir}/src/main/resources/META-INF/persistence.xml
                </compilerArguments>
                <processors>
                    <processor>org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor
                    </processor>
                </processors>
            </configuration>
        </execution>
    </executions>
    <dependencies>
        <dependency>
            <groupId>org.eclipse.persistence</groupId>
            <artifactId>org.eclipse.persistence.jpa.modelgen.processor</artifactId>
            <version>${eclipselink.version}</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>
</plugin>

The problem is that when ${basedir} includes spaces only last part of directory name will be used.
For example, C:\My project\src\main\resources\META-INF\persistence.xml will be used as project\src\main\resources\META-INF\persistence.xml.

@bsorrentino
Copy link
Owner

Hi

I'll check soon

have you tried : -Aeclipselink.persistencexml="${basedir}/src/main/resources/META-INF/persistence.xml"

@bsorrentino bsorrentino self-assigned this Jun 2, 2016
@bsorrentino
Copy link
Owner

Hi

I've checked the implementation and i just pass the compilerArguments to the compiler.

My thought is that the solution suggested above should work, let me know if it is so

Note:

Instead of compilerArguments use options that make your configuration more clear

<options>
 <eclipselink.persistencexml>'${basedir}/src/main/resources/META-INF/persistence.xml'</eclipselink.persistencexml>
</options>

@ChrisWilcox78
Copy link

Just a quick note on this one: wrapping the compiler arguments value in double quotes does not work but adding the options entry does (it looks like you don't even need the quotes in that case).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants