branaway / japid42

A full feaured Java-based template engine for Play2
57 stars 11 forks source link

Play2.1-SNAPSHOT - Fails to publish with "javadoc: error - invalid flag: -g" #8

Closed brainwatch closed 11 years ago

brainwatch commented 11 years ago

I'm testing the multi-module router feature supported by Play2.1-SNAPSHOT. Hence would like to test the same with japid resources residing in the respective modules itself rather than moving it to the base module as we do currently for routes definition.

I tried changing the sbt version and build scala dependency definition as per play2.1-SNAPSHOT requirement and tried publishing. Compilation and packaging was successful but doc generation throws error.

Log trace for your reference:

[japid42] $ publish-local [info] Wrote D:\japid42\target\scala-2.10\japid42_2.10-0.5.2.pom [info] :: delivering :: japid42#japid42_2.10;0.5.2 :: 0.5.2 :: release :: Thu Nov 01 07:12:14 IST 2012 [info] Generating Java API documentation for main sources to D:\japid42\target\scala-2.10\api... [info] delivering ivy file to D:\japid42\target\scala-2.10\ivy-0.5.2.xml [error] javadoc: error - invalid flag: -g [info] usage: javadoc [options] [packagenames] [sourcefiles] [@files] . . . . [info] 1 error error javadoc returned nonzero exit code [error] Total time: 1 s, completed Nov 1, 2012 7:12:15 AM [japid42] $


Expecting your support.

branaway commented 11 years ago

sure£¬ will take a look

bing ran, en route

ÔÚ 2012-11-1£¬13:08£¬brainwatch notifications@github.com дµÀ£º

I'm testing the multi-module router feature supported by Play2.1-SNAPSHOT. Hence would like to test the same with japid resources residing in the respective modules itself rather than moving it to the base module as we do currently for routes definition.

I tried changing the sbt version and build scala dependency definition as per play2.1-SNAPSHOT requirement and tried publishing. Compilation and packaging was successful but doc generation throws error.

Log trace for your reference:

[japid42] $ publish-local [info] Wrote D:\japid42\target\scala-2.10\japid42_2.10-0.5.2.pom [info] :: delivering :: japid42#japid42_2.10;0.5.2 :: 0.5.2 :: release :: Thu Nov 01 07:12:14 IST 2012 [info] Generating Java API documentation for main sources to D:\japid42\target\scala-2.10\api... [info] delivering ivy file to D:\japid42\target\scala-2.10\ivy-0.5.2.xml [error] javadoc: error - invalid flag: -g [info] usage: javadoc [options] [packagenames] [sourcefiles] [@files] . . . . [info] 1 error error javadoc returned nonzero exit code [error] Total time: 1 s, completed Nov 1, 2012 7:12:15 AM [japid42] $

Expecting your support.

¡ª Reply to this email directly or view it on GitHub.

branaway commented 11 years ago

I could not figure this out yet. It seems the building process added -g to the javadoc command which does not like it. -g is not a valid option to Javadoc for sure. Not sure how it has got it's way to there.

What sbt version and Scala plugin versions are you using?

brainwatch commented 11 years ago

I'm on the latest Play2.1-SNAPSHOT with "sbt.version=0.12.1" and scala-version=2.10.0-RC1.

And I'm on Windows 7 environment with JDK 1.7

branaway commented 11 years ago

I'll find time to set up a similar environment. Do have a chance to test it on 0.11.3 and 2.9.1?

2012/11/1 brainwatch notifications@github.com

I'm on the latest Play2.1-SNAPSHOT with "sbt.version=0.12.1" and scala-version=2.10.0-RC1.

— Reply to this email directly or view it on GitHubhttps://github.com/branaway/japid42/issues/8#issuecomment-9976543.

branaway commented 11 years ago

I'm sorry but I have had so much trouble setting up the latest of everything. The best I can suggest is try Play2.0.4. and see if it works for you.

2012/11/1 Bing Ran bing.ran@gmail.com

