In trunk at the moment you need to do

cd java
mvn package
cd gadgets
mvn jetty:run-war

you must do the whole sequence to get a complete war file, otherwise the dependencies wont exist and mvn package only packages them up locally inside each target of each project.

so
if you just do

cd gadgets
mvn jetty:run-war
on its own or after a clean, there will be no war and it mvn will try and build the war, but find no artificats as they are not in any local repository or target that is part of the current build target.

IMVHO, its better and safer to do mvn install rather than mvn package since the artifacts will be packaged *and* placed in the local maven repo (~/.m2/repository), and so be available to all subsequent mvn commands. It also ensures that there is one valid copy of the jars.

If you do a mvn install once, then you *must* keep using it, otherwise its highly likely that you will re-use old artifacts from your local maven repo (not the ones you just built with mvn package), and get really really confused.

Just my 2p, let me know if you have further problems, happy to help.



Ian



On 3 May 2008, at 16:32, Dan Brickley wrote:


OK this is my first attempt at building Shindig (in MacOSX Leopard, fwiw). I'm new to Maven but installed it per the instructions. Things went well up through 'mvn package' in http:// incubator.apache.org/shindig/ but running the Jetty server with 'mvn jetty:run-war' fails; see error splurge below.

The error message advises me to download manually. Trying the URLs below I get 404 on this following URL (and the others alongside it): http://people.apache.org/repo/m2-snapshot-repository/org/apache/ shindig/gadgets/1-SNAPSHOT/gadgets-1-SNAPSHOT.pom

It's expecting to find a shindig/ tree below http:// people.apache.org/repo/m2-snapshot-repository/org/apache/ but reality is otherwise. This seems to come from social-api/pom.xml but at this point I'm officially out of my apache/maven depth, and so asking for help.

Thanks for any tips for getting this running.

cheers,

Dan



log follows:

Script started on Sat May  3 16:19:53 2008
bash-3.2$ mvn  -e jetty:run-war

+ Error stacktraces are turned on.

[INFO] Scanning for projects...

[INFO] Searching repository for plugin with prefix: 'jetty'.

[INFO] ---------------------------------------------------------------------- ------

[INFO] Building Apache Shindig Java Gadget Server

[INFO]    task-segment: [jetty:run-war]

[INFO] ---------------------------------------------------------------------- ------

[INFO] Preparing jetty:run-war

Downloading: http://people.apache.org/repo/m2-snapshot-repository/ org/apache/shindig/gadgets/1-SNAPSHOT/gadgets-1-SNAPSHOT.pom

Downloading: http://people.apache.org/repo/m2-snapshot-repository/ org/apache/shindig/social-api/1-SNAPSHOT/social-api-1-SNAPSHOT.pom

Downloading: http://people.apache.org/repo/m2-snapshot-repository/ org/apache/shindig/gadgets/1-SNAPSHOT/gadgets-1-SNAPSHOT.jar

Downloading: http://people.apache.org/repo/m2-snapshot-repository/ org/apache/shindig/social-api/1-SNAPSHOT/social-api-1-SNAPSHOT.jar

[INFO] ---------------------------------------------------------------------- --

[ERROR] BUILD ERROR

[INFO] ---------------------------------------------------------------------- --

[INFO] Failed to resolve artifact.



Missing:

----------

1) org.apache.shindig:gadgets:jar:1-SNAPSHOT



  Try downloading the file manually from the project website.



  Then, install it using the command:

mvn install:install-file -DgroupId=org.apache.shindig - DartifactId=gadgets \

          -Dversion=1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file



  Path to dependency:

        1) org.apache.shindig:server:war:1-SNAPSHOT

        2) org.apache.shindig:gadgets:jar:1-SNAPSHOT



2) org.apache.shindig:social-api:jar:1-SNAPSHOT



  Try downloading the file manually from the project website.



  Then, install it using the command:

mvn install:install-file -DgroupId=org.apache.shindig - DartifactId=social-api \

          -Dversion=1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file



  Path to dependency:

        1) org.apache.shindig:server:war:1-SNAPSHOT

        2) org.apache.shindig:social-api:jar:1-SNAPSHOT



