The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

cupofjoe (1) [Avatar] Offline
#1
I noticed someone in another area post a problem with a Maven build on 2/28/09.
I'm new to maven but I can not seem to get anything to pull down in my build.

I don't have any of the SUN jars pulled down yet but that shouldn't prevent maven from grabbing the jars that are needed.

Stack trace is below.

Kind regards.
Ed

[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Unable to build project for plugin 'org.apache.maven.plugins:maven-site-plugin': POM 'org.apache.maven.plugins:maven-site-plugin' not found in r
epository: Unable to download the artifact from any repository

org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7

from the specified remote repositories:
central (http://repo1.maven.org/maven2)

for project org.apache.maven.plugins:maven-site-plugin
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1534)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1786)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindLifecycleForPackaging(DefaultLifecycleExecutor.java:1274)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMappings(DefaultLifecycleExecutor.java:123smilie
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:51smilie
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)
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: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)
Caused by: org.apache.maven.plugin.InvalidPluginException: Unable to build project for plugin 'org.apache.maven.plugins:maven-site-plugin': POM 'org.apache.maven.plugins:maven-site-plugin' not found i
n repository: Unable to download the artifact from any repository
simbo1905 (30) [Avatar] Offline
#2
Re: Maven broken?
Your particular error seems like a network error. Perhaps you are behind a proxy and maven is unable to hit the main maven repository to download the site plug-in?

I just setup a new netbook with eclipse and was able to build the source. What worked for me (on a ubuntu mini10) was:

0) Installed JDK 1.6.0, Eclipse and then added into eclipse the "m2eclipse" maven plugin.

1) Created a new Eclipse workspace and extracted pia source zip file. Set "Window > Preference > Java > Installed JREs" to use to JDK 1.6.0_16. Imported pia source using "Import > General > Maven Project" (under General category not Maven category!)

2) Right clicked on 'pia' project and did "Run As..." > "Maven Install" to have maven pull all the dependent jars and got the following build error do to a missing jar on the public repositories:

Path to dependency:
> net.chrisrichardson:ormunit-hibernate:jar:1.0-SNAPSHOT
> javax.transaction:jta:jar:1.0.1b

3) Went to mavensearch.net and searched for jta and found javax.transaction:jta:jar:1.0.1B (upper case B). Didn't work so went for JTA 1.1 by swapping dependency in ormunit-hibernate/pom.xml for the one shown on mavensearch.net. Did another build had another dependency to old jta in other projects. Searched for it in pom.xml files and changed it to version 1.1.

4) "Maven Install" has some file copy issues but right click on 'pia' project and "Run As..." > "Maven Build..." > "goals = clean compile test" compiles all the code and runs all the junit tests successfully. Can now expand a given project and to see the 'src/test/java' folder and run it in the eclipse junit runner with a right click "Run As..." > "JUnit test".

Sometimes with importing maven projects in eclipse there is a 'chicken and egg' issue that eclipse needs the jars that maven will get for you once you do a maven build. Then the projects can have some errors which wont clear on a full build. To fix that just delete all the projects, restart the workspace, then re-import the maven projects.