I'll find time to set up a similar environment. Do have a chance to test it on 0.11.3 and 2.9.1?

2012/11/1 brainwatch notifications@github.com

I'm on the latest Play2.1-SNAPSHOT with "sbt.version=0.12.1" and scala-version=2.10.0-RC1.

— Reply to this email directly or view it on GitHubhttps://github.com/branaway/japid42/issues/8#issuecomment-9976543.

brainwatch commented 11 years ago

I'll try with 2.0.4. Meanwhile can you add the repository with published artifacts on github under japid42/repository which I can try to take and publish directly.

branaway commented 11 years ago

That's something I'll try. But I'm not familiar with that part of github. In fact I'm learning how to create a public repository.

Stay tuned.

2012/11/2 brainwatch notifications@github.com

I'll try with 2.0.4. Meanwhile can you add the repository with published artifacts on github under japid42/repository which I can try to take and publish directly.

— Reply to this email directly or view it on GitHubhttps://github.com/branaway/japid42/issues/8#issuecomment-10005115.

branaway commented 11 years ago

I'll do that

bing ran, en route

ÔÚ 2012-11-2£¬13:08£¬brainwatch notifications@github.com дµÀ£º

I'll try with 2.0.4. Meanwhile can you add the repository with published artifacts on github under japid42/repository which I can try to take and publish directly.

¡ª Reply to this email directly or view it on GitHub.

brainwatch commented 11 years ago

I tried with 2.0.4 and it worked and also tested the computer-japid which works too on 2.0.4.

I tried to use the published artifacts of Japid42 from 2.0.4 to 2.1-SNAPSHOT, but it started downloading play_2.9.1 for its dependency and post that my 2.1-SNAPSHOT went for a toss.

I'm rebuilding my 2.1-SNAPSHOT again.

Hope to see a 2.1 compatible version of Japid42 soon.

branaway commented 11 years ago

good to know 2.0.4 worked for you. I'll work on a 2.1 compatible version in my next spare cycle.

2012/11/2 brainwatch notifications@github.com

I tried with 2.0.4 and it worked and also tested the computer-japid which works too on 2.0.4.

I tried to use the published artifacts of Japid42 from 2.0.4 to 2.1-SNAPSHOT, but it started downloading play_2.9.1 for its dependency and post that my 2.1-SNAPSHOT went for a toss.

I'm rebuilding my 2.1-SNAPSHOT again.

Hope to see a 2.1 compatible version of Japid42 soon.

— Reply to this email directly or view it on GitHubhttps://github.com/branaway/japid42/issues/8#issuecomment-10006753.

branaway commented 11 years ago

Ok, it may be due to a bug in play 2.1. But please try adding a dummy routes file like this to the conf folder:

dummy

GET /assets/*file controllers.Assets.at(path="/public", file)

and see if it works around the javadoc issue.

2012/11/2 Bing Ran bing.ran@gmail.com

good to know 2.0.4 worked for you. I'll work on a 2.1 compatible version in my next spare cycle.

2012/11/2 brainwatch notifications@github.com

I tried with 2.0.4 and it worked and also tested the computer-japid which works too on 2.0.4.

I tried to use the published artifacts of Japid42 from 2.0.4 to 2.1-SNAPSHOT, but it started downloading play_2.9.1 for its dependency and post that my 2.1-SNAPSHOT went for a toss.

I'm rebuilding my 2.1-SNAPSHOT again.

Hope to see a 2.1 compatible version of Japid42 soon.

— Reply to this email directly or view it on GitHubhttps://github.com/branaway/japid42/issues/8#issuecomment-10006753.

brainwatch commented 11 years ago

Bingo!!!! It worked. Just now I published japid42 for 2.1-SNAPSHOT. Your trick worked.

Thank you. Will try my test and let you know.

FYI : Tried computer-japid demo code with 2.1-SNAPSHOT. There are some errors due to build file changes in terms of modularized definition of java modules and forms usage.

branaway commented 11 years ago

Do you have the multi module layout on github that I can take a look?

bing ran, en route

ÔÚ 2012-11-3£¬2:52£¬brainwatch notifications@github.com дµÀ£º

Bingo!!!! It worked. Just now I published japid42 for 2.1-SNAPSHOT. Your trick worked.

Thank you. Will try my test and let you know.

FYI : Tried computer-japid demo code with 2.1-SNAPSHOT. There are some errors due to build file changes in terms of modularized definition of java modules and forms usage.

¡ª Reply to this email directly or view it on GitHub.

brainwatch commented 11 years ago

I have uploaded the demo module here - https://github.com/brainwatch/Play21MultiModuleRouter.

FYI I tested and the modularity breaks with Japid42 'cos route and scala view behave as per modular principles by letting the resources bundled within its own modules. But using Japid42 still the routes expect the main app to hold all the japidviews files ( copied from other modules manually ).

Is this a known limitation or are there plans for enhancing ?

-bw

branaway commented 11 years ago

I'l take a look. I cannot come up with an explanation right off the top of my head. It's a scenario I haven't tested yet.

2012/11/4 brainwatch notifications@github.com

I have uploaded the demo module here - https://github.com/brainwatch/Play21MuliModuleRouter.

FYI I tested and the modularity breaks with Japid42 'cos route and scala view behave as per modular principles. Using Japid42 still the routes expect the main app to hold all the japidviews files ( copied from other modules manually ).

Is this a known limitation or are there plans for enhancing ?

-bw

— Reply to this email directly or view it on GitHubhttps://github.com/branaway/japid42/issues/8#issuecomment-10044930.

branaway commented 11 years ago

The sample project is not a typical project-subproject that I know per: https://github.com/harrah/xsbt/wiki/Getting-Started-Multi-Project

Wrapping everything in a jar distribution is possible, but it will need code structure change. Quite a bit of refactoring.

2012/11/4 Bing Ran bing.ran@gmail.com

I'l take a look. I cannot come up with an explanation right off the top of my head. It's a scenario I haven't tested yet.

2012/11/4 brainwatch notifications@github.com

I have uploaded the demo module here - https://github.com/brainwatch/Play21MuliModuleRouter.

FYI I tested and the modularity breaks with Japid42 'cos route and scala view behave as per modular principles. Using Japid42 still the routes expect the main app to hold all the japidviews files ( copied from other modules manually ).

Is this a known limitation or are there plans for enhancing ?

-bw

— Reply to this email directly or view it on GitHubhttps://github.com/branaway/japid42/issues/8#issuecomment-10044930.

brainwatch commented 11 years ago

It is not a project-subproject type. I'm using the modular code structure where every module can be published as an individual module and then the main apps can use the published modules and build applications as per requirement. I do not want to add the source of sub projects with the main.

The modular approach that provides the module level ownership to developers and hence the module could be shared as a library across many projects in a centralized setup.

This is the actual requirement of routes file per module in Play20 also for which the fix is done in Play2.1-SNAPSHOT.

lykmapipo commented 11 years ago

I had the same issue, Here is a quick fix.

  1. In your Build.scala check if ut has similarity as what I have import sbt. import Keys. import play.Project._

object ApplicationBuild extends Build {

val appName = "mylogger" val appVersion = "1.0-SNAPSHOT"

val appDependencies = Seq( // Add your project dependencies here, javaCore )

val main = play.Project(appName, appVersion, appDependencies).settings( // Add your own project settings here organization := "com.eliasly", publishArtifact in packageDoc := false )

}

2.After that change path to your project path e.g /home/play/modules/mylogger

3.Type play clean 4.Type publish-local

Thats that.

branaway commented 11 years ago

Hi thanks for the directive: the publishArticle in packageDoc. I'll try that. The latest japid42 had a dummy scala file in the app directory which triggers the scaladoc process instead of the javadoc. But I think your approach looks better .

branaway commented 11 years ago

I think I'll keep using my dummy.scala trick so that the API doc will be generated in every build.