Re:Error of after running 'mvn package' command

2013-07-11 Thread 邹志勇
I don't config repository and where can i see the repository configured?

Thanks.


At 2013-07-11 09:46:57,邹志勇 zouzhiyong0...@163.com wrote:

Hi,
After i run the command 'mvn package', then i get the following error message :
 Failed to execute goal org.kohsuke:access-modifier-checker:1.4:enforce 
(default-enforce) on project javaone-sample: Execution default-enforce of goal 
org.kohsuke:access-modifier-checker:1.4:enforce failed: Plugin 
org.kohsuke:access-modifier-checker:1.4 or one of its dependencies could not be 
resolved: Failed to collect dependencies at 
org.kohsuke:access-modifier-checker:jar:1.4 - 
org.kohsuke:access-modifier-annotation:jar:1.4 - 
org.jenkins-ci:annotation-indexer:jar:1.4: Failed to read artifact descriptor 
for org.jenkins-ci:annotation-indexer:jar:1.4: Could not transfer artifact 
org.jenkins-ci:annotation-indexer:pom:1.4 from/to m.g.o-public 
(http://maven.glassfish.org/content/groups/public/): hostname in certificate 
didn't match: maven.glassfish.org != maven.java.net OR maven.java.net - 
[Help 1]
So, why, am i need to config in somewhere?

Thanks.





Re:Error of after running 'mvn package' command

2013-07-11 Thread 邹志勇
From my observation, in POM file and settings.xml don't do any config about 
repository, the following are two files content :
In the end, i pastes the more detail debug infor of running 'mvn '.
1.Project POM file content :
project xmlns=http://maven.apache.org/POM/4.0.0; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd;
   
modelVersion4.0.0/modelVersion

parent
groupIdorg.jvnet.hudson.plugins/groupId
artifactIdhudson-plugin-parent/artifactId
version2.1.2/version!-- which version of Hudson is this plugin 
built against? --
/parent

groupIdorg.sample.hudson/groupId
artifactIdjavaone-sample/artifactId
version1.0-SNAPSHOT/version

packaginghpi/packaging

nameMy New Plugin/name
2. Global settings.xml content :
?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 ${user.home}/.m2/settings.xml.
 |
 | NOTE: This location can be overridden with the CLI option:
 |
 | -s /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 CLI option:
 |
 | -gs /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
  interactiveModetrue/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
  offlinefalse/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.
pluginGroupcom.your.plugins/pluginGroup
--
pluginGrouporg.jvnet.hudson.tools/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
  idoptional/id
  activetrue/active
  protocolhttp/protocol
  usernameproxyuser/username
  passwordproxypass/password
  hostproxy.host.net/host
  port80/port
  nonProxyHostslocal.net|some.host.com/nonProxyHosts
/proxy
--
  /proxies

  !-- servers
   | This is a list of authentication profiles, keyed by