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

Generate from downloaded sources (no java project) #64

Open
fplini opened this issue Feb 2, 2017 · 1 comment
Open

Generate from downloaded sources (no java project) #64

fplini opened this issue Feb 2, 2017 · 1 comment
Labels

Comments

@fplini
Copy link

fplini commented Feb 2, 2017

Hi all! I have an angular 2 project (builded using maven) and on generate-sources I download some java files from another module. I want to generate TS from these java files saved into "target/be-sources" directory. Could I configure the plugin to set the dir input files instead of specific class/package?
An example of what I want to do is to set the input sources like this
/target/be-sources/**/*Controller.java

Thanks!

@atsu85
Copy link
Collaborator

atsu85 commented Feb 2, 2017

Hi @fplini,
(I'm maintaining java2typescript-jackson subproject, so I'm not so familiar with maven plugin, but I'll try to answer).
To be honest, java2typescript-maven-plugin hasn't been maintained since @raphaeljolivet got the initial implementation working (2013.12.30), but the features used by the maven plugin are standalone subprojects (java2typescript-jackson and java2typescript-jaxrs) so it might not matter much if You are willing to dig into the maven plugin code.

Regarding Your specific question - I'm not sure I understood it well enough to answer... Did I understand You correctly, that

I download some java files from another module

You are really download java source files, not compiled java classes? If so, You'll need to compile them before trying to generate typescript out of it. Also the class You feed into the maven plugin, needs to be on the runtime classpath of the plugin.

I want to generate TS from these java files saved into "target/be-sources" directory

That seems to be possible with tsOutFolder plugin parameter (also found in the plugin documentation)

Could I configure the plugin to set the dir input files instead of specific class/package?

Probably You'd need another build step (or extra plugin - I'm not very familiar with mvn ecosystem) to compile the sources before java2typescript-maven-plugin does its work, as the plugin works on the compiled java classes, not directly on sources.

@atsu85 atsu85 added the question label Feb 2, 2017
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