[ 
http://jira.codehaus.org/browse/MANTRUN-122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=197066#action_197066
 ] 

Scott Lavender edited comment on MANTRUN-122 at 11/3/09 1:52 PM:
-----------------------------------------------------------------

To clarify this issue, here are some more details of this real example....

We use a NetWeaver tool to assemble SDA artifacts into a deployable SCA. These 
SDA's are present in the specified local repository. The maven-ant-tasks 
<dependency> is used to reference these artifacts. The problem is that the only 
place the antrun plugin looks to resolve these dependancies is the 
localRepository as defined in apache-maven-2.0.9\conf\settings.xml, not the 
settings file as specified on the Maven command line.

<plugin>
  <artifactId>maven-antrun-plugin</artifactId>
    <executions>
      <execution>
        <phase>package</phase>
        <goals>
          <goal>run</goal>
        </goals>
        <configuration>
            <tasks>
            <path id="maven-ant-tasks.classpath" 
path="${build.system.home}/tools/ant/lib/maven-ant-tasks-2.0.9.jar"/>
            <typedef resource="org/apache/maven/artifact/ant/antlib.xml" 
classpathref="maven-ant-tasks.classpath"/>

            <dependencies filesetId="dependencies.fileset">
              <dependency groupId="com.sap" artifactId="me.app.sda" 
version="${env.build.version}" type="sda"/>
              <dependency groupId="com.sap" 
artifactId="me.loginmodule.netweaver.sda" version="${env.build.version}" 
type="sda"/>
            </dependencies>

            <mkdir dir="${project.build.directory}/DEPLOYARCHIVES"/>
            <copy todir="${project.build.directory}/DEPLOYARCHIVES" 
flatten="true">
               <fileset refid="dependencies.fileset"/>
            </copy>
            <exec dir="${project.build.directory}" executable="${nwce-tool}">
                <env key="NWCETOOLLIB" path="${nwce-tool-lib}"/>
                <arg line='-c &quot;packsca -n ME -v sap.com -l local -counter 
${env.build.number} -r ${env.build.major}.${env.build.minor} -sp 
${env.build.servicepack} -pl ${env.build.patch} -da DEPLOYARCHIVES -o 
BuildSystem ${project.artifactId}-${env.build.version}.jar &quot; -e'/>
            </exec>
        </tasks>
      </configuration>
    </execution>
  </executions>
</plugin>

Is there some other way to make <dependancy> to look in the desired local 
repository?

      was (Author: rednevals):
    To clarify this issue, here are some more details of this real example....

We use a NetWeaver tool to assemble SDA artifacts into a deployable SCA. These 
SDA's are present in the specified local repository. The maven-ant-tasks 
<dependency> is used to reference these artifacts. The problem is that the only 
place the antrun plugin looks to resolve these dependancies is the 
localRepository as defined in apache-maven-2.0.9\conf\settings.xml, not the 
settings file as specified on the Maven command line.

<plugin>
  <artifactId>maven-antrun-plugin</artifactId>
    <executions>
      <execution>
        <phase>package</phase>
        <goals>
          <goal>run</goal>
        </goals>
        <configuration>
            <tasks>
            <path id="maven-ant-tasks.classpath" 
path="${build.system.home}/tools/ant/lib/maven-ant-tasks-2.0.9.jar"/>
            <typedef resource="org/apache/maven/artifact/ant/antlib.xml" 
classpathref="maven-ant-tasks.classpath"/>

            <dependencies filesetId="dependencies.fileset">
              <dependency groupId="com.sap" artifactId="me.app.sda" 
version="${env.build.version}" type="sda"/>
              <dependency groupId="com.sap" 
artifactId="me.loginmodule.netweaver.sda" version="${env.build.version}" 
type="sda"/>
            </dependencies>

            <mkdir dir="${project.build.directory}/DEPLOYARCHIVES"/>
            <copy todir="${project.build.directory}/DEPLOYARCHIVES" 
flatten="true">
               <fileset refid="dependencies.fileset"/>
            </copy>
            <exec dir="${project.build.directory}" executable="${nwce-tool}">
                <env key="NWCETOOLLIB" path="${nwce-tool-lib}"/>
                <arg line="-c \&quot;packsca -n ME -v sap.com -l local -counter 
${env.build.number} -r ${env.build.major}.${env.build.minor} -sp 
${env.build.servicepack} -pl ${env.build.patch} -da DEPLOYARCHIVES -o 
BuildSystem ${project.artifactId}-${env.build.version}.jar \&quot; -e"/>
            </exec>
        </tasks>
      </configuration>
    </execution>
  </executions>
</plugin>

Is there some other way to make <dependancy> to look in the desired local 
repository?
  
> Antrun ignores different settings.xml as specified on Maven command line 
> using -s option.
> -----------------------------------------------------------------------------------------
>
>                 Key: MANTRUN-122
>                 URL: http://jira.codehaus.org/browse/MANTRUN-122
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Scott Lavender
>
> I have multiple build environments that each have their own <localRepository> 
> as defined in separate settings.xml files. At build time I specify which 
> settings file to be used using the Maven command.
> For example:
>     mvn -s D:\prod\settings.xml clean install
>     mvn -X -s D:\test\settings.xml clean install
> In either case, the entire build process uses the <localRepository> as 
> defined in the settings. The problem occurs when the Antrun plugin is 
> invoked, it is unable to resolve some of the artifacts that were just built 
> and published to the specified local repository.
> I have determined that the Antrun plugin is ignoring the settings file being 
> specified, and looks to the root settings.xml in the Maven installation 
> instead ( apache-maven-2.0.9\conf\settings.xml). I had initially setup this 
> file, but no longer maintain my settings there. Instead, I have multiple 
> settings files, one per product build environment.
> Shouldn't the Antrun plugin honor the specified settings.xml values?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to