Win a copy of Java Persistence with Spring Data and Hibernate this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

Why the failure to download a plugin? And why is it looking for a beta?

 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So I finished Monson-Haefel's J2EE Web Services (very interesting book) and I'm now cracking open Mark Hansen's SOA Using Java Web Services. Appendix B tells me to download the book code, make some edits to the pom.xml, and run

mvn install

(I should mention here that I really know nothing about Maven.)

Here's what I get:

[INFO] ------------------------------------------------------------------------
[INFO] Building SOABOOK
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-site-p
lugin/2.0-beta-7/maven-site-plugin-2.0-beta-7.pom
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-site-plugin:pom
:2.0-beta-7' from repository central (http://repo1.maven.org/maven2): Error transferring file
...

Project ID: org.apache.maven.plugins:maven-site-plugin
Reason: POM 'org.apache.maven.plugins:maven-site-plugin' not found in repository: 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:
soaj (http://soaj.javector.com/maven-repo),
central (http://repo1.maven.org/maven2),
ibiblio (http://www.ibiblio.org/maven2)
for project org.apache.maven.plugins:maven-site-plugin

At first I had the JDK7 installed and Maven 3.0.4. Thinking this might be the problem, I added Maven 2.0.11 and updated the PATH, and put in JDK6 instead. Glassfish starts up OK and all seems well with Java. But Maven is still looking for some beta plugin for Java 7. (This book was published in 2007, and I suppose that beta plugin isn't around any more.)

What should I try? And, is there a book better suited to someone working in Windows and who more or less understands the theory of WS but has zero experience with it?

 
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the dependency entry in the pom.xml?

Also, check out: http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.apache.maven.plugins%22%20AND%20a%3A%22maven-site-plugin%22

You will see that the latest version is: 3.0-beta-3
The latest RELEASE version appears to be: 2.3

WP
 
Thomas Kennedy
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is no dependency entry.
 
William P O'Sullivan
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You don't have something like: (We don't use the site plugin, this is just as an example) ?
 
Thomas Kennedy
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No. I should mention again, the book is from 2007 and calls for Maven 2.0.x.

 
William P O'Sullivan
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
maven 3 is backward compatible with maven 2 (for the most part).

That's a very small pom.xml

How are you building the project? What do you enter on the command line?

WP
 
Thomas Kennedy
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The instructions are to go to that directory and type mvn install.
 
William P O'Sullivan
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Like so ....

FYI:


btw, install only installs to your local repository which is controlled by MAVEN_OPTS or M2_REPO environment variables.
(Default is buried under your "home" directory)

WP ?
 
Thomas Kennedy
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Right, it says

Apache Maven 2.0.11 (r909250; 2010-02-12 00:55:50-0500)
Java version: 1.6.0_29
Java home: c:\glassfish3_jdk6\jdk\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7" version: "6.1" arch: "x86" Family: "windows"

but I don't understand why it's trying to grab this particular plugin:

Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-site-plugin/2.0-beta-7/maven-site-plugin-2.0-beta-7.pom
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7' from repository central (http://repo1.maven.org/maven2): Error transferring file

or why that fails. (After all, the file appears to exist out there.)

I'm baffled.
 
William P O'Sullivan
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please run it with:

Paste the response after you remove any sensitive data.

WP
 
Thomas Kennedy
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Right, here it is. FWIW, neither of these files exists:

[DEBUG] Building Maven user-level plugin registry from: 'C:\Users\xxxxxxxx\.m2\plugin-registry.xml'
[DEBUG] Building Maven global-level plugin registry from: 'C:\maven\apache-maven-2.0.11\bin\..\conf\plugin-registry.xml'



The complete output:

C:\soabook>mvn -X install
+ Error stacktraces are turned on.
Apache Maven 2.0.11 (r909250; 2010-02-12 00:55:50-0500)
Java version: 1.6.0_29
Java home: c:\glassfish3_jdk6\jdk\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7" version: "6.1" arch: "x86" Family: "windows"
[DEBUG] Building Maven user-level plugin registry from: 'C:\Users\xxxxxxxx\.m2\plugin-registry.xml'
[DEBUG] Building Maven global-level plugin registry from: 'C:\maven\apache-maven-2.0.11\bin\..\conf\plugin-registry.xml'
[INFO] Scanning for projects...
[DEBUG] Wagons could not be registered as the extension container was never created
[INFO] ------------------------------------------------------------------------
[INFO] Building SOABOOK
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
[DEBUG] Trying repository central
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-site-plugin/2.0-beta-7/maven-site-plugin-2.0-be
ta-7.pom
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7' from repository central (htt
p://repo1.maven.org/maven2): Error transferring file
[DEBUG] Trying repository ibiblio
Downloading: http://www.ibiblio.org/maven2/org/apache/maven/plugins/maven-site-plugin/2.0-beta-7/maven-site-plugin-2.0-be
ta-7.pom
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7' from repository ibiblio (htt
p://www.ibiblio.org/maven2): Error transferring file
[DEBUG] Trying repository soaj
Downloading: http://soaj.javector.com/maven-repo/org/apache/maven/plugins/maven-site-plugin/2.0-beta-7/maven-site-plugin-
2.0-beta-7.pom
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7' from repository soaj (http:/
/soaj.javector.com/maven-repo): Error transferring file
[DEBUG] Trying repository central
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-site-plugin/2.0-beta-7/maven-site-plugin-2.0-be
ta-7.pom
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7' from repository central (htt
p://repo1.maven.org/maven2): Error transferring file
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: org.apache.maven.plugins:maven-site-plugin

Reason: POM 'org.apache.maven.plugins:maven-site-plugin' not found in repository: Unable to download the artifact from an
y repository

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

from the specified remote repositories:
soaj (http://soaj.javector.com/maven-repo),
central (http://repo1.maven.org/maven2),
ibiblio (http://www.ibiblio.org/maven2)

for project org.apache.maven.plugins:maven-site-plugin


[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Unable to build project for plugin 'org.apache.maven.plugins:mave
n-site-plugin': POM 'org.apache.maven.plugins:maven-site-plugin' not found in repository: 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:
soaj (http://soaj.javector.com/maven-repo),
central (http://repo1.maven.org/maven2),
ibiblio (http://www.ibiblio.org/maven2)

for project org.apache.maven.plugins:maven-site-plugin
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1295)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1546)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindLifecycleForPackaging(DefaultLifecycleExecutor.java:10
37)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMappings(DefaultLifecycleExecutor.java:1
001)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java
:331)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:292)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:345)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:132)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:290)
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:m
aven-site-plugin': POM 'org.apache.maven.plugins:maven-site-plugin' not found in repository: Unable to download the artif
act from any repository

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

from the specified remote repositories:
soaj (http://soaj.javector.com/maven-repo),
central (http://repo1.maven.org/maven2),
ibiblio (http://www.ibiblio.org/maven2)

for project org.apache.maven.plugins:maven-site-plugin
at org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:281)
at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:197)
at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:176)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1278)
... 18 more
Caused by: org.apache.maven.project.ProjectBuildingException: POM 'org.apache.maven.plugins:maven-site-plugin' not found
in repository: 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:
soaj (http://soaj.javector.com/maven-repo),
central (http://repo1.maven.org/maven2),
ibiblio (http://www.ibiblio.org/maven2)

for project org.apache.maven.plugins:maven-site-plugin
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:60
2)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:248)
at org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:265)
... 21 more
Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any reposit
ory

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

from the specified remote repositories:
soaj (http://soaj.javector.com/maven-repo),
central (http://repo1.maven.org/maven2),
ibiblio (http://www.ibiblio.org/maven2)

at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:212)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:74)
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:55
5)
... 23 more
Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository
at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:332)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:200)
... 25 more


 
Saloon Keeper
Posts: 26724
189
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd check your firewall and/or proxies.

I took the first thing that came back unresolved and fed it manually to my browser: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-site-plugin/2.0-beta-7/maven-site-plugin-2.0-beta-7.pom.

Your error message said that it could not be downloaded. It came up just fine in my browser, and since Maven is using an HTTP client, that means that normally Maven should have been able to pull that file as well.

And because Maven is using HTTP, you, too should be able to enter the above URL in that machine's browser (if it has one) and get back the file in question. If you cannot, then it's pretty certain that something's blocking you.
 
William P O'Sullivan
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tim is right..

Some organizations (like ours) use nexus as repository proxy.

See if you can hit those uris directly. If not, then they're blocked.

WP
 
Thomas Kennedy
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes I can open that uri just fine in my browser. Is there something I need to do in Maven to fix this? Thank you.
 
Tim Holloway
Saloon Keeper
Posts: 26724
189
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try opening it in your browser again and assuming that it worked, immediately type in a "mvn install" command from the command prompt.

Like I said, if your browser can fetch it, Maven should be able to fetch it as well. However, occasionally, repo1 doesn't respond and apparently this particular plugin isn't available from any of the other repositories in your list. Don't worry about the "beta" part. Maven is depressingly fond of having no alternative to a beta release for long periods of time, and as far as I can see, this particular Beta plugin is hard-wired into the version of Maven that you're executing. You could override it, but that's a whole different can of worms.

One other thing you can try is to move or delete your ".m2" directory in case there are some screwball items in there for some reason. While you're at it, make sure that the maven command prompt has the ability to create/write .m2 and its children and, of course, that there's sufficient disk space.
 
William P O'Sullivan
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wonder if it's the repositories setup in your %maven%/conf/settings.xml

Would you mind dumping that here?

WP
 
Thomas Kennedy
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The complete settings:

<?xml version="1.0" encoding="UTF-8"?>

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

<!--
| This is the configuration file for Maven. It can be specified at two levels:
|
| 1. User Level. This settings.xml file provides configuration for a single user,
| and is normally provided in $HOME/.m2/settings.xml.
|
| NOTE: This location can be overridden with the system property:
|
| -Dorg.apache.maven.user-settings=/path/to/user/settings.xml
|
| 2. Global Level. This settings.xml file provides configuration for all maven
| users on a machine (assuming they're all using the same maven
| installation). It's normally provided in
| ${maven.home}/conf/settings.xml.
|
| NOTE: This location can be overridden with the system property:
|
| -Dorg.apache.maven.global-settings=/path/to/global/settings.xml
|
| The sections in this sample file are intended to give you a running start at
| getting the most out of your Maven installation. Where appropriate, the default
| values (values used when the setting is not specified) are provided.
|
|-->
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<!-- localRepository
| The path to the local repository maven will use to store artifacts.
|
| Default: ~/.m2/repository
<localRepository>/path/to/local/repo</localRepository>
-->

<!-- interactiveMode
| This will determine whether maven prompts you when it needs input. If set to false,
| maven will use a sensible default value, perhaps based on some other setting, for
| the parameter in question.
|
| Default: true
<interactiveMode>true</interactiveMode>
-->

<!-- offline
| Determines whether maven should attempt to connect to the network when executing a build.
| This will have an effect on artifact downloads, artifact deployment, and others.
|
| Default: false
<offline>false</offline>
-->

<!-- pluginGroups
| This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.
| when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers
| "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.
|-->
<pluginGroups>
<!-- pluginGroup
| Specifies a further group identifier to use for plugin lookup.
<pluginGroup>com.your.plugins</pluginGroup>
-->
</pluginGroups>

<!-- proxies
| This is a list of proxies which can be used on this machine to connect to the network.
| Unless otherwise specified (by system property or command-line switch), the first proxy
| specification in this list marked as active will be used.
|-->
<proxies>
<!-- proxy
| Specification for one proxy, to be used in connecting to the network.
|
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>proxyuser</username>
<password>proxypass</password>
<host>proxy.host.net</host>
<port>80</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
-->
</proxies>

<!-- servers
| This is a list of authentication profiles, keyed by the server-id used within the system.
| Authentication profiles can be used whenever maven must make a connection to a remote server.
|-->
<servers>
<!-- server
| Specifies the authentication information to use when connecting to a particular server, identified by
| a unique name within the system (referred to by the 'id' attribute below).
|
| NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are
| used together.
|
<server>
<id>deploymentRepo</id>
<username>repouser</username>
<password>repopwd</password>
</server>
-->

<!-- Another sample, using keys to authenticate.
<server>
<id>siteServer</id>
<privateKey>/path/to/private/key</privateKey>
<passphrase>optional; leave empty if not used.</passphrase>
</server>
-->
</servers>

<!-- mirrors
| This is a list of mirrors to be used in downloading artifacts from remote repositories.
|
| It works like this: a POM may declare a repository to use in resolving certain artifacts.
| However, this repository may have problems with heavy traffic at times, so people have mirrored
| it to several places.
|
| That repository definition will have a unique id, so we can create a mirror reference for that
| repository, to be used as an alternate download site. The mirror site will be the preferred
| server for that repository.
|-->
<mirrors>
<!-- mirror
| Specifies a repository mirror site to use instead of a given repository. The repository that
| this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
| for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
|
<mirror>
<id>mirrorId</id>
<mirrorOf>repositoryId</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://my.repository.com/repo/path</url>;
</mirror>
-->
</mirrors>

<!-- profiles
| This is a list of profiles which can be activated in a variety of ways, and which can modify
| the build process. Profiles provided in the settings.xml are intended to provide local machine-
| specific paths and repository locations which allow the build to work in the local environment.
|
| For example, if you have an integration testing plugin - like cactus - that needs to know where
| your Tomcat instance is installed, you can provide a variable here such that the variable is
| dereferenced during the build process to configure the cactus plugin.
|
| As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles
| section of this document (settings.xml) - will be discussed later. Another way essentially
| relies on the detection of a system property, either matching a particular value for the property,
| or merely testing its existence. Profiles can also be activated by JDK version prefix, where a
| value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.
| Finally, the list of active profiles can be specified directly from the command line.
|
| NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact
| repositories, plugin repositories, and free-form properties to be used as configuration
| variables for plugins in the POM.
|
|-->
<profiles>
<!-- profile
| Specifies a set of introductions to the build process, to be activated using one or more of the
| mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>
| or the command line, profiles have to have an ID that is unique.
|
| An encouraged best practice for profile identification is to use a consistent naming convention
| for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.
| This will make it more intuitive to understand what the set of introduced profiles is attempting
| to accomplish, particularly when you only have a list of profile id's for debug.
|
| This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.
<profile>
<id>jdk-1.4</id>

<activation>
<jdk>1.4</jdk>
</activation>

<repositories>
<repository>
<id>jdk14</id>
<name>Repository for JDK 1.4 builds</name>
<url>http://www.myhost.com/maven/jdk14</url>;
<layout>default</layout>
<snapshotPolicy>always</snapshotPolicy>
</repository>
</repositories>
</profile>
-->

<!--
| Here is another profile, activated by the system property 'target-env' with a value of 'dev',
| which provides a specific path to the Tomcat instance. To use this, your plugin configuration
| might hypothetically look like:
|
| ...
| <plugin>
| <groupId>org.myco.myplugins</groupId>
| <artifactId>myplugin</artifactId>
|
| <configuration>
| <tomcatLocation>${tomcatPath}</tomcatLocation>
| </configuration>
| </plugin>
| ...
|
| NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to
| anything, you could just leave off the <value/> inside the activation-property.
|
<profile>
<id>env-dev</id>