----------

2 required artifacts are missing.



for artifact:

  org.apache.shindig:server:war:1-SNAPSHOT



from the specified remote repositories:

  central (http://repo1.maven.org/maven2),

apache.snapshots (http://people.apache.org/repo/m2-snapshot- repository)





[INFO] ---------------------------------------------------------------------- --

[INFO] Trace

org.apache.maven.lifecycle.LifecycleExecutionException: Missing:

----------

1) org.apache.shindig:gadgets:jar:1-SNAPSHOT



  Try downloading the file manually from the project website.



  Then, install it using the command:

mvn install:install-file -DgroupId=org.apache.shindig - DartifactId=gadgets \

          -Dversion=1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file



  Path to dependency:

        1) org.apache.shindig:server:war:1-SNAPSHOT

        2) org.apache.shindig:gadgets:jar:1-SNAPSHOT



2) org.apache.shindig:social-api:jar:1-SNAPSHOT



  Try downloading the file manually from the project website.



  Then, install it using the command:

mvn install:install-file -DgroupId=org.apache.shindig - DartifactId=social-api \

          -Dversion=1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file



  Path to dependency:

        1) org.apache.shindig:server:war:1-SNAPSHOT

        2) org.apache.shindig:social-api:jar:1-SNAPSHOT



----------

2 required artifacts are missing.



for artifact:

  org.apache.shindig:server:war:1-SNAPSHOT



from the specified remote repositories:

  central (http://repo1.maven.org/maven2),

apache.snapshots (http://people.apache.org/repo/m2-snapshot- repository)



at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals (DefaultLifecycleExecutor.java:556)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLif ecycle(DefaultLifecycleExecutor.java:480)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecyc le(DefaultLifecycleExecutor.java:896)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle (DefaultLifecycleExecutor.java:739)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals (DefaultLifecycleExecutor.java:510)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneG oal(DefaultLifecycleExecutor.java:493)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal (DefaultLifecycleExecutor.java:463)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHand leFailures(DefaultLifecycleExecutor.java:311)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegment s(DefaultLifecycleExecutor.java:278)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute (DefaultLifecycleExecutor.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:272)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:585)

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)

Caused by: org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException: Missing:

----------

1) org.apache.shindig:gadgets:jar:1-SNAPSHOT



  Try downloading the file manually from the project website.



  Then, install it using the command:

mvn install:install-file -DgroupId=org.apache.shindig - DartifactId=gadgets \

          -Dversion=1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file



  Path to dependency:

        1) org.apache.shindig:server:war:1-SNAPSHOT

        2) org.apache.shindig:gadgets:jar:1-SNAPSHOT



2) org.apache.shindig:social-api:jar:1-SNAPSHOT



  Try downloading the file manually from the project website.



  Then, install it using the command:

mvn install:install-file -DgroupId=org.apache.shindig - DartifactId=social-api \

          -Dversion=1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file



  Path to dependency:

        1) org.apache.shindig:server:war:1-SNAPSHOT

        2) org.apache.shindig:social-api:jar:1-SNAPSHOT



----------

2 required artifacts are missing.



for artifact:

  org.apache.shindig:server:war:1-SNAPSHOT



from the specified remote repositories:

  central (http://repo1.maven.org/maven2),

apache.snapshots (http://people.apache.org/repo/m2-snapshot- repository)



at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTran sitively(DefaultArtifactResolver.java:305)

at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTran sitively(DefaultArtifactResolver.java:272)

at org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDependen cies(DefaultPluginManager.java:1238)

at org.apache.maven.plugin.DefaultPluginManager.executeMojo (DefaultPluginManager.java:397)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals (DefaultLifecycleExecutor.java:539)

        ... 20 more

[INFO] ---------------------------------------------------------------------- --

[INFO] Total time: 3 seconds

[INFO] Finished at: Sat May 03 16:19:57 BST 2008

[INFO] Final Memory: 3M/7M

[INFO] ---------------------------------------------------------------------- --

bash-3.2$ exit


Script done on Sat May  3 16:19:58 2008


Reply via email to