facebook

How to build my jar file in eclipse using maven

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #288938 Reply

    muddu_shafi
    Member

    Hi everyone,
    Please help me out on this
    I have a project structure as such

    atcc-common
    |-security
    | |-src
    | | !-java
    | | !***.java
    | |-maven.xml
    | |- project.xml(extends ${basedir}/../project.xml)
    |–maven.xml
    |-project.xml(Master POM)

    I am trying to run maven:install on of the project.xml file(child or master) in ECLIPSE, it creates only atcc-common.jar file in the local repository.

    How can I make it to generate atcc-common-secruity.jar file in local repository.
    atcc-common
    |-common
    |1.0
    |atcc-common.jar

    What should I do?
    I am also pasting both the files

    First the atcc-common/security/project.xml file
    <?xml version=”1.0″ encoding=”UTF-8″?>
    <!–
    /*
    * Copyright 2001-2004 The Apache Software Foundation.
    *
    * Licensed 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.
    */
    –>
    <project>
    <extend>${basedir}/../project.xml</extend>
    <artifactId>atcc-common-security</artifactId>
    <!– the version of maven’s project object model –>
    <groupId>atcc-common</groupId>
    <pomVersion>3</pomVersion>
    <!– a unique name for this project –>
    <id>atcc-common-security</id>
    <!– a short but descriptive name for the project –>
    <name>ATCC Security</name>
    <!– The version of the project under development, e.g.
    1.1, 1.2, 2.0-SNAPSHOT –>
    <currentVersion>1.3.4</currentVersion>

    <!– details about the organization that ‘owns’ the project –>
    <organization>
    <name>Apache Software Foundation</name>
    <url>http://www.apache.org/</url&gt;
    <logo>http://maven.apache.org/images/jakarta-logo-blue.gif</logo&gt;
    </organization>
    <!– the year the project started –>
    <inceptionYear>2005</inceptionYear>
    <package>org.atcc.common.security</package>
    <logo>http://maven.apache.org/images/maven.jpg</logo&gt;
    <description>ATCC security classes.</description>
    <!– a short description of what the project does –>
    <shortDescription>ATCC security classes.</shortDescription>
    <!– the project home page –>
    <url>http://maven.apache.org/reference/plugins/examples/</url&gt;
    <issueTrackingUrl>http://nagoya.apache.org/scarab/servlet/scarab/</issueTrackingUrl&gt;
    <siteAddress>jakarta.apache.org</siteAddress>
    <siteDirectory>/www/maven.apache.org/reference/plugins/examples/</siteDirectory>
    <distributionDirectory>/www/maven.apache.org/builds/</distributionDirectory>
    <!– the version control repository and http url for online access
    the connection element has the form:
    scm:<system>:<system specific connection string> –>
    <repository>
    <connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven-plugins/examples</connection>
    <url>http://cvs.apache.org/viewcvs/maven-plugins/examples/</url&gt;
    </repository>
    <!– any mailing lists for the project –>
    <!– who the developers are for the project –>
    <!– jar files the project is dependent on –>
    <dependencies>
    <dependency>
    <groupId>jboss</groupId>
    <artifactId>jbossall-client</artifactId>
    <version>3.2.3</version>
    <type>jar</type>
    </dependency>
    <dependency>
    <groupId>jboss</groupId>
    <artifactId>jbosssx</artifactId>
    <version>3.2.5</version>
    <type>jar</type>
    </dependency>
    <dependency>
    <groupId>rbums</groupId>
    <artifactId>rbums-client</artifactId>
    <version>1.2</version>
    <type>jar</type>
    </dependency>
    <dependency>
    <groupId>springframework</groupId>
    <artifactId>spring</artifactId>
    <version>2.0</version>
    <type>jar</type>
    </dependency>
    </dependencies>
    <!– build information for the project –>
    <build>
    <nagEmailAddress>ksheridan@atcc.org</nagEmailAddress>
    <sourceDirectory>src/java</sourceDirectory>
    <!–
    <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
    <unitTest>
    <includes>
    <include>**/*Test.java</include>
    </includes>
    <excludes>
    <exclude>**/NaughtyTest.java</exclude>
    </excludes>
    </unitTest>
    –>
    <!–
    <resources>
    <resource>
    <directory>src/conf</directory>
    <includes>
    <include>*.properties</include>
    </includes>
    </resource>
    </resources>
    –>
    </build>
    </project>

    Now the atcc-common/Project.xml
    <?xml version=”1.0″ encoding=”UTF-8″?>
    <project>
    <!– maven POM number, needed but not used –>
    <pomVersion>3</pomVersion>
    <!– basic project information –>
    <!– –>

    <groupId>atcc-common</groupId>
    <id>common</id>
    <name>ATCC Common</name>
    <currentVersion>1.1</currentVersion>
    <!– –>
    <!– project management section –>
    <!– –>
    <organization>
    <name>IPMS – Software Projects</name>
    <url>http://thumper.atcc.org/</url&gt;
    </organization>
    <inceptionYear>2006</inceptionYear>
    <package>org.atcc.common.*</package>
    <logo>/</logo>
    <description>atcc-common is a project for all common software development.</description>
    <shortDescription>atcc-common</shortDescription>
    <!– internal web site for the project –>
    <url>http://thumper/projects/common</url&gt;
    <!– web server information –>
    <siteAddress>thumper</siteAddress>
    <siteDirectory>/wwwroot/default/projects/common</siteDirectory>
    <!– need to confirm/create this –>
    <distributionDirectory>/atcc-common/dist/${pom.artifactId}/</distributionDirectory>
    <repository>
    <!– we need anoncvs for our projects –>
    </repository>
    <!– no mailing lists –>
    <developers>
    <developer>
    <name>Hong Cao</name>
    <id>hongc</id>
    hongc@…
    <organization>ATCC – IPMS Software Projects Team</organization>
    <roles>
    <role>Java Developer</role>
    </roles>
    </developer>
    <developer>
    <name>Martha Weber</name>
    <id>mweber</id>
    mweber@…
    <organization>ATCC – IPMS Software Projects Team</organization>
    <roles>
    <role>Java Developer</role>
    </roles>
    </developer>
    <developer>
    <name>Keith Sheridan</name>
    <id>ksheridan</id>
    ksheridan@…
    <organization>ATCC – IPMS Software Projects Team</organization>
    </developer>
    </developers>
    <!– –>
    <!– project dependency section –>
    <!– –>
    <!– –>
    <!– project build and reports section –>
    <!– –>
    <build>
    <!– do I really want this ? –>
    <nagEmailAddress>hcao@atcc.org</nagEmailAddress>
    <sourceDirectory>${basedir}/src/java</sourceDirectory>
    <unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory>
    <unitTest>
    <includes>
    <include>**/Test*.java</include>
    </includes>
    <excludes>
    <exclude>**/*Test*All.java</exclude>
    </excludes>
    </unitTest>
    <!– (OPTIONAL) Resources packaged inside the JAR file. –>
    </build>
    <!– for now we’ll build all of the reports although we should let the subprojects define their reports –>
    </project>

    [/b]

    #288952 Reply

    Loyal Water
    Member

    Moving to Off Topic >> Software Development.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: How to build my jar file in eclipse using maven

You must be logged in to post in the forum log in