Sorry for my poor english, I didn't explain myself clean enough.
If you changed the smx-arch as you said , you just need to run smx-arch to get what you want.

And if you want to use mvn archetype:create to create the artifacts, you need to use this command

mvn archetype:generate
-DremoteRepositories=https://repository.apache.org/content/groups/public
-DarchetypeArtifactId=servicemix-camel-service-unit
-DarchetypeGroupId=org.apache.servicemix.tooling
-DartifactId=tutorial-camel-su -DarchetypeVersion=2009.01-SNAPSHOT

*NOTE* the remoteRepositories is start with https :)

Willem


Kenneth H wrote:
Hi Willem - thanks for your good answers,

Now it seems to dind the right repository (I think), but I still get an
error caused by a check-sum error. I did the following since your last post:
First, I deleted the m2 directory.

Then I have changed the smx-arc file (no extension) in the servicemix/bin
directory to (in the end of the document):

mvn archetype:create \
  -DremoteRepositories=https://repository.apache.org/content/groups/public \
  -DarchetypeGroupId=org.apache.servicemix.tooling \
  -DarchetypeArtifactId=$ARCHETYPE \
  -DgroupId=$DEF_GROUP_ID \
  -DartifactId=$DEF_ARTIFACT_ID \
  "$@"

Then I have changed the smx-arc.bat file in the servicemix/bin directory (in
the end of the document) to:

