micha149 / gulp-maven-deploy

Gulp wrapper for the maven-deploy plugin
MIT License
12 stars 11 forks source link

Use the filename as ArtifactId : Add Generated Function for Options #6

Closed jmorille closed 8 years ago

jmorille commented 9 years ago

As discut at issue https://github.com/finn-no/gulp-maven-deploy/issues/5 use an function to generate the maven deploy configuration.

The use case look that

gulp.task('deploy', function () {
  var maven = require('gulp-maven-deploy');
  gulp.src('dist/**/*.apk') 
    .pipe(maven.deploy(function (fileParsed, cb) {
        return {
          'config': {
            'groupId':  'com.mygroup',
            'artifactId': fileParsed.name,
            'type': fileParsed.extname,
            'repositories': [  {  'id': 'some-repo-id',  'url': 'http://some-repo/url' }  ]
          }
        };
      }
    ))
}); 
leftieFriele commented 9 years ago

Ok, I finally got Maven onto my machine so I got to see this running. Sorry about the back and forth and my inability to understand what you meant to do. It seems fine to add this.

There are three things which must be done:

jmorille commented 9 years ago

I am pushing another pull request, with the chages that you asking.

I do more test and they are a problem with the maven-deploy plugin in multiple file. For all the file they use the archive path dist/back2.apk in -Dfile options

archive path dist/back2.apk
Executing command: mvn -B deploy:deploy-file -Dpackaging=apk -Dfile=dist/back2.apk -DgroupId=mygroup -DartifactId=android-armv7-debug-unaligned -Dversion=0.0.1 -DrepositoryId=...

archive path dist/back2.apk
Executing command: mvn -B deploy:deploy-file -Dpackaging=apk -Dfile=dist/back2.apk -DgroupId=mygroup -DartifactId=android-armv7-debug-unaligned -Dversion=0.0.1 -DrepositoryId=...
leftieFriele commented 9 years ago

I'll merge it once the tests pass @jmorille

micha149 commented 9 years ago

@jmorille did you noticed issue #8? Would this satisfy your needs, too?