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

compilation errors #5

Closed
magick93 opened this issue Jul 21, 2015 · 6 comments
Closed

compilation errors #5

magick93 opened this issue Jul 21, 2015 · 6 comments
Assignees
Labels
Milestone

Comments

@magick93
Copy link

I have replaced the example SimpleObject class with the example in the readme, and the code generates fine - looks good.

However, when trying to run, I get the following:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project strategybuilder-dom: Compilation failure: Compilation failure:
[ERROR] /home/anton/Documents/software/isis/dom/src/main/java/domainapp/dom/app/homepage/HomePageViewModel.java:[21,36] package domainapp.dom.modules.simple does not exist
[ERROR] /home/anton/Documents/software/isis/dom/src/main/java/domainapp/dom/app/homepage/HomePageViewModel.java:[22,36] package domainapp.dom.modules.simple does not exist
[ERROR] /home/anton/Documents/software/isis/dom/src/main/java/domainapp/dom/app/homepage/HomePageViewModel.java:[38,17] cannot find symbol
[ERROR] symbol:   class SimpleObject
[ERROR] location: class domainapp.dom.app.homepage.HomePageViewModel
[ERROR] /home/anton/Documents/software/isis/dom/src/main/java/domainapp/dom/app/homepage/HomePageViewModel.java:[46,5] cannot find symbol
[ERROR] symbol:   class SimpleObjects
[ERROR] location: class domainapp.dom.app.homepage.HomePageViewModel
[ERROR] /home/anton/Documents/software/isis/dom/src/main/java/domainapp/dom/app/homepage/HomePageViewModel.java:[21,36] package domainapp.dom.modules.simple does not exist
[ERROR] /home/anton/Documents/software/isis/dom/src/main/java/domainapp/dom/app/homepage/HomePageViewModel.java:[22,36] package domainapp.dom.modules.simple does not exist
[ERROR] /home/anton/Documents/software/isis/dom/src/main/java/domainapp/dom/app/homepage/HomePageViewModel.java:[38,17] cannot find symbol
[ERROR] symbol:   class SimpleObject
[ERROR] location: class domainapp.dom.app.homepage.HomePageViewModel
[ERROR] /home/anton/Documents/software/isis/dom/src/main/java/domainapp/dom/app/homepage/HomePageViewModel.java:[46,5] cannot find symbol
[ERROR] symbol:   class SimpleObjects
[ERROR] location: class domainapp.dom.app.homepage.HomePageViewModel
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :strategybuilder-dom

Do I need to add the path to the generated source in the pom? If yes, where/how should I do that? I have tried adding:

 <build>
     <resources>
                    <resource>
                        <directory>target/generated-sources/isis/</directory>
                    </resource>
                </resources>

but this did not help.

Thanks

@tjuerge
Copy link
Contributor

tjuerge commented Jul 21, 2015

Do I need to add the path to the generated source in the pom?

Sure. The plan is to come up with a Isis Script Maven plugin which generates the Java code (currently the Java code is generated via Eclipse only!!!) and adds the output folder target/generated-sources/isis/ to the Maven projects list of source folders.

If yes, where/how should I do that?

As a workaround use the Build Helper Maven Plugin to add the output folder.

@tjuerge tjuerge added this to the 1.0 milestone Jul 21, 2015
@tjuerge tjuerge self-assigned this Jul 21, 2015
@tjuerge
Copy link
Contributor

tjuerge commented Jul 21, 2015

Btw. the <resources> tag is no alternative for the (single) <sourceDirectory> tag :-P

@magick93
Copy link
Author

Thanks

Do you have an example of a working pom? I've tried with the builder helper plugin, but - well I must have it mis-configured.

@tjuerge
Copy link
Contributor

tjuerge commented Jul 21, 2015

Do you have an example of a working pom? I've tried with the builder helper plugin, but - well I must have it mis-configured.

Nope, without an Isis Script Maven plugin (which generates the Java code duing a Maven build - currently the Java code is generated from within Eclipse via the Isis Script Eclipse editor only!!!) a Maven project will not work. After executing "mvn clean" the generated Java code is gone.

@tjuerge
Copy link
Contributor

tjuerge commented Jul 22, 2015

Do you have an example of a working pom? I've tried with the builder helper plugin, but - well I must have it mis-configured.

Nope, without an Isis Script Maven plugin (which generates the Java code duing a Maven build - currently the Java code is generated from within Eclipse via the Isis Script Eclipse editor only!!!) a Maven project will not work.

As mentioned in #6 using the generic xtext-maven-plugin should be sufficient.

Maybe you can give it a try. Don't forget to check-out the project and run mvn install to install the Isis Script DSL jar in your local Maven repository.

@tjuerge
Copy link
Contributor

tjuerge commented Jul 22, 2015

Do you have an example of a working pom? I've tried with the builder helper plugin, but - well I must have it mis-configured.

Please have a look into the POM of the simpleapp example.

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

2 participants