Hi there!
If you're just looking to run the dropwizard Getting Started tutorial,
there's no need to check-out and build the example. the example is just
there for reference. If you run the maven archetype with a valid DW build
(eg 1.3.8) you'll get a project that should build right out of the box.
```
mvn archetype:generate -DarchetypeGroupId=io.dropwizard.archetypes
-DarchetypeArtifactId=java-simple -DarchetypeVersion=1.3.8
```
You can look in the generated project directory to find a pom.xml file, and
then poke that pom.xml file in accordance with the tutorial. (You can also
just create your own project directory and pom.xml file without the maven
archetype).
If you really need to build the dropwizard-example project, you shouldn't
need to modify the dropwizard-example pom to get it to build without
errors. You can go about this one of a few ways:
a) Build from a released tag
Check out a tag from a published release (eg `git checkout v1.3.8`) then
build. The artifacts it depends on will already be published to maven
central so no poking is needed to get those deps to resolve as they'll be
downloaded automatically.
b) Build the whole project first
If you really want to build from master, you need to build the whole
project from the parent directory, as SNAPSHOT dependencies are not stored
in maven central. Building the whole project (by running `mvn install` in
the project root directory) would build and install all the snapshot
dependencies from the project into your local maven repository. now when
you switch to the dropwizard-example sub-project and build, all the
2.0.0-rc1-SNAPSHOT dependencies will resolve from your local repo.
Are any of those suggestions helpful?
-Dimas
On Saturday, February 16, 2019 at 8:37:41 AM UTC-8, ohthepain wrote:
>
> Hi all,
>
> I am trying to build dropwizard-example from the dropwizard repo and was
> wondering if somebody could help me with some build errors.
>
>
> I had to make some changes to get it to start building:
>
> The version in the pom is
>
> <version>2.0.0-rc1-SNAPSHOT</version>
>
> Which is a later version of dropwizard so I changed it to 1.0.0-SNAPSHOT.
>
>
> The dropwizard dependencies were missing version tags so I added
>
> <dropwizard.version>1.3.8</dropwizard.version>
>
> to <properties> and then
>
> <version>${dropwizard.version}</version>
>
> to each of the dropwizard dependencies.
>
>
> I think it build for the dev that tested the example just because their
> project version was the same as the RC version of dropwizard that they
> tested it with.
>
>
> So here are my errors now:
>
>
> [*INFO*] Scanning for projects...
>
> [*INFO*]
>
> [*INFO*] *------------------< *io.dropwizard:dropwizard-example*
> >------------------*
>
> [*INFO*] *Building Dropwizard Example Application 1.0.0-SNAPSHOT*
>
> [*INFO*] *--------------------------------[ jar
> ]---------------------------------*
>
> [*INFO*]
>
> [*INFO*] *--- *maven-enforcer-plugin:1.4.1:enforce *(enforce)* @
> dropwizard-example* ---*
>
> [*INFO*]
>
> [*INFO*] *--- *maven-checkstyle-plugin:3.0.0:check *(checkstyle)* @
> dropwizard-example* ---*
>
> [*INFO*]
>
> [*INFO*] *--- *jacoco-maven-plugin:0.8.3:prepare-agent *(prepare-agent)*
> @ dropwizard-example* ---*
>
> [*INFO*] argLine set to
> -javaagent:/Users/paul/.m2/repository/org/jacoco/org.jacoco.agent/0.8.3/org.jacoco.agent-0.8.3-runtime.jar=destfile=/Users/paul/projects/dropwizard/dropwizard-example/target/jacoco.exec
>
> [*INFO*]
>
> [*INFO*] *--- *maven-resources-plugin:3.1.0:resources
> *(default-resources)* @ dropwizard-example* ---*
>
> [*INFO*] Using 'UTF-8' encoding to copy filtered resources.
>
> [*INFO*] Copying 10 resources
>
> [*INFO*]
>
> [*INFO*] *--- *maven-compiler-plugin:3.8.0:compile *(default-compile)* @
> dropwizard-example* ---*
>
> [*INFO*] Changes detected - recompiling the module!
>
> [*INFO*] Compiling 23 source files to
> /Users/paul/projects/dropwizard/dropwizard-example/target/classes
>
> [*INFO*] -------------------------------------------------------------
>
> [*ERROR*] COMPILATION ERROR :
>
> [*INFO*] -------------------------------------------------------------
>
> [*ERROR*]
> /Users/paul/projects/dropwizard/dropwizard-example/src/main/java/com/example/helloworld/auth/ExampleAuthenticator.java:[7,26]
>
> cannot find symbol
>
> symbol: class Sets
>
> location: package io.dropwizard.util
>
> [*ERROR*]
> /Users/paul/projects/dropwizard/dropwizard-example/src/main/java/com/example/helloworld/tasks/EchoTask.java:[9,8]
>
> com.example.helloworld.tasks.EchoTask is not abstract and does not override
> abstract method
> execute(com.google.common.collect.ImmutableMultimap<java.lang.String,java.lang.String>,java.lang.String,java.io.PrintWriter)
>
> in io.dropwizard.servlets.tasks.PostBodyTask
>
> [*ERROR*]
> /Users/paul/projects/dropwizard/dropwizard-example/src/main/java/com/example/helloworld/tasks/EchoTask.java:[14,5]
>
> method does not override or implement a method from a supertype
>
> [*ERROR*]
> /Users/paul/projects/dropwizard/dropwizard-example/src/main/java/com/example/helloworld/auth/ExampleAuthenticator.java:[25,40]
>
> cannot find symbol
>
> symbol: variable Sets
>
> location: class com.example.helloworld.auth.ExampleAuthenticator
>
> [*INFO*] 4 errors
>
> [*INFO*] -------------------------------------------------------------
>
> [*INFO*]
> *------------------------------------------------------------------------*
>
> [*INFO*] *BUILD FAILURE*
>
> [*INFO*]
> *------------------------------------------------------------------------*
>
> [*INFO*] Total time: 3.763 s
>
> [*INFO*] Finished at: 2019-02-16T17:21:56+01:00
>
> [*INFO*]
> *------------------------------------------------------------------------*
>
> [*ERROR*] Failed to execute goal
> org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile
> *(default-compile)* on project dropwizard-example: *Compilation failure*:
> Compilation failure:
>
> [*ERROR*]
> /Users/paul/projects/dropwizard/dropwizard-example/src/main/java/com/example/helloworld/auth/ExampleAuthenticator.java:[7,26]
>
> cannot find symbol
>
> [*ERROR*] symbol: class Sets
>
> [*ERROR*] location: package io.dropwizard.util
>
> [*ERROR*]
> /Users/paul/projects/dropwizard/dropwizard-example/src/main/java/com/example/helloworld/tasks/EchoTask.java:[9,8]
>
> com.example.helloworld.tasks.EchoTask is not abstract and does not override
> abstract method
> execute(com.google.common.collect.ImmutableMultimap<java.lang.String,java.lang.String>,java.lang.String,java.io.PrintWriter)
>
> in io.dropwizard.servlets.tasks.PostBodyTask
>
> [*ERROR*]
> /Users/paul/projects/dropwizard/dropwizard-example/src/main/java/com/example/helloworld/tasks/EchoTask.java:[14,5]
>
> method does not override or implement a method from a supertype
>
> [*ERROR*]
> /Users/paul/projects/dropwizard/dropwizard-example/src/main/java/com/example/helloworld/auth/ExampleAuthenticator.java:[25,40]
>
> cannot find symbol
>
> [*ERROR*] symbol: variable Sets
>
> [*ERROR*] location: class
> com.example.helloworld.auth.ExampleAuthenticator
>
> [*ERROR*] -> *[Help 1]*
>
> [*ERROR*]
>
> [*ERROR*] To see the full stack trace of the errors, re-run Maven with
> the *-e* switch.
>
> [*ERROR*] Re-run Maven using the *-X* switch to enable full debug logging.
>
> [*ERROR*]
>
> [*ERROR*] For more information about the errors and possible solutions,
> please read the following articles:
>
> [*ERROR*] *[Help 1]*
> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
>
--
You received this message because you are subscribed to the Google Groups
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.