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

Add dependency management in the core-build #1

Closed
loicdescotte opened this issue Jul 16, 2012 · 19 comments
Closed

Add dependency management in the core-build #1

loicdescotte opened this issue Jul 16, 2012 · 19 comments

Comments

@loicdescotte
Copy link
Contributor

It would be nice to be able to manage dependencies with kotlin-maven-plugin from the core module, or with ant/Ivy, to be able to run the sample project after cloning

@parroit
Copy link
Owner

parroit commented Jul 16, 2012

I Agree with you.
Have you seen my commit of idea project with maven references? I
'm not really an expert with Maven, I tryed to create a multi-module pom with the core module and the sample one, but I get some difficulty, so I revert ot include dependencien in the idea project.
But I would greatly prefer to use other methods such as you suggest.
Would you want to take care of this aspect ?

@loicdescotte
Copy link
Contributor Author

Yes i've seen the file, it could be a good start to define the right dependencies
Ok I will try to do it with maven or ant/ivy !

@parroit
Copy link
Owner

parroit commented Jul 16, 2012

Beautiful! I've added you as a collaborator, you would be able to commit changes.

@loicdescotte
Copy link
Contributor Author

Thanks :)

@loicdescotte
Copy link
Contributor Author

I've pushed the mavenized version on the mvnBuild branch.
The compilation works fine, for both core and "welcome" application (defined as a separated module).

But I don"t manage to compile the layout.html.kt file... (I've put it in a resource folder to avoid compilation failing). It seems to be an classpath error while using the compiler from maven in the CompileViewTest class : jdkHeaders must be included for mode REGULAR
So the application is not able to start.

Maybe this could be fixed after migrating templates to a kool.io base (with a String - html support if possible) ? Then we'll be able to merge this branch in the master.

See ya!

Loic

@parroit
Copy link
Owner

parroit commented Jul 17, 2012

Great work Loic! I already have the jdkHeaders problem.
You have to put kotlin-jdk-headers.jar under a folder called "ant", relative to the Kotlin compiler jar.
It's a bug in the compiler, I hope Kotlin guys will solve it soon.

@loicdescotte
Copy link
Contributor Author

Kool!! thank you I'll try this!

On Tue, Jul 17, 2012 at 3:14 PM, Andrea Parodi <
reply@reply.github.com

wrote:

Great work Loic! I already have the jdkHeaders problem.
You have to put kotlin-jdk-headers.jar under a folder called "ant",
relative to the Kotlin compiler jar.
It's a bug in the compiler, I hope Kotlin guys will solve it soon.


Reply to this email directly or view it on GitHub:
#1 (comment)

Loïc Descotte
4 rue Joseph Fourier
38000 Grenoble

06 23 23 36 80

@parroit
Copy link
Owner

parroit commented Jul 17, 2012

Ok, in the meanwhile, I'm improving RequestResponse creation, adding GET arguments management
(only POST arguments are working now).

James Strachan told me that StringTemplate HTML escaping it's not ready to use.
So I thought, just to make templates at least usable without huge security issues, to workaround the problem escaping anything passed has argument via GET or POST

@loicdescotte
Copy link
Contributor Author

I don't manage to deal the jdkHeaders stuff issue...
Where did you put this jar exactly? I've tried in the maven repo near the compiler jar, near the runtime, in the IDE plugin runtime, in the project classpath... I always have the error message :(

In the Kotlin mailing list I've found a message saying to put it in a "lib/alt" folder in the kolinc installation, didn't work either...

@parroit
Copy link
Owner

parroit commented Jul 18, 2012

I put it in lib/alt folder, but as I commented in sources, I actually
manage to compile the view only
in the test function.

Well, I think we could include the view compilation staff later, and by
now, just use standard kt kotlin files
for views.

If you saw the view compiler source, I just strip down from the source
the first two line and the last one,
assuming the view is built this way:

But the compiler just doesn't work if e.g. one make a view such this:

kotlin stuff

So I have to improve the compiler, is too fragile right now.

My purpose is to merge the maven branch with the main one, skipping the view compilation stuff (for now)
It's really important to have a project structure that simplify the process of trying for new users!

What is your opinion on this?

Yesterday I tryed to fetch the maven branch on my pc, but I get an authorization error...
Maybe having you created the branch you have to authorize my account?

@loicdescotte
Copy link
Contributor Author

I put it in lib/alt folder

You mean at the root of the project or in the kotlinc installation?

My purpose is to merge the maven branch with the main one

Good idea, it's strange that you don't own the rights on the branch, I can do the merge into the master myself if you're OK, so you'll be able to retrieve it.

@parroit
Copy link
Owner

parroit commented Jul 18, 2012

It's a path relative to the root of the project.
I'm perfectly ok if you want to do the merge. I'll retrieve the branch
when
you've done.

Il 18.07.2012 14:21 Loic Descotte ha scritto:

I put it in lib/alt folder

You mean at the root of the project or in the kotlinc installation?

My purpose is to merge the maven branch with the main one

Good idea, it's strange that you don't own the rights on the branch,
I can do the merge into the master myself if you're OK, so you'll be
able to retrieve it.


Reply to this email directly or view it on GitHub:
#1 (comment)

@loicdescotte
Copy link
Contributor Author

Maybe IDEA is not finding it because of the maven nature of the project...

Ok for the merge, I do it now

@loicdescotte
Copy link
Contributor Author

Done!

@parroit
Copy link
Owner

parroit commented Jul 18, 2012

Il 18.07.2012 15:31 Loic Descotte ha scritto:

Done!


Reply to this email directly or view it on GitHub:
#1 (comment)
Well, Loic, tonight I'll download and try it....

@parroit
Copy link
Owner

parroit commented Jul 18, 2012

It compile fine! kool... great work.
But I have a problem running the sample site, I think due to layout.html.kt moved to resource.
Anyway, waiting to improve the layout compilation, I think I'll rework the layout to try to use kool.template, so that we can
offer to users an easy way to try the sample.

@loicdescotte
Copy link
Contributor Author

Yes I've not managed to find the good behavior with this file... If we put it in the source folder compilation fails beacause of the <html> header...
Indeed, I guess using kool.template instead should solve this issue

@parroit
Copy link
Owner

parroit commented Jul 19, 2012

I fully understood the problem only after I do the maven compile. As said here the headers jar has to be put in a lib/ant folder, (supposing the compiler is in /lib)
But when we compile with Maven, we have no lib folder, because jar are download to maven cache.

@loicdescotte
Copy link
Contributor Author

You're right, and I've tried to copy the jar in the m2 repo, it's useless...

On Thu, Jul 19, 2012 at 9:25 AM, Andrea Parodi <
reply@reply.github.com

wrote:

I fully understood the problem only after I do the maven compile. As said
here
the headers jar has to
be put in a lib/ant folder, (supposing the compiler is in /lib)
But when we compile with Maven, we have no lib folder, because jar are
download to maven cache.


Reply to this email directly or view it on GitHub:
#1 (comment)

Loïc Descotte
4 rue Joseph Fourier
38000 Grenoble

06 23 23 36 80

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

No branches or pull requests

2 participants