Hi, I am working to create a build script with maven for an android
project and I want to use <profile> in the pom.xml so I can select the
languages(resources) that I want when I make the build. The resources
are in res folder and in this folder I have a folder for every
language ( en, ar, es, fr, de, tr, etc) and 3 more folders(anim,
drawable, layout) this 3 folder are in the .apk file after build  in
the res folder but the languages folder are not . I have notice that
the .apk that it is create have a resources.arsc file and I belive all
languages resources are  in there by default. Is there any solution
for using profiles or anything else to exclude some resources from the
build and include the ones that we want?.
I'm new in android and maven so please excuse me if I was not explicit
enough  in my problem.

Thank you!

This is the section with the language profiles that I have use.

pom.xml

 <profile>
                        <id>all_languages</id>
                        <build>
                                <resources>
                                        <resource>
                                                
<directory>res/values-ar</directory>
                                                <filtering>true</filtering>
                                        </resource>
                                        <resource>
                                                
<directory>res/values-ch</directory>
                                                <filtering>true</filtering>
                                        </resource>
                                        <resource>
                                                
<directory>res/values-de</directory>
                                                <filtering>true</filtering>
                                        </resource>
                                        <resource>
                                                
<directory>res/values-es</directory>
                                                <filtering>true</filtering>
                                        </resource>
                                        <resource>
                                                
<directory>res/values-fr</directory>
                                                <filtering>true</filtering>
                                        </resource>
                                        <resource>
                                                
<directory>res/values-it</directory>
                                                <filtering>true</filtering>
                                        </resource>
                                        <resource>
                                                
<directory>res/values-pt</directory>
                                                <filtering>true</filtering>
                                        </resource>
                                        <resource>
                                                
<directory>res/values-ru</directory>
                                                <filtering>true</filtering>
                                        </resource>
                                        <resource>
                                                
<directory>res/values-th</directory>
                                                <filtering>true</filtering>
                                        </resource>
                                        <resource>
                                                
<directory>res/values-tr</directory>
                                                <filtering>true</filtering>
                                        </resource>
                                        <resource>
                                                
<directory>res/values-vi</directory>
                                                <filtering>true</filtering>
                                        </resource>
                                </resources>

                                <!--<plugins>
                                        <plugin>
                                                
<groupId>org.apache.maven.plugins
                                                </groupId>
                                                
<artifactId>maven-jar-plugin</artifactId>
                                                <configuration>
                                                        
<classifier>community</classifier>
                                                </configuration>
                                        </plugin>
                                </plugins> -->

                        </build>
   </profile>
   <profile>
                        <id>th</id>
                        <build>
                                <resources>
                                        <resource>
                                                
<directory>res/values-th</directory>
 
<filtering>true</filtering>
                                        </resource>
                                </resources>
                        </build>
   </profile>
   <profile>
                        <id>pt</id>
                        <build>
                                <resources>
                                        <resource>
                                                
<directory>res/values-pt</directory>
 
<filtering>true</filtering>
                                        </resource>
                                </resources>
                        </build>
   </profile>
   <profile>
                        <id>tr</id>
                        <build>
                                <resources>
                                        <resource>
                                                
<directory>res/values-tr</directory>
 
<filtering>true</filtering>
                                        </resource>
                                </resources>
                        </build>
   </profile>
                <profile>
                        <id>ar</id>
                        <build>
                                <resources>
                                        <resource>
                                                
<directory>res/values-ar</directory>
 
<filtering>true</filtering>
                                        </resource>
                                </resources>
                        </build>
                </profile>
                <profile>
                        <id>de</id>
                        <build>
                                <resources>
                                        <resource>
                                                
<directory>res/values-de</directory>
 
<filtering>true</filtering>
                                        </resource>
                                </resources>
                        </build>
                </profile>
                <profile>
                        <id>en</id>
                        <build>
                                <resources>
                                        <resource>
                                                
<directory>res/values-en</directory>
 
<filtering>true</filtering>
                                        </resource>
                                </resources>
                        </build>
                </profile>
                <profile>
                        <id>es</id>
                        <build>
                                <resources>
                                        <resource>
                                                
<directory>res/values-es</directory>
 
<filtering>true</filtering>
                                        </resource>
                                </resources>
                        </build>
                </profile>

                <profile>
                        <id>it</id>
                        <build>
                 <resources>
                            <resource>
                                <directory>res/values-it</directory>
                                                       <includes>
 
<include>values-it</include>
                                                       </includes>
                        </resource>
                                </resources>
                        </build>
                </profile>
                <profile>
                        <id>ru</id>
                        <build>
                                <resources>
                                        <resource>
                                                
<directory>res/values-ru</directory>
 
<includes>
 
<include>**/*.xml</include>
 
</includes>
                                                  </resource>
                                </resources>
                        </build>
                </profile>

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to