Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<folder> detects only sub-folders not files #37

Open
eliasbalasis opened this issue Oct 14, 2016 · 11 comments
Open

<folder> detects only sub-folders not files #37

eliasbalasis opened this issue Oct 14, 2016 · 11 comments

Comments

@eliasbalasis
Copy link

I recently used "iterator" to perform actions on some files on some folder, only to discover, to my disappointment I have to admit, that "iterator" only detects sub-folders of and not the files in it.

Having followed the examples precisely, I am confident that the implementation handles sub-folders only.

Any ideas?

@khmarbaise
Copy link
Owner

The iterator was designed to use folders only and not files...can you give a real example where it might make sense to use iterating over files instead of folders.

@eliasbalasis
Copy link
Author

Thanks for looking at this, my actual making sense problem is un-signing a series of JAR files using webstart-maven-plugin

@eliasbalasis
Copy link
Author

For your convenience the iterated webstart-maven-plugin doesn't work with folders, although it states otherwise, so I am forced to go through a complicated series of steps via ant and other custom tasks only to increase complexityof my build

I hope this helps justifyinfthe requirement

@eliasbalasis
Copy link
Author

After having given enough thought,

I believe it makes sense to extend iterator with a common path-like selection having , etc. for more flexibility and control

Let me know your thoughts.

@khmarbaise
Copy link
Owner

Could you make a example project which shows the wished behaviour ?

@eliasbalasis
Copy link
Author

eliasbalasis commented Oct 29, 2016

It is not very easy to produce a full project to demonstrate the exact problem, I can mostly describe.

So, imagine a folder hierarchy with JAR files that need to be un-signed

<plugin>
  <groupId>com.soebes.maven.plugins</groupId>
  <artifactId>iterator-maven-plugin</artifactId>
  <version>0.4</version>
  <executions>
    <execution>
      <phase>package</phase>
      <goals>
        <goal>iterator</goal>
      </goals>
      <configuration>
        <folder>${project.basedir}/repository</folder>
        <pluginExecutors>
          <pluginExecutor>
            <plugin>
              <groupId>com.soebes.maven.plugins</groupId>
              <artifactId>maven-echo-plugin</artifactId>
            </plugin>
            <goal>echo</goal>
            <configuration>
              <echos>
                <echo>This is a message: @item@</echo>
              </echos>
            </configuration>
          </pluginExecutor>
          <pluginExecutor>
            <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>webstart-maven-plugin</artifactId>
              <version>:1.0-beta-8-SNAPSHOT</version>
            </plugin>
            <goal>unsign</goal>
            <configuration>
              <jarPath>@item@</jarPath> <!-- item must be full path and file -->
            </configuration>
          </pluginExecutor>
        </pluginExecutors>
      </configuration>
    </execution>
  </executions>
</plugin>

I hope this helps.

@khmarbaise
Copy link
Owner

Ah that makes it more clear..So the iteration should be done on a file base with absolute file path...and not on folder base....I think that needs an other goal...but I will see...

@johnnyquestep
Copy link

I am having a similar issue, any update on this ?

@eliasbalasis
Copy link
Author

I have used "Ant" script as replacement, more confusing but works

@martinbachtold
Copy link

+1 Please add this feature. We need it for signing files

@DmitryZagr
Copy link

any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants