質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Spring

Spring Framework は、Javaプラットフォーム向けのオープンソースアプリケーションフレームワークです。 Java Platform上に、 Web ベースのアプリケーションを設計するための拡張機能が数多く用意されています。

TERASOLUNA

TERASOLUNA(テラソルナ)はNTTデータの独自フレームワークです。 比較的大規模なシステム開発における 開発手順・フレームワーク・サポートなどの製品群により構成されています。

Q&A

1回答

14048閲覧

mvn archetype:generate を利用して、プロジェクトを作成する際の留意点を教えてください。

King_of_Flies

総合スコア382

Spring

Spring Framework は、Javaプラットフォーム向けのオープンソースアプリケーションフレームワークです。 Java Platform上に、 Web ベースのアプリケーションを設計するための拡張機能が数多く用意されています。

TERASOLUNA

TERASOLUNA(テラソルナ)はNTTデータの独自フレームワークです。 比較的大規模なシステム開発における 開発手順・フレームワーク・サポートなどの製品群により構成されています。

0グッド

1クリップ

投稿2017/06/23 07:16

現在TERASOLUNAを使用して開発練習をしようと試みている物です。

http://terasolunaorg.github.io/guideline/5.3.0.RELEASE/ja/TERASOLUNAServerFrameworkForJavaDevelopmentGuideline.pdf

こちらのサイトの目次2.2.1の検証環境作成と言うことで、
java,SpringToolSuite,mavenをそれぞれインストールし、
環境変数などについても調査して、
JAVA_HOMEにJDKの参照パスを。
PATHにMAVENの実行ファイルのパスを指定し、
mvn --help でmvnコマンドのパスが通っていることは確認できました。

いざ、mvn archetype:generate使用してみたところ、
下記エラーが出力されました。

cmd

1[INFO] Scanning for projects... 2Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-depl 3oy-plugin/2.7/maven-deploy-plugin-2.7.pom 4[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-dep 5loy-plugin:2.7: Plugin org.apache.maven.plugins:maven-deploy-plugin:2.7 or one of its 6 dependencies could not be resolved: Failed to read artifact descriptor for org.apach 7e.maven.plugins:maven-deploy-plugin:jar:2.7 8Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-site 9-plugin/3.3/maven-site-plugin-3.3.pom 10[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-sit 11e-plugin:3.3: Plugin org.apache.maven.plugins:maven-site-plugin:3.3 or one of its dep 12endencies could not be resolved: Failed to read artifact descriptor for org.apache.ma 13ven.plugins:maven-site-plugin:jar:3.3 14Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-antr 15un-plugin/1.3/maven-antrun-plugin-1.3.pom 16[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-ant 17run-plugin:1.3: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.3 or one of its 18 dependencies could not be resolved: Failed to read artifact descriptor for org.apach 19e.maven.plugins:maven-antrun-plugin:jar:1.3 20Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-asse 21mbly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.pom 22[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-ass 23embly-plugin:2.2-beta-5: Plugin org.apache.maven.plugins:maven-assembly-plugin:2.2-be 24ta-5 or one of its dependencies could not be resolved: Failed to read artifact descri 25ptor for org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-beta-5 26Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-depe 27ndency-plugin/2.8/maven-dependency-plugin-2.8.pom 28[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-dep 29endency-plugin:2.8: Plugin org.apache.maven.plugins:maven-dependency-plugin:2.8 or on 30e of its dependencies could not be resolved: Failed to read artifact descriptor for o 31rg.apache.maven.plugins:maven-dependency-plugin:jar:2.8 32Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-rele 33ase-plugin/2.3.2/maven-release-plugin-2.3.2.pom 34[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-rel 35ease-plugin:2.3.2: Plugin org.apache.maven.plugins:maven-release-plugin:2.3.2 or one 36of its dependencies could not be resolved: Failed to read artifact descriptor for org 37.apache.maven.plugins:maven-release-plugin:jar:2.3.2 38Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-meta 39data.xml 40Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xm 41l 42[WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml fro 43m/to central (https://repo.maven.apache.org/maven2): Host name may not contain blanks 44 45[WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to ce 46ntral (https://repo.maven.apache.org/maven2): Host name may not contain blanks 47[WARNING] Failure to transfer org.apache.maven.plugins/maven-metadata.xml from https: 48//repo.maven.apache.org/maven2 was cached in the local repository, resolution will no 49t be reattempted until the update interval of central has elapsed or updates are forc 50ed. Original error: Could not transfer metadata org.apache.maven.plugins/maven-metada 51ta.xml from/to central (https://repo.maven.apache.org/maven2): Host name may not cont 52ain blanks 53[WARNING] Failure to transfer org.codehaus.mojo/maven-metadata.xml from https://repo. 54maven.apache.org/maven2 was cached in the local repository, resolution will not be re 55attempted until the update interval of central has elapsed or updates are forced. Ori 56ginal error: Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to 57 central (https://repo.maven.apache.org/maven2): Host name may not contain blanks 58[INFO] ------------------------------------------------------------------------ 59[INFO] BUILD FAILURE 60[INFO] ------------------------------------------------------------------------ 61[INFO] Total time: 1.734 s 62[INFO] Finished at: 2017-06-23T16:04:55+09:00 63[INFO] Final Memory: 9M/155M 64[INFO] ------------------------------------------------------------------------ 65[ERROR] No plugin found for prefix 'archetype' in the current project and in the plug 66in groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositori 67es [local (C:\Users\takko\.m2\repository), central (https://repo.maven.apache.org/mav 68en2)] -> [Help 1] 69[ERROR] 70[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 71[ERROR] Re-run Maven using the -X switch to enable full debug logging. 72[ERROR] 73[ERROR] For more information about the errors and possible solutions, please read the 74 following articles: 75[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPre 76fixException

上記エラーについて調べた際のサイトがこちらになります。

https://stackoverflow.com/questions/6472782/mvn-archetypegenerate-does-not-work-no-plugin-found-for-prefix-archetype

ここではpom.xml?がキーになっているのかと思っているのですが、
翻訳をしてみても内容がサッパリ分からず手が止まってしまっています。

どのように対処すればよろしいですか。

お願い致します。

下記調査済みのURLリンクを張っておきます。

https://stackoverflow.com/questions/16348459/error-the-goal-you-specified-requires-a-project-to-execute-but-there-is-no-pom
http://qiita.com/hide/items/6593f3f02c3f28e57f2d
http://maven.apache.org/guides/mini/guide-proxies.html

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

mavenが必要なライブラリをダウンロードしようとして軒並み失敗しています。

インターネット接続にプロクシ経由をしている場合は、別途mavenにもプロクシ設定をしてください。

投稿2017/06/23 15:23

A-pZ

総合スコア12011

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

King_of_Flies

2017/06/26 02:12

mavenのconfigのsetting.xmlにproxyを設定してこのエーらが出力される場合はどうすればよいですか。
King_of_Flies

2017/06/26 02:14

<proxies> <proxy> <id>optional</id> <active>true</active> <protocol>http</protocol> <host>proxy.somewhere.com</host> <port>80</port> <username>proxyuser</username> <password>somepassword</password> <nonProxyHosts>www.google.com|*.somewhere.com</nonProxyHosts> </proxy> </proxies> インターネットオプションより、portは80であるのが分かっているのでそこは手動で入れました。 hostadressは未記載だったので、nonproxyhostにしました。
A-pZ

2017/06/26 02:41

"インターネット接続にプロクシ経由をしている場合は、別途mavenにもプロクシ設定をしてください" ですので、プロクシ経由が必須なネットワーク環境なら設定をするものです。必要がなければ記載は不要です。 mavenの設定で何らかの不備があると予想されますので、pom.xmlが記載されていればわかるかも知れません。
King_of_Flies

2017/06/26 04:07

pom.xmlは10000文字超えてここで掛けなかったので、 質問本文を編集して追記します。 自分が書き換えた部分は先ほど記載したプロキシーの部分のみで 参考にしたURLは下記のサイトです。 http://qiita.com/nikuyoshi/items/567f78e07e5733907491
King_of_Flies

2017/06/26 04:11 編集

本文編集でもpom.xmlを全て記述できなかったので、 分けて投稿します。 <?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. -->
King_of_Flies

2017/06/26 04:10

<!-- | 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.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. | |-->
King_of_Flies

2017/06/26 04:10

<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: ${user.home}/.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> <id>optional</id> <active>true</active> <protocol>http</protocol> <host>proxy.somewhere.com</host> <port>80</port> <username>proxyuser</username> <password>somepassword</password> <nonProxyHosts>www.google.com|*.somewhere.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>
King_of_Flies

2017/06/26 04:13

ほぼほぼコメントアウトされているので、意味があるのか分かりませんが、 プロキシーだけ記載しているような感じです。 (参考したサイトのほぼ全てがプロキシー設定してって感じだったので)
A-pZ

2017/06/26 05:38

そのプロクシ設定はあっているのでしょうか?
King_of_Flies

2017/06/26 05:59

一応、コントロールパネルのインターネットオプションで、 接続ーLANの設定から、 プロキシサーバーは使用されていないことが確認できているのですが、 プロキシの記述をコメントアウトしていた状態でもこのようなWarningメッセージが出たので、 とりあえず記述したんですが、出来なかったという経緯でいまこのpom.xmlの記述のままになっています。
A-pZ

2017/06/26 06:56

プロクシ環境にない場合はプロクシ設定は不要ですよ。もし最初から記載されているのであれば逆にアクセスできなくなるので解除すべきでしょう。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問