<activation>
<property>
<name>target-env</name>
<value>dev</value>
</property>
</activation>

<properties>
<tomcatPath>/path/to/tomcat/instance</tomcatPath>
</properties>
</profile>
-->
</profiles>

<!-- activeProfiles
| List of profiles that are active for all builds.
|
<activeProfiles>
<activeProfile>alwaysActiveProfile</activeProfile>
<activeProfile>anotherAlwaysActiveProfile</activeProfile>
</activeProfiles>
-->
</settings>



Thank you.
 
Bartender
Posts: 1051
5
Hibernate Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Thomas

Try removing/commenting out the repositories block in your pom.xml.

I still don't think your project will build but the core plugins that Maven requires will be downloaded from Maven Central.

I suspect this project is out of date as the repository URLs in your pom file no longer exist.
 
Thomas Kennedy
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
FYI the only thing in .m2 is the file

\repository\org\apache\maven\plugins\maven-install-plugin\2.3.1\maven-install-plugin-2.3.1.pom.lastUpdated

which contains:

#NOTE: This is an internal implementation file, its format can be changed without prior notice.
#Wed Apr 18 15:35:27 EDT 2012
default-http\://repo.maven.apache.org/maven2/.lastUpdated=1334777727730
http\://repo.maven.apache.org/maven2/.error=Could not transfer artifact org.apache.maven.plugins\:maven-install-plugin\:pom\:2.3.1 from/to central (http\://repo.maven.apache.org/maven2)\: Connection to http\://repo.maven.apache.org refused

 
Thomas Kennedy
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I rem'd out the repositories but got the same result. I don't see anything different anywhere in maven_home or .m2 as a result. So, this project looks like a dud.

As an aside, I haven't any idea what Maven is trying to do with this file.
 
Tim Holloway
Saloon Keeper
Posts: 26724
189
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The "site" plugin is (unless I'm mistaken) the plugin that handles the "mvn site" goal. This little wonder is used by many open-source projects (particularly apache.org ones) to use Maven to manage their project almost in its entirety, as it compiles and builds the product, creates the JavaDocs, assembles a general website and - last, but not least - uploads the updated website to a server.

And, no, you don't need all that and it shouldn't be running, although I can't guarantee that Maven doesn't want to download it just in case.

It shouldn't be this hard to build your project unless you have some sort of network problems or there's something totally scrambled in your system. Getting up and running in a hurry is one of Maven's primary virtues.

1. Download and unzip a Maven distro file
2. Set the environment variable MAVEN_HOME to point to the top-level directory of that unzipped archive
3. Set JAVA_HOME to point to a JDK (Note that care has to be taken in Windows because the space in "Program Files" can cause trouble).
4. Add %MAVEN_HOME%\bin and %JAVA_HOME%\bin to your PATH.
5. cd to your project directory (containing the pom.xml).
6. Request a Maven goal: "mvn clean compile", "mvn package" or "mvn install" for example.
7. Have patience. The initial Maven run takes longer as it downloads and caches the project's dependencies.
 
Thomas Kennedy
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Right, this is something simple that should be done by now. The book -- it's a web services book -- says simply, (1) install Maven and (2) run mvn install. (It doesn't even clearly explain why I'm supposed to do these things.) So my options are to learn Maven and see if I can get this figured out, or just pick another book. Today I will try to contact the author and see what he says.

Many thanks for your help.
 
James Boswell
Bartender
Posts: 1051
5
Hibernate Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thomas

For a basic Maven tutorial, try this: http://united-coders.com/phillip-steffensen/maven-2-part-1-setting-up-a-simple-apache-maven-2-project
 
Thomas Kennedy
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you, I will read that.
 
Thomas Kennedy
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, the problem was that our proxy uses NTLMv2. I did not know that this is problematic for Maven. The fix is to install Cntlm and point Maven to that. Now I can get back to being confused about web services.
 
No matter. Try again. Fail again. Fail better. This time, do it with this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic