Declare your js source directory at plugin level :

<plugin>
     <artifactId>javascript-maven-plugin</artifact>
     <configuration>
          <sourceDirectory>my/source/directory</sourceDirectory>
     </configuration>

Maybe the plugin should use the project.sourceDirectory as the compile goal
is only relevant in a pure javascript project...

Nico.


2008/2/27, Adrian Herscu <[EMAIL PROTECTED]>:
>
> Hi Nicolas,
>
> How do I specify a different source directory?
> I have looked into the sources and found this:
>
> http://svn.codehaus.org/mojo/trunk/sandbox/javascript-maven-tools/javascript-maven-plugin/src/main/java/org/codehaus/mojo/javascript/CompileMojo.java
> Tried the <sourceDirectory>my/source/directory</sourceDirectory> under
> the build section and got this:
> [INFO]
> ------------------------------------------------------------------------
> [INFO] basedir
> C:\documents\pm\project-trunks\wirexn\sandbox\extjs-client-sample
> \src\main\javascript does not exist
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.IllegalStateException: basedir
> C:\documents\pm\project-trunks\wirexn\s
> andbox\extjs-client-sample\src\main\javascript does not exist
>          at
> org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:
> 542)
>          at
> org.codehaus.mojo.javascript.CompileMojo.execute(CompileMojo.java:130
> )
>          at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
> nManager.java:443)
>          at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> ultLifecycleExecutor.java:539)
>          at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
> fecycle(DefaultLifecycleExecutor.java:480)
>          at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
> ltLifecycleExecutor.java:459)
>          at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
> dleFailures(DefaultLifecycleExecutor.java:311)
>          at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
> ts(DefaultLifecycleExecutor.java:278)
>          at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
> fecycleExecutor.java:143)
>          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
>          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>          at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
>          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>          at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
>          at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>          at java.lang.reflect.Method.invoke(Method.java:597)
>          at
> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>          at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>          at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>
>          at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>
>
> Adrian.
>
>
>
> nicolas de loof wrote:
> > The war-package process source scripts and place them in the packaging
> > folder used by the war plugin to create the exploded war, before
> archivaing
> > a .war.
> >
> > Nico
> >
> > 2008/2/26, Adrian Herscu <[EMAIL PROTECTED]>:
> >> Harlan, thanks for your fast reply. It works!
> >> However, I am not sure what the <goal>war-package</goal> does (as in
> the
> >> example here:
> >>
> >>
> http://mojo.codehaus.org/javascript-maven-tools/guide-webapp-development.html
> >> )
> >>
> >> Adrian.
> >>
> >>
> >>
> >> Harlan Iverson wrote:
> >>> The javascript plugin is currently sandboxed, so following these
> >>> instructions should make it available:
> >>>
> >>> http://mojo.codehaus.org/using-sandbox-plugins.html
> >>>
> >>> The other option is to download the source and run mvn install
> locally.
> >> The
> >>> location in the plugin's maven site is wrong, it is here:
> >>>
> >>> http://svn.codehaus.org/mojo/trunk/sandbox/javascript-maven-tools/
> >>>
> >>> You'll need to check out the top level, as the plugin depends on other
> >>> modules.
> >>>
> >>> Good luck.
> >>> Harlan
> >>>
> >>>
> >>> On Mon, Feb 25, 2008 at 12:40 PM, Adrian Herscu <[EMAIL PROTECTED]>
> >> wrote:
> >>>> Hi all,
> >>>>
> >>>> In which repository is this plugin hosted?
> >>>> I am getting:
> >>>>
> >>>> Missing:
> >>>> ----------
> >>>> 1)
> >>>>
> >>>>
> >>
> org.codehaus.mojo.javascript:javascript-maven-plugin:jar:1.0-alpha-1-SNAPSHOT
> >>>>
> >>>>   Try downloading the file manually from the project website.
> >>>>
> >>>>   Then, install it using the command:
> >>>>       mvn install:install-file -DgroupId=org.codehaus.mojo.javascript
> >>>> -Dartifact
> >>>> Id=javascript-maven-plugin \
> >>>>           -Dversion=1.0-alpha-1-SNAPSHOT -Dpackaging=jar
> >>>> -Dfile=/path/to/file
> >>>> Alternatively, if you host your own repository you can deploy the
> file
> >>>> there:
> >>>>     mvn deploy:deploy-file -DgroupId=org.codehaus.mojo.javascript
> >>>> -DartifactId=j
> >>>> avascript-maven-plugin \
> >>>>           -Dversion=1.0-alpha-1-SNAPSHOT -Dpackaging=jar
> >>>> -Dfile=/path/to/file \
> >>>>            -Durl=[url] -DrepositoryId=[id]
> >>>>
> >>>>   Path to dependency:
> >>>>         1)
> >>>> org.wirexn.sandbox.extjs:extjs-client-sample:javascript:1.0-alpha-1-S
> >>>> NAPSHOT
> >>>>         2)
> >>>> org.codehaus.mojo.javascript:javascript-maven-plugin:jar:1.0-alpha-1-
> >>>> SNAPSHOT
> >>>>
> >>>> ----------
> >>>> 1 required artifact is missing.
> >>>>
> >>>> for artifact:
> >>>>
> >>>>
> >>>>
> >>
> org.wirexn.sandbox.extjs:extjs-client-sample:javascript:1.0-alpha-1-SNAPSHOT
> >>>> from the specified remote repositories:
> >>>>   [EMAIL PROTECTED] (http://webdav.wirexn.net/snapshots),
> >>>>   central (http://repo1.maven.org/maven2),
> >>>>   wirexn.net (http://webdav.wirexn.net/repository)
> >>>>
> >>>>
> >>>> TIA,
> >>>> Adrian.
> >>>>
> >>>> nicolas de loof wrote:
> >>>>> You can look at the jslint report that will check for some
> structural
> >>>> rules
> >>>>> (
> >>>>>
> >>
> http://mojo.codehaus.org/javascript-maven-tools/javascript-report-maven-plugin/index.html
> >>>>> )
> >>>>>
> >>>>> Not sure, but syntactic errors should be detected also.
> >>>>>
> >>>>> 2008/2/18, Insitu <[EMAIL PROTECTED]>:
> >>>>>> Hello,
> >>>>>> I would like to know what is the current status/plans of the
> various
> >>>>>> javascript handling plugins out there. Few months ago there has
> been
> >>>>>> some discussions on this topic and some talks about merging
> >>>>>> projects. I am currently using jstools plugin, with jsunit for test
> >>>>>> execution, and would like to know if someone has done work on
> >>>>>> "verifying" or "compiling" the javascript, using eg. Rhino or other
> >>>>>> parser to ensure syntactic correctness of javascript.
> >>>>>>
> >>>>>> Regards,
> >>>>>> --
> >>>>>> Arnaud Bailly, PhD
> >>>>>> OQube - Software Engineering
> >>>>>> http://www.oqube.com
> >>>>>>
> >>>>>>
> >>>>>>
> ---------------------------------------------------------------------
> >>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
> >>>>>>
> >>>>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>> For additional commands, e-mail: [EMAIL PROTECTED]
> >>>>
> >>>>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to