:run
set CMD_LINE_ARGS=
:setArgs
if ""%1""=="""" goto doneSetArgs
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
shift
goto setArgs
:doneSetArgs
mvn archetype:create
-DremoteRepositories=https://repository.apache.org/content/groups/public
-DarchetypeGroupId=org.apache.servicemix.tooling
-DarchetypeArtifactId=%ARCHETYPE% -DgroupId=%DEF_GROUP_ID%
-DartifactId=%DEF_ARTIFACT_ID% %CMD_LINE_ARGS%
goto end

:end

I then used the command:

mvn archetype:create
-DremoteRepositories=http://repository.apache.org/content/groups/public
-DarchetypeArtifactId=servicemix-camel-service-unit
-DarchetypeGroupId=org.apache.servicemix.tooling
-DartifactId=tutorial-camel-su -DarchetypeVersion=2009.01-SNAPSHOT

I think we (you) are getting closer, but it’s still not working. Se the
output below (screenshot at www.henriksenweb.com/servicemix/7.png):

Downloading:
http://repo1.maven.org/maven2/org/apache/maven/archetype/archetype-common/2.0-alpha-4/archetype-common-2.0-alpha-4.jar

Downloading:
http://repo1.maven.org/maven2/org/apache/velocity/velocity/1.5/velocity-1.5.jar

Downloading:
http://repo1.maven.org/maven2/org/apache/maven/shared/maven-invoker/2.0.6/maven-invoker-2.0.6.jar
Downloading: http://repo1.maven.org/maven2/jdom/jdom/1.0/jdom-1.0.jar

Downloading:
http://repo1.maven.org/maven2/commons-lang/commons-lang/2.1/commons-lang-2.1.jar

Downloading:
http://repo1.maven.org/maven2/velocity/velocity/1.4/velocity-1.4.jar
Downloading:
http://repo1.maven.org/maven2/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar
Downloading:
http://repo1.maven.org/maven2/commons-collections/commons-collections/3.2/commons-collections-3.2.jar

Downloading:
http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-velocity/1.1.3/plexus-velocity-1.1.3.jar

Downloading:
http://repo1.maven.org/maven2/velocity/velocity-dep/1.4/velocity-dep-1.4.jar

[INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [archetype:create {execution: default-cli}]
[WARNING] This goal is deprecated. Please use mvn archetype:generate instead
[INFO] Defaulting package to group ID: Test
[INFO] We are using command line specified remote repositories:
http://repository.apache.org/content/groups/public
[INFO] snapshot
org.apache.servicemix.tooling:servicemix-camel-service-unit:2009.01-SNAPSHOT:
checking for updates from id0
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
'47477d815784be29d6b3084e09e76c5620eb3c57'; remote = '<!DOCTYPE' - RETRYING
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
'47477d815784be29d6b3084e09e76c5620eb3c57'; remote = '<!DOCTYPE' - IGNORING
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error creating from archetype

Embedded error: org.apache.maven.archetype.downloader.DownloadException:
Error downloading.
end tag name </body> must match start tag name <hr> from line 7 (position:
TEXT seen ...</address>\n</body>... @9:8)
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 44 seconds
[INFO] Finished at: Thu Nov 05 18:55:11 CET 2009
[INFO] Final Memory: 8M/14M
[INFO]
------------------------------------------------------------------------
C:\Servicemix\Test\Test3>


Have you (or others) any ideas ?

Kind regards, Kenneth H



willem.jiang wrote:
Hi Kenneth,

I download the latest released apache SMX 3.3.1, found the smx-arch's calling of the mvn archetype:create is wrong.
"-dremoterepositori...@{releases-repo-url}"
it should be replace with below line
"-DremoteRepositories=https://repository.apache.org/content/groups/public";

And you should also update my former mvn archetype:create command with upper remoteRepositories.

Willem


Willem Jiang wrote:
Hi Kenneth,

I just have a chance to check the code of smx-arch on fuse ESB 3.3.1.x.
It will cal the mvn archetyep:create on the earth.
mvn archetype:create \
  -DremoteRepositories=http://repo.open.iona.com/maven2 \
  -DarchetypeGroupId=org.apache.servicemix.tooling \
  -DarchetypeArtifactId=$ARCHETYPE \
  -DarchetypeVersion=$SERVICEMIX_VERSION \
  -DgroupId=$DEF_GROUP_ID \
  -DartifactId=$DEF_ARTIFACT_ID \
  "$@"

I think the below command should work for your
 mvn archetype:generate
-DremoteRepositories=http://repository.apache.org/content/groups/public
-DarchetypeArtifactId=servicemix-camel-service-unit
-DarchetypeGroupId=org.apache.servicemix.tooling
-DartifactId=tutorial-camel-su -DarchetypeVersion=2009.01-SNAPSHOT

Willem

Kenneth H wrote:
Thank you for your answer Willem, but I still have the problem. As you
advices me to, I added
"-Dreleases-repo-url=http://repository.apache.org/content/groups/public"; to the command. It seems like it still doesn't know how to find it See output from command below (or screenshot at www.henriksenweb.com/servicemix/6.png):

C:\Servicemix\Test\Test3>smx-arch su camel
"-DgroupId=com.ekaplus.accounting" "-DartifactId=camel-notifyevent"
"-DarchetypeVersion=2009.01-SNAPSHOT"
"-Dreleases-repo-url=http://repository.apache.org/conten
t/groups/public"

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO]
------------------------------------------------------------------------
[INFO] Building SMX-Camel :: Tutorial
[INFO]    task-segment: [archetype:create] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [archetype:create {execution: default-cli}]
[WARNING] This goal is deprecated. Please use mvn archetype:generate instead
[INFO] Defaulting package to group ID: com.ekaplus.accounting
[INFO] We are using command line specified remote repositories:
@{releases-repo-url}
[INFO] snapshot
org.apache.servicemix.tooling:servicemix-camel-service-unit:2009.01-SNAPSHOT:
checking for updates from id0
Downloading:
@{releases-repo-url}/org/apache/servicemix/tooling/servicemix-camel-service-unit/2009.01-SNAPSHOT/servicemix-camel-service-unit-2009.01-SNAPSHOT.jar
[INFO] Unable to find resource
'org.apache.servicemix.tooling:servicemix-camel-service-unit:jar:2009.01-SNAPSHOT'
in repository id0 (@{releases-repo-url})
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error creating from archetype

Embedded error:
org.apache.maven.archetype.downloader.DownloadNotFoundException: Requested
download does not exist.
Unable to download the artifact from any repository
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Thu Nov 05 13:35:01 CET 2009
[INFO] Final Memory: 8M/14M
[INFO]
------------------------------------------------------------------------
This is so strange to me. Hope you/others know what's wrong. It's definitely
something about the repo configuration as you write. I can't find it.
I'm
using Windows Vista. Maybe there needs to be an "/" extra somewhere? Or some
other small change in syntax. I read that Windows/Linux differs
slightly.

Hope to hear from you soon.

Kind Regards, Kenneth H


willem.jiang wrote:
Hi,

It looks like the archetype of 2009.01 is no released yet,
(There is no 2009.01 directory on the http://repository.apache.org/content/groups/public/org/apache/servicemix/tooling/servicemix-camel-service-unit/)
so please change the version to 2009.01-SNAPSHOT.

Willem

Willem Jiang wrote:
I think you need to specify the url of mvn repo.
Please try to add -Dreleases-repo-url=http://repository.apache.org/content/groups/public
When you call smx-arch.

Willem

Kenneth H wrote:
Dear forum readers,

I’m studying Servicemix as a part of my master thesis. As many others I have
therefore started on the Servicemix Camel tutorial at

http://cwiki.apache.org/SM/31-starting-a-new-project.html (1)
As I soon found out following this tutorial generated the error described in
the mail

http://cwiki.apache.org/SM/discussion-forums.html#nabble-td25677368
Unfortunately, the advice in the mail didn’t help me although I have the same problem. This I don’t understand. What I have done is as follows in the
mentioned order:

1.    Downloaded Servicemix version 3.3.1
2.    Downloaded Maven version 2.2.1
3.    Created the pom.xml specified in link (1)
4. Executed the command: smx-arch su camel "-DgroupId=com.ekaplus.accounting"
"-DartifactId=camel-notifyevent" "-DarchetypeVersion=2009.01"

I get the following error (screenshot at
www.henriksenweb.com/servicemix/1.png):

C:\Servicemix\Test\Test3>smx-arch su camel
"-DgroupId=com.ekaplus.accounting" "-DartifactId=camel-notifyevent"
"-DarchetypeVersion=2009.01" [INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO]
------------------------------------------------------------------------
[INFO] Building SMX-Camel :: Tutorial
[INFO]    task-segment: [archetype:create] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [archetype:create {execution: default-cli}]
[WARNING] This goal is deprecated. Please use mvn archetype:generate instead
[INFO] Defaulting package to group ID: com.ekaplus.accounting
[INFO] We are using command line specified remote repositories:
@{releases-repo-url}
Downloading:
@{releases-repo-url}/org/apache/servicemix/tooling/servicemix-camel-service-unit/2009.01/servicemix-camel-service-unit-2009.01.jar
[INFO] Unable to find resource
'org.apache.servicemix.tooling:servicemix-camel-service-unit:jar:2009.01' in
repository id0 (@{releases-repo-url})
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error creating from archetype

Embedded error:
org.apache.maven.archetype.downloader.DownloadNotFoundException: Requested
download does not exist.
Unable to download the artifact from any repository
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Thu Nov 05 01:25:47 CET 2009
[INFO] Final Memory: 8M/14M
[INFO]
------------------------------------------------------------------------ So I thought that maybe it was the wrong versionnumber or maybe the
“new”
Maven “generate” command. Therefore I have also tried the following
commands:

smx-arch su camel "-DgroupId=com.ekaplus.accounting"
"-DartifactId=camel-notifyevent" "-DarchetypeVersion=3.3.2"
(screenshot at www.henriksenweb.com/servicemix/2.png)

smx-arch su camel "-DgroupId=com.ekaplus.accounting"
"-DartifactId=camel-notifyevent"
"-DarchetypeVersion=2009.01-SNAPSHOT"

(screenshot at www.henriksenweb.com/servicemix/3.png)

mvn archetype:generate -DarchetypeArtifactId=servicemix-camel-service-unit
-DarchetypeGroupId=org.apache.servicemix.tooling
-DartifactId=tutorial-camel-su -DarchetypeVersion=2009.01

(screenshot at www.henriksenweb.com/servicemix/4.png)

mvn archetype:generate -DarchetypeArtifactId=servicemix-camel-service-unit
-DarchetypeGroupId=org.apache.servicemix.tooling
-DartifactId=tutorial-camel-su -DarchetypeVersion=3.3.2

(screenshot at www.henriksenweb.com/servicemix/5.png)

C:\Servicemix\Test\Test3>mvn archetype:create
-DarchetypeArtifactId=servicemix-camel-service-unit
-DarchetypeGroupId=org.apache.servicemix.tooling
-DartifactId=tutorial-camel-su -DarchetypeVersion=2009.01

C:\Servicemix\Test\Test3>mvn archetype:create
-DarchetypeArtifactId=servicemix-camel-service-unit
-DarchetypeGroupId=org.apache.servicemix.tooling
-DartifactId=tutorial-camel-su -DarchetypeVersion=3.3.2

I really need your help. Am I missing some detail?

Kind regards,
Kenneth H







Reply via email to