no, I'm suggesting that you use the dependency plugin to unpack your jar for
you.

That way you will not care if it has not beein installed into the repository
*yet*

2009/5/4 huser <[email protected]>

>
> I am fairly new to maven. So I guess I need a plugin to copy the
> abc-interface-api.jar to my local repository ? Are you suggesting I do this
> by dependency plugin. I tried adding this.
>
> Basically, abc-interface-api-$project.parent.version} should get copied to
> local .m2 repository under com/abc/t3/abc-interface=api/1.6
>
>
> <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-dependency-plugin</artifactId>
>        <executions>
>          <execution>
>            <id>copy</id>
>            <phase>package</phase>
>            <goals>
>              <goal>copy</goal>
>            </goals>
>            <configuration>
>              <artifactItems>
>                <artifactItem>
>                  <groupId>com.abc.t3</groupId>
>                  <artifactId>abc-interface-api</artifactId>
>                  <version>${project.parent.version}</version>
>                  <type>jar</type>
>                  <overWrite>true</overWrite>
>
> <outputDirectory>${env.M2_REPO}/com/abc/t3</outputDirectory>
>
>
> <destFileName>abc-interface-api-${project.parent.version}.jar</destFileName>
>                </artifactItem>
>              </artifactItems>
>              <!-- other configurations here -->
>            </configuration>
>          </execution>
>        </executions>
>      </plugin>
>
> but, then I get this error:
>
> [INFO] [ERROR] BUILD ERROR
> [INFO] [INFO]
> ------------------------------------------------------------------
> ------
> [INFO] [INFO] Unable to find artifact.
> [INFO]
> [INFO] Embedded error: Unable to download the artifact from any repository
> [INFO]
> [INFO] Try downloading the file manually from the project website.
> [INFO]
> [INFO] Then, install it using the command:
> [INFO]     mvn install:install-file -DgroupId=com.abc.t3
> -DartifactId=abc-inter
> face-api -Dversion=1.6 -Dpackaging=jar -Dfile=/path/to/file
> [INFO]
> [INFO] Alternatively, if you host your own repository you can deploy the
> file th
> ere:
> [INFO]     mvn deploy:deploy-file -DgroupId=com.abc.t3
> -DartifactId=abc-interfa
> ce-api -Dversion=1.6 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url]
> -Dreposito
> ryId=[id]
> [INFO]
> [INFO]
> [INFO]   com.abc.t3:abc-interface-api:jar:1.6
> [INFO]
> [INFO] from the specified remote repositories:
> [INFO]   nexus
> (http://abcsvn001.na.abcglobal.com:8081/nexus/content/groups/publi
> c),
> [INFO]   snapshots
> (http://abcsvn001.na.abcglobal.com:8081/nexus/content/reposito
> ries/snapshots<http://abcsvn001.na.abcglobal.com:8081/nexus/content/reposito%0Aries/snapshots>
> )
> [INFO]
> [INFO] [INFO]
> ------------------------------------------------------------------
>
> Stephen Connolly-2 wrote:
> >
> > ugh!
> >
> > that sounds hacky hacky hack
> >
> > you probably should try having the dependency plugin unpack for you
> >
> > -Stephen
> > On 04/05/2009, huser <[email protected]> wrote:
> >>
> >> Hi,
> >>
> >> I am running maven release plugin by:
> >>
> >> mvn -f pom.xml -Pabc.debug.release --batch-mode -Dtag=REL1.5-TEST
> >> -DtagBase="https://abcsvn001.na.abcglobal.com/abc_repos/T3/tags";
> >> -DreleaseVersion=1.5 -DdevelopmentVersion=1.6-SNAPSHOT release:prepare
> >>
> >> And I get this build error.
> >> [INFO] [INFO] An Ant BuildException has occured: The following error
> >> occurred wh
> >> ile executing this line:
> >> [INFO]
> >>
> C:\mvn_rel\int_002_dev_test\services-api\abc-interface-api\xsd-extract.xm
> >> l:19: Error while expanding C:\Documents and
> >> Settings\huser\.m2\repository\co
> >> m\abc\t3\abc-websvc-api\1.5\abc-websvc-api-1.5.jar
> >> [INFO] java.io.FileNotFoundException: C:\Documents and
> >> Settings\huser\.m2\rep
> >> ository\com\abc\t3\abc-websvc-api\1.5\abc-websvc-api-1.5.jar (The system
> >> cannot
> >>  find the path specified)
> >>
> >> I do not get this error if I do not use the release plugin i.e.
> >> mvn -f pom.xml -Pabc.debug.release clean install deploy
> >>
> >> In my xsd-extract.xml, I have an environment variable $verinfo which
> >>
> >>              <unjar
> >>
> src="${env.M2_REPO}/com/abc/t3/abc-websvc-api/${verinfo}/abc-websvc-api-${verinfo}.jar"
> >>
> >> gets its value defined in abc-interface-api
> >>
> >>              <plugins>
> >>                      <plugin>
> >>                              <groupId>org.apache.maven.plugins</groupId>
> >>
>  <artifactId>maven-antrun-plugin</artifactId>
> >>                              <executions>
> >>                                      <execution>
> >>                                              <id>extract-xsds</id>
> >>                                              <phase>initialize</phase>
> >>                                              <configuration>
> >> <tasks>
> >>      <property name="verinfo" value="${project.parent.version}" />
> >>      <echo message="My dependency name: ${verinfo}" />
> >>      <ant antfile="${basedir}/xsd-extract.xml">
> >>              <target name="retrieve-xsds" />
> >>      </ant>
> >> </tasks>
> >>                                              </configuration>
> >>                                              <goals>
> >>                                                      <goal>run</goal>
> >>                                              </goals>
> >>                                      </execution>
> >>                              </executions>
> >> </plugin>
> >>
> >> Why is abc-websvc-api-1.5.jar being called before it is deployed in .m2
> ?
> >> This jar does get generated in abc-interface-api\target. But it does not
> >> get
> >> deployed in .m2
> >>
> >> Any ideas ?
> >>
> >> thanks,
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/maven-release-plugin-issue-tp23375978p23375978.html
> >> Sent from the Maven - Users mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [email protected]
> >> For additional commands, e-mail: [email protected]
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/maven-release-plugin-issue-tp23375978p23376647.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to