Ask Your Question

Why the building of ODL HelloWorld produce big tar.gz and zip?

asked 2016-05-10 23:57:35 -0700

Qing Dong gravatar image

updated 2016-05-11 00:00:54 -0700

Hi, everyone!

I am new to ODL. I followed these steps to build a HelloWorld project.
1 Use command:
mvn archetype:generate -DarchetypeGroupId=org.opendaylight.controller -DarchetypeArtifactId=opendaylight-startup-archetype -DarchetypeRepository= -DarchetypeCatalog=

Then my working directory is like this:
drwxrwxr-x 8 sdn sdn 4096 5月 10 16:04 ./
drwxrwxr-x 14 sdn sdn 4096 5月 11 10:24 ../
drwxrwxr-x 5 sdn sdn 4096 5月 11 14:46 api/
drwxrwxr-x 3 sdn sdn 4096 5月 10 16:04 artifacts/
drwxrwxr-x 5 sdn sdn 4096 5月 10 16:05 features/
drwxrwxr-x 5 sdn sdn 4096 5月 11 14:46 impl/
drwxrwxr-x 4 sdn sdn 4096 5月 10 16:05 karaf/
-rw-rw-r-- 1 sdn sdn 1959 5月 10 14:53 pom.xml
-rw-rw-r-- 1 sdn sdn 379 5月 10 16:04 .project
drwxrwxr-x 2 sdn sdn 4096 5月 10 16:05 .settings/

2 Use command:
mvn clean install -D skipTests

Then a very long building process. Usually take more than 3 minutes.
In that period, a info show for very long time.
[INFO] --- karaf-maven-plugin:3.0.1:instance-create-archive (package) @ hello-karaf ---
And, when building finished, I found hello-karaf-1.0-SNAPSHOT.tar.gz and in the <working-dir>/karaf/target/. Each about 160MB.

My question is how can I prevent mvn clean install producing the big tar.gz and zip? Thank you!

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2016-05-11 02:25:42 -0700

pande.gaurav gravatar image

When you build a maven archetype for first type it downloads the snapshots for different modules of opendaylight like karaf osgi environment which you run when your archetype is created.

for the first you have to run the command mvn install or mvn clean install so that all the dependencies and jars for the project are stored at your local repository. But Afterwards if you dont want opendayilght to download snapshots you can use the command: mvn clean install -nsu

The “nsu” is short for no-snapshot-updates. It ensures that the compilation does not download definitions from

Hope it helps

edit flag offensive delete publish link more


Thank you for reply. But this argument could not solve my problem. My project would not download updates, because I used -DarchetypeVersion=1.0.3-Lithium-SR3 when I generate the project. Thank you.

Qing Dong ( 2016-05-11 07:08:34 -0700 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]


Asked: 2016-05-10 23:57:35 -0700

Seen: 21 times

Last updated: May 11